diff --git a/cmake/SourceFiles.cmake b/cmake/SourceFiles.cmake index 45efd4a2c..c91157927 100644 --- a/cmake/SourceFiles.cmake +++ b/cmake/SourceFiles.cmake @@ -385,31 +385,13 @@ set(SOURCE_FILES src/cpuemu_35.cpp src/cpuemu_40.cpp src/cpuemu_50.cpp + src/jit/compemu.cpp + src/jit/compstbl.cpp + src/jit/compemu_fpp.cpp + src/jit/compemu_support.cpp ) add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${SOURCE_FILES}) - -if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm64") - target_compile_definitions(${PROJECT_NAME} PRIVATE CPU_AARCH64) - target_sources(${PROJECT_NAME} PRIVATE - src/osdep/aarch64_helper.s - src/jit/compemu.cpp - src/jit/compstbl.cpp - src/jit/compemu_fpp.cpp - src/jit/compemu_support.cpp - ) -elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "arm") - set(CMAKE_ASM_COMPILER_ARG1 "-mfpu=neon-fp-armv8") - target_compile_definitions(${PROJECT_NAME} PRIVATE CPU_arm ARMV6_ASSEMBLY ARMV6T2 USE_ARMNEON ARM_HAS_DIV) - target_sources(${PROJECT_NAME} PRIVATE - src/osdep/neon_helper.s - src/jit/compemu.cpp - src/jit/compstbl.cpp - src/jit/compemu_fpp.cpp - src/jit/compemu_support.cpp - ) -endif () - set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_EXECUTABLE_NAME "Amiberry-Lite" @@ -432,6 +414,21 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE -DAMIBERRY_LIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}" ) +if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm64") + target_compile_definitions(${PROJECT_NAME} PRIVATE + CPU_AARCH64 + ) + target_sources(${PROJECT_NAME} PRIVATE + src/osdep/aarch64_helper.s + ) +elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "arm") + set(CMAKE_ASM_COMPILER_ARG1 "-mfpu=neon-fp-armv8") + target_compile_definitions(${PROJECT_NAME} PRIVATE CPU_arm ARMV6_ASSEMBLY ARMV6T2 USE_ARMNEON ARM_HAS_DIV) + target_sources(${PROJECT_NAME} PRIVATE + src/osdep/neon_helper.s + ) +endif () + target_compile_options(${PROJECT_NAME} PRIVATE -fno-pie) target_link_options(${PROJECT_NAME} PRIVATE -no-pie) diff --git a/src/include/newcpu.h b/src/include/newcpu.h index 13691b7cb..7dbd61585 100644 --- a/src/include/newcpu.h +++ b/src/include/newcpu.h @@ -877,8 +877,7 @@ extern cpuop_func_noret *cpufunctbl_noret[65536] ASM_SYM_FOR_FUNC("cpufunctbl_no extern cpuop_func *cpufunctbl[65536] ASM_SYM_FOR_FUNC("cpufunctbl"); #ifdef JIT -extern void flush_icache(int); -extern void flush_icache_hard(int); +extern void (*flush_icache)(int); extern void compemu_reset(void); #else #define flush_icache(int) do {} while (0) diff --git a/src/jit/aarch64.h b/src/jit/arm/aarch64.h similarity index 75% rename from src/jit/aarch64.h rename to src/jit/arm/aarch64.h index fd2088f22..f34e125ff 100644 --- a/src/jit/aarch64.h +++ b/src/jit/arm/aarch64.h @@ -36,9 +36,9 @@ extern "C" { enum { disasm_arg_NONE,disasm_arg_ofs,disasm_arg_ofe, disasm_arg_Xt, disasm_arg_labelij1, disasm_arg_RtS, disasm_arg_RnS, disasm_arg_i, disasm_arg_j12_opt, disasm_arg_Rn, disasm_arg_ib, disasm_arg_Rt, disasm_arg_j16_opt, disasm_arg_j, disasm_arg_Rm, disasm_arg_c, disasm_arg_labeli4, disasm_arg_i_opt, disasm_arg_pstate, disasm_arg_sh, disasm_arg_a0, disasm_arg_a1, disasm_arg_a2, disasm_arg_dc0, disasm_arg_dc1, disasm_arg_ZVA, disasm_arg_dc2, disasm_arg_ic, disasm_arg_Xt_opt, disasm_arg_tl0, disasm_arg_tl1, disasm_arg_tl2, disasm_arg_sysreg, disasm_arg_Cn, disasm_arg_Cm, disasm_arg_Xn, disasm_arg_b, disasm_arg_VtT, disasm_arg_Vt2T, disasm_arg_Vt3T, disasm_arg_Vt4T, disasm_arg_offs, disasm_arg_XnS, disasm_arg_offe, disasm_arg_Qi, disasm_arg_Xm, disasm_arg_Qi3, disasm_arg_Qi2, disasm_arg_Qi1, disasm_arg_VtB, disasm_arg_VtH, disasm_arg_VtS, disasm_arg_VtD, disasm_arg_i1, disasm_arg_i2, disasm_arg_i4, disasm_arg_i8, disasm_arg_Vt3B, disasm_arg_Vt3H, disasm_arg_Vt3S, disasm_arg_Vt3D, disasm_arg_i3, disasm_arg_i6, disasm_arg_i12, disasm_arg_i24, disasm_arg_Vt2B, disasm_arg_Vt2H, disasm_arg_Vt2S, disasm_arg_Vt2D, disasm_arg_i16, disasm_arg_Vt4B, disasm_arg_Vt4H, disasm_arg_Vt4S, disasm_arg_Vt4D, disasm_arg_i32, disasm_arg_z, disasm_arg_z3, disasm_arg_z2, disasm_arg_z4, disasm_arg_Rd, disasm_arg_Rd1, disasm_arg_Rt1, disasm_arg_Wd, disasm_arg_Wt, disasm_arg_FPt, disasm_arg_prf_op, disasm_arg_is4_opt, disasm_arg_FPm, disasm_arg_iz4_opt, disasm_arg_im4_opt, disasm_arg_nRt, disasm_arg_FPst, disasm_arg_j_opt, disasm_arg_Rom, disasm_arg_amountj, disasm_arg_amountz, disasm_arg_amountjs, disasm_arg_amountj2, disasm_arg_amountj3, disasm_arg_shiftj_opt, disasm_arg_Rsom, disasm_arg_exts, disasm_arg_Wn, disasm_arg_Wm, disasm_arg_Xd, disasm_arg_Vt16b, disasm_arg_Vn16b, disasm_arg_Qt, disasm_arg_Sn, disasm_arg_Vm4s, disasm_arg_Vt4s, disasm_arg_Vn4s, disasm_arg_Qn, disasm_arg_St, disasm_arg_FPjt, disasm_arg_Vnj, disasm_arg_FPidx, disasm_arg_Vtjq, disasm_arg_Ht, disasm_arg_Hn, disasm_arg_Hm, disasm_arg_FPn, disasm_arg_VtH1, disasm_arg_VnH1, disasm_arg_VmH1, disasm_arg_Vtzq, disasm_arg_Vnzq, disasm_arg_Vmzq, disasm_arg_simd0, disasm_arg_FPz2t, disasm_arg_FPz2n, disasm_arg_FPz2m, disasm_arg_VnT, disasm_arg_VmT, disasm_arg_FPz3t, disasm_arg_FPz3n, disasm_arg_FPz4n, disasm_arg_VnT3, disasm_arg_Vn2d, disasm_arg_Vn2h, disasm_arg_Vnz, disasm_arg_FPz4t, disasm_arg_Vtz, disasm_arg_FPz3m, disasm_arg_Dt, disasm_arg_Dn, disasm_arg_shrshift, disasm_arg_Vtj2, disasm_arg_Vnj2, disasm_arg_shlshift, disasm_arg_FPnj, disasm_arg_VnTa, disasm_arg_FPjt2, disasm_arg_FPjn2, disasm_arg_Vtz3, disasm_arg_VmTs, disasm_arg_VmHs, disasm_arg_VmTs2, disasm_arg_Vn116b, disasm_arg_Vn216b, disasm_arg_Vn316b, disasm_arg_Vn416b, disasm_arg_Vtj, disasm_arg_R2n, disasm_arg_FPidxk, disasm_arg_Vtzq2, disasm_arg_VnT2, disasm_arg_Vnz3, disasm_arg_Vnzq2, disasm_arg_shift8, disasm_arg_VtT3, disasm_arg_VmT3, disasm_arg_VtT4, disasm_arg_imm8, disasm_arg_amountk_opt, disasm_arg_amountk2_opt, disasm_arg_imm64, disasm_arg_Vt2d, disasm_arg_F16, disasm_arg_F32, disasm_arg_F64, disasm_arg_VmTs4b, disasm_arg_Vm2d, disasm_arg_Vm16b, disasm_arg_Vd16b, disasm_arg_Vd4s, disasm_arg_FPz5t, disasm_arg_fbits, disasm_arg_FPz5n, disasm_arg_Vn1d, disasm_arg_Vt1d, disasm_arg_FPk5t, disasm_arg_FPz5m, disasm_arg_jz, disasm_arg_FPz5d }; /*** private functions ***/ -char *disasm_str(char*s,int n) {if(!s)return "?";while(n){s++;if(!*s){s++;n--;}}return *s?s:"?";} -char *disasm_sysreg(uint8_t p,uint8_t k,uint8_t n,uint8_t m,uint8_t j) {char *t=NULL;switch(p){case 2: switch(k) {case 0: switch(n) {case 0: switch(m) {case 0: t="?\0?\0OSDTRRX_EL1\0"; break;case 2: t="MDCCINT_EL1\0?\0MDSCR_EL1\0"; break;case 3: t="?\0?\0OSDTRTX_EL1\0"; break;case 6: t="?\0?\0OSECCR_EL1\0"; break;default: { n=j; j=m; switch(n) {case 4: t="DBGBVR0_EL1\0DBGBVR1_EL1\0DBGBVR2_EL1\0DBGBVR3_EL1\0DBGBVR4_EL1\0DBGBVR5_EL1\0DBGBVR6_EL1\0DBGBVR7_EL1\0"; break;case 5: t="DBGBCR0_EL1\0DBGBCR1_EL1\0DBGBCR2_EL1\0DBGBCR3_EL1\0DBGBCR4_EL1\0DBGBCR5_EL1\0DBGBCR6_EL1\0DBGBCR7_EL1\0"; break;case 6: t="DBGWVR0_EL1\0DBGWVR1_EL1\0DBGWVR2_EL1\0DBGWVR3_EL1\0DBGWVR4_EL1\0DBGWVR5_EL1\0DBGWVR6_EL1\0DBGWVR7_EL1\0"; break;case 7: t="DBGWCR0_EL1\0DBGWCR1_EL1\0DBGWCR2_EL1\0DBGWCR3_EL1\0DBGWCR4_EL1\0DBGWCR5_EL1\0DBGWCR6_EL1\0DBGWCR7_EL1\0"; break;} break; }} break;case 1: if(m==0) t="MDRAR_EL1\0?\0?\0?\0OSLAR_EL1\0"; else if(j==4) { j=m; t="OSLSR_EL1\0?\0OSDLR_EL1\0DBGPRCR_EL1\0"; }break;case 7: if(j==6) { j=m; t="?\0?\0?\0?\0?\0?\0?\0?\0DBGCLAIMSET_EL1\0DBGCLAIMCLR_EL1\0?\0?\0?\0?\0DBGAUTHSTATUS_EL1\0"; }break;} break;case 3: if(n==0&&j==0) { j=m; t="?\0MDCCSR_EL0\0?\0?\0DBGDTR_EL0\0DBGDTRRX_EL0\0"; } break;case 4: if(n==0&&m==7) t="DBGVCR32_EL2\0"; break;} break;case 3: switch(k) {case 0: switch(n) {case 0: if(m==0) t="MIDR_EL1\0?\0?\0?\0?\0MPIDR_EL1\0REVIDR_EL1\0?\0ID_PFR0_EL1\0ID_PFR1_EL1\0ID_DFR0_EL1\0ID_AFR0_EL1\0ID_MMFR0_EL1\0ID_MMFR1_EL1\0ID_MMFR2_EL1\0ID_MMFR3_EL1\0ID_ISAR0_EL1\0ID_ISAR1_EL1\0ID_ISAR2_EL1\0ID_ISAR2_EL1\0ID_ISAR3_EL1\0ID_ISAR4_EL1\0ID_ISAR5_EL1\0ID_MMFR4_EL1\0?\0MVFR0_EL1\0MVFR1_EL1\0MVFR2_EL1\0?\0?\0?\0?\0?\0ID_A64PFR0_EL1\0ID_A64PFR1_EL1\0?\0?\0ID_A64ZFR0_EL1\0?\0?\0?\0ID_A64DFR0_EL1\0ID_A64DFR1_EL1\0?\0?\0ID_A64AFR0_EL1\0ID_A64AFR1_EL1\0?\0?\0ID_A64ISAR0_EL1\0ID_A64ISAR1_EL1\0?\0?\0?\0?\0?\0?\0ID_A64MMFR0_EL1\0ID_A64MMFR1_EL1\0ID_A64MMFR2_EL1\0"; break;case 1: switch(m) {case 0: t="SCTLR_EL1\0ACTLR_EL1\0CPACR_EL1\0"; break;case 2: t="ZCR_EL1\0"; break;} break;case 2: if(m==0) t="TTBR0_EL1\0TTBR1_EL1\0TCR_EL1\0"; break;case 4: switch(m) {case 0: t="SPSR_EL1\0ELR_EL1\0"; break;case 1: t="SP_EL0\0"; break;case 2: t="SPSel\0?\0CurrentEL\0PAN\0UAO\0"; break;case 6: t="ICC_PMR_EL1\0"; break;} break;case 5: switch(m) {case 1: t="AFSR0_EL1\0AFSR1_EL1\0"; break;case 2: t="ESR_EL1"; break;case 3: t="ERRIDR_EL1\0ERRSELR_EL1\0"; break;case 4: t="ERXFR_EL1\0ERXCTLR_EL1\0ERXSTATUS_EL1\0ERXADDR_EL1\0"; break;case 5: t="ERXMISC0_EL1\0ERXMISC1_EL1\0"; break;} break;case 6: if(m==0) t="FAR_EL1\0"; break;case 7: if(m==4) t="PAR_EL1\0"; break;case 9: switch(m) {case 9: t="PMSCR_EL1\0?\0PMSICR_EL1\0PMSIRR_EL1\0PMSFCR_EL1\0PMSEVFR_EL1\0PMSLATFR_EL1\0PMSIDR_EL1\0PMSIDR_EL1\0"; break;case 10: t="PMBLIMITR_EL1\0PMBPTR_EL1\0?\0PMBSR_EL1\0?\0?\0?\0PMBIDR_EL1\0"; break;case 14: t="?\0PMINTENSET_EL1\0PMINTENCLR_EL1\0"; break;} break;case 10: if(m==4) t="LORSA_EL1\0LOREA_EL1\0LORN_EL1\0LORC_EL1\0?\0?\0?\0LORID_EL1\0"; else if(m!=4&&j==0) { j=m; t="?\0?\0MAIR_EL1\0AMAIR_EL1\0"; }break;case 12: switch(m) {case 0: t="VBAR_EL1\0RVBAR_EL1\0RMR_EL1\0"; break;case 1: t="ISR_EL1\0DISR_EL1\0"; break;case 8: t="ICC_IAR0_EL1\0ICC_EOIR0_EL1\0ICC_HPPIR0_EL1\0ICC_BPR0_EL1\0ICC_AP0R0_EL1\0ICC_AP0R1_EL1\0ICC_AP0R2_EL1\0ICC_AP0R3_EL1\0"; break;case 9: t="ICC_AP1R0_EL1\0ICC_AP1R1_EL1\0ICC_AP1R2_EL1\0ICC_AP1R3_EL1\0"; break;case 11: t="?\0ICC_DIR_EL1\0?\0ICC_RPR_EL1\0?\0ICC_SGI1R_EL1\0ICC_ASGI1R_EL1\0ICC_SGI0R_EL1\0"; break;case 12: t="ICC_IAR1_EL1\0ICC_EOIR1_EL1\0ICC_HPPIR1_EL1\0ICC_BPR1_EL1\0ICC_CTLR_EL1\0ICC_SRE_EL1\0ICC_IGRPEN0_EL1\0ICC_IGRPEN1_EL1\0"; break;} break;case 13: if(m==0) t="?\0CONTEXTIDR_EL1\0?\0?\0TPIDR_EL1\0"; break;case 14: if(m==1) t="CNTKCTL_EL1\0"; break;} break;case 1: if(n==0&&m==0) t="CCSIDR_EL1\0CLIDR_EL1\0?\0?\0?\0?\0?\0AIDR_EL1\0"; break;case 2: if(n==0&&m==0) t="CSSELR_EL1\0"; break;case 3: switch(n) {case 0: if(m==0) t="?\0CTR_EL0\0?\0?\0?\0?\0?\0DCZID_EL0\0"; break;case 4: switch(m) {case 2: t="NZCV\0DAIF\0"; break;case 4: t="FPCR\0FPSR\0"; break;case 5: t="DSPSR_EL0\0DLR_EL0\0"; break;} break;case 9: switch(m) {case 12: t="PMCR_EL0\0PMCNTENSET_EL0\0PMCNTENCLR_EL0\0PMOVSCLR_EL0\0PMSWINC_EL0\0PMSELR_EL0\0PMCEID0_EL0\0PMCEID1_EL0\0"; break;case 13: t="PMCCNTR_EL0\0PMXEVTYPER_EL0\0PMXEVCNTR_EL0\0"; break;case 14: t="PMUSERENR_EL0\0?\0?\0PMOVSSET_EL0\0"; break;} break; - case 13: if(m==0) t="?\0?\0TPIDR_EL0\0TPIDRRO_EL0\0"; break;case 14: switch(m) {case 0: t="CNTFRQ_EL0\0CNTPCT_EL0\0CNTVCT_EL0\0"; break;case 2: t="CNTP_TVAL_EL0\0CNTP_CTL_EL0\0CNTP_CVAL_EL0\0"; break;case 3: t="CNTV_TVAL_EL0\0CNTV_CTL_EL0\0CNTV_CVAL_EL0\0"; break;} break;} break;case 4: switch(n) {case 0: if(m==0) t="VPIDR_EL2\0?\0?\0?\0?\0VMPIDR_EL2\0"; break;case 1: switch(m) {case 0: t="SCTLR_EL2\0ACTLR_EL2\0"; break;case 1: t="HCR_EL2\0MDCR_EL2\0CPTR_EL2\0HSTR_EL2\0?\0?\0?\0HACR_EL2\0"; break;case 2: t="ZCR_EL2\0"; break;} break;case 2: switch(m) {case 0: t="TTBR0_EL2\0?\0TCR_EL2\0"; break;case 1: t="VTTBR0_EL2\0?\0VTCR_EL2\0"; break;} break;case 3: if(m==0) t="DACR32_EL2\0"; break;case 4: switch(m) {case 0: t="SPSR_EL2\0ELR_EL2\0"; break;case 1: t="SP_EL1\0"; break;case 3: t="SPSR_irq\0SPSR_abt\0SPSR_und\0SPSR_fiq\0"; break;} break;case 5: switch(m) {case 0: t="?\0IFSR32_EL2\0"; break;case 1: t="AFSR0_EL2\0AFSR1_EL2\0"; break;case 2: t="ESR_EL2\0?\0?\0VSESR_EL2\0"; break;case 3: t="FPEXC32_EL2\0"; break;} break;case 6: if(m==0) t="FAR_EL2\0?\0?\0?\0HPFAR_EL2\0"; break;case 9: if(m==9) t="PMSCR_EL2\0"; break;case 10: switch(m) {case 2: t="MAIR_EL2\0"; break;case 3: t="AMAIR_EL2\0"; break;} break;case 12: switch(m) {case 0: t="VBAR_EL2\0RVBAR_EL2\0RMR_EL2\0"; break;case 1: t="?\0VDISR_EL2\0"; break;case 8: t="ICH_AP0R0_EL2\0ICH_AP0R1_EL2\0ICH_AP0R2_EL2\0ICH_AP0R3_EL2\0"; break;case 9: t="ICH_AP1R0_EL2\0ICH_AP1R1_EL2\0ICH_AP1R2_EL2\0ICH_AP1R3_EL2\0ICC_SRE_EL2\0"; break;case 11: t="ICH_HCR_EL2\0ICH_VTR_EL2\0ICH_MISR_EL2\0ICH_EISR_EL2\0?\0ICH_ELRSR_EL2\0?\0ICH_VMCR_EL2\0"; break;case 12: t="ICH_LR0_EL2\0ICH_LR1_EL2\0ICH_LR2_EL2\0ICH_LR3_EL2\0ICH_LR4_EL2\0ICH_LR5_EL2\0ICH_LR6_EL2\0ICH_LR7_EL2\0"; break;case 13: t="ICH_LR8_EL2\0ICH_LR9_EL2\0ICH_LR10_EL2\0ICH_LR11_EL2\0ICH_LR12_EL2\0ICH_LR13_EL2\0ICH_LR14_EL2\0ICH_LR15_EL2\0"; break;} break;case 13: if(m==0) t="?\0CONTEXTIDR_EL2\0TPIDR_EL2\0"; break;case 14: switch(m) {case 0: t="?\0?\0?\0CNTVOFF_EL2\0"; break;case 1: t="CNTHCTL_EL2\0"; break;case 2: t="CNTHP_TVAL_EL2\0CNTHP_CTL_EL2\0CNTHP_CVAL_EL2\0"; break;case 3: t="CNTHV_TVAL_EL2\0CNTHV_CTL_EL2\0CNTHV_CVAL_EL2\0"; break;} break;} break;case 5: if(n==4&&m==0) t="SPSR_EL12\0ELR_EL12\0"; break;case 6: if(n==4&&m==1) t="SP_EL2\0"; break;case 7: if(n==14&&m==2) t="CNTPS_TVAL_EL1\0CNTPS_CTL_EL1\0CNTPS_CVAL_EL1\0"; break;} break;}return t?disasm_str(t,j):NULL;} +const char *disasm_str(char*s,int n) {if(!s)return "?";while(n){s++;if(!*s){s++;n--;}}return *s?s:"?";} +const char *disasm_sysreg(uint8_t p,uint8_t k,uint8_t n,uint8_t m,uint8_t j) {char *t=NULL;switch(p){case 2: switch(k) {case 0: switch(n) {case 0: switch(m) {case 0: t="?\0?\0OSDTRRX_EL1\0"; break;case 2: t="MDCCINT_EL1\0?\0MDSCR_EL1\0"; break;case 3: t="?\0?\0OSDTRTX_EL1\0"; break;case 6: t="?\0?\0OSECCR_EL1\0"; break;default: { n=j; j=m; switch(n) {case 4: t="DBGBVR0_EL1\0DBGBVR1_EL1\0DBGBVR2_EL1\0DBGBVR3_EL1\0DBGBVR4_EL1\0DBGBVR5_EL1\0DBGBVR6_EL1\0DBGBVR7_EL1\0"; break;case 5: t="DBGBCR0_EL1\0DBGBCR1_EL1\0DBGBCR2_EL1\0DBGBCR3_EL1\0DBGBCR4_EL1\0DBGBCR5_EL1\0DBGBCR6_EL1\0DBGBCR7_EL1\0"; break;case 6: t="DBGWVR0_EL1\0DBGWVR1_EL1\0DBGWVR2_EL1\0DBGWVR3_EL1\0DBGWVR4_EL1\0DBGWVR5_EL1\0DBGWVR6_EL1\0DBGWVR7_EL1\0"; break;case 7: t="DBGWCR0_EL1\0DBGWCR1_EL1\0DBGWCR2_EL1\0DBGWCR3_EL1\0DBGWCR4_EL1\0DBGWCR5_EL1\0DBGWCR6_EL1\0DBGWCR7_EL1\0"; break;} break; }} break;case 1: if(m==0) t="MDRAR_EL1\0?\0?\0?\0OSLAR_EL1\0"; else if(j==4) { j=m; t="OSLSR_EL1\0?\0OSDLR_EL1\0DBGPRCR_EL1\0"; }break;case 7: if(j==6) { j=m; t="?\0?\0?\0?\0?\0?\0?\0?\0DBGCLAIMSET_EL1\0DBGCLAIMCLR_EL1\0?\0?\0?\0?\0DBGAUTHSTATUS_EL1\0"; }break;} break;case 3: if(n==0&&j==0) { j=m; t="?\0MDCCSR_EL0\0?\0?\0DBGDTR_EL0\0DBGDTRRX_EL0\0"; } break;case 4: if(n==0&&m==7) t="DBGVCR32_EL2\0"; break;} break;case 3: switch(k) {case 0: switch(n) {case 0: if(m==0) t="MIDR_EL1\0?\0?\0?\0?\0MPIDR_EL1\0REVIDR_EL1\0?\0ID_PFR0_EL1\0ID_PFR1_EL1\0ID_DFR0_EL1\0ID_AFR0_EL1\0ID_MMFR0_EL1\0ID_MMFR1_EL1\0ID_MMFR2_EL1\0ID_MMFR3_EL1\0ID_ISAR0_EL1\0ID_ISAR1_EL1\0ID_ISAR2_EL1\0ID_ISAR2_EL1\0ID_ISAR3_EL1\0ID_ISAR4_EL1\0ID_ISAR5_EL1\0ID_MMFR4_EL1\0?\0MVFR0_EL1\0MVFR1_EL1\0MVFR2_EL1\0?\0?\0?\0?\0?\0ID_A64PFR0_EL1\0ID_A64PFR1_EL1\0?\0?\0ID_A64ZFR0_EL1\0?\0?\0?\0ID_A64DFR0_EL1\0ID_A64DFR1_EL1\0?\0?\0ID_A64AFR0_EL1\0ID_A64AFR1_EL1\0?\0?\0ID_A64ISAR0_EL1\0ID_A64ISAR1_EL1\0?\0?\0?\0?\0?\0?\0ID_A64MMFR0_EL1\0ID_A64MMFR1_EL1\0ID_A64MMFR2_EL1\0"; break;case 1: switch(m) {case 0: t="SCTLR_EL1\0ACTLR_EL1\0CPACR_EL1\0"; break;case 2: t="ZCR_EL1\0"; break;} break;case 2: if(m==0) t="TTBR0_EL1\0TTBR1_EL1\0TCR_EL1\0"; break;case 4: switch(m) {case 0: t="SPSR_EL1\0ELR_EL1\0"; break;case 1: t="SP_EL0\0"; break;case 2: t="SPSel\0?\0CurrentEL\0PAN\0UAO\0"; break;case 6: t="ICC_PMR_EL1\0"; break;} break;case 5: switch(m) {case 1: t="AFSR0_EL1\0AFSR1_EL1\0"; break;case 2: t="ESR_EL1"; break;case 3: t="ERRIDR_EL1\0ERRSELR_EL1\0"; break;case 4: t="ERXFR_EL1\0ERXCTLR_EL1\0ERXSTATUS_EL1\0ERXADDR_EL1\0"; break;case 5: t="ERXMISC0_EL1\0ERXMISC1_EL1\0"; break;} break;case 6: if(m==0) t="FAR_EL1\0"; break;case 7: if(m==4) t="PAR_EL1\0"; break;case 9: switch(m) {case 9: t="PMSCR_EL1\0?\0PMSICR_EL1\0PMSIRR_EL1\0PMSFCR_EL1\0PMSEVFR_EL1\0PMSLATFR_EL1\0PMSIDR_EL1\0PMSIDR_EL1\0"; break;case 10: t="PMBLIMITR_EL1\0PMBPTR_EL1\0?\0PMBSR_EL1\0?\0?\0?\0PMBIDR_EL1\0"; break;case 14: t="?\0PMINTENSET_EL1\0PMINTENCLR_EL1\0"; break;} break;case 10: if(m==4) t="LORSA_EL1\0LOREA_EL1\0LORN_EL1\0LORC_EL1\0?\0?\0?\0LORID_EL1\0"; else if(m!=4&&j==0) { j=m; t="?\0?\0MAIR_EL1\0AMAIR_EL1\0"; }break;case 12: switch(m) {case 0: t="VBAR_EL1\0RVBAR_EL1\0RMR_EL1\0"; break;case 1: t="ISR_EL1\0DISR_EL1\0"; break;case 8: t="ICC_IAR0_EL1\0ICC_EOIR0_EL1\0ICC_HPPIR0_EL1\0ICC_BPR0_EL1\0ICC_AP0R0_EL1\0ICC_AP0R1_EL1\0ICC_AP0R2_EL1\0ICC_AP0R3_EL1\0"; break;case 9: t="ICC_AP1R0_EL1\0ICC_AP1R1_EL1\0ICC_AP1R2_EL1\0ICC_AP1R3_EL1\0"; break;case 11: t="?\0ICC_DIR_EL1\0?\0ICC_RPR_EL1\0?\0ICC_SGI1R_EL1\0ICC_ASGI1R_EL1\0ICC_SGI0R_EL1\0"; break;case 12: t="ICC_IAR1_EL1\0ICC_EOIR1_EL1\0ICC_HPPIR1_EL1\0ICC_BPR1_EL1\0ICC_CTLR_EL1\0ICC_SRE_EL1\0ICC_IGRPEN0_EL1\0ICC_IGRPEN1_EL1\0"; break;} break;case 13: if(m==0) t="?\0CONTEXTIDR_EL1\0?\0?\0TPIDR_EL1\0"; break;case 14: if(m==1) t="CNTKCTL_EL1\0"; break;} break;case 1: if(n==0&&m==0) t="CCSIDR_EL1\0CLIDR_EL1\0?\0?\0?\0?\0?\0AIDR_EL1\0"; break;case 2: if(n==0&&m==0) t="CSSELR_EL1\0"; break;case 3: switch(n) {case 0: if(m==0) t="?\0CTR_EL0\0?\0?\0?\0?\0?\0DCZID_EL0\0"; break;case 4: switch(m) {case 2: t="NZCV\0DAIF\0"; break;case 4: t="FPCR\0FPSR\0"; break;case 5: t="DSPSR_EL0\0DLR_EL0\0"; break;} break;case 9: switch(m) {case 12: t="PMCR_EL0\0PMCNTENSET_EL0\0PMCNTENCLR_EL0\0PMOVSCLR_EL0\0PMSWINC_EL0\0PMSELR_EL0\0PMCEID0_EL0\0PMCEID1_EL0\0"; break;case 13: t="PMCCNTR_EL0\0PMXEVTYPER_EL0\0PMXEVCNTR_EL0\0"; break;case 14: t="PMUSERENR_EL0\0?\0?\0PMOVSSET_EL0\0"; break;} break; +case 13: if(m==0) t="?\0?\0TPIDR_EL0\0TPIDRRO_EL0\0"; break;case 14: switch(m) {case 0: t="CNTFRQ_EL0\0CNTPCT_EL0\0CNTVCT_EL0\0"; break;case 2: t="CNTP_TVAL_EL0\0CNTP_CTL_EL0\0CNTP_CVAL_EL0\0"; break;case 3: t="CNTV_TVAL_EL0\0CNTV_CTL_EL0\0CNTV_CVAL_EL0\0"; break;} break;} break;case 4: switch(n) {case 0: if(m==0) t="VPIDR_EL2\0?\0?\0?\0?\0VMPIDR_EL2\0"; break;case 1: switch(m) {case 0: t="SCTLR_EL2\0ACTLR_EL2\0"; break;case 1: t="HCR_EL2\0MDCR_EL2\0CPTR_EL2\0HSTR_EL2\0?\0?\0?\0HACR_EL2\0"; break;case 2: t="ZCR_EL2\0"; break;} break;case 2: switch(m) {case 0: t="TTBR0_EL2\0?\0TCR_EL2\0"; break;case 1: t="VTTBR0_EL2\0?\0VTCR_EL2\0"; break;} break;case 3: if(m==0) t="DACR32_EL2\0"; break;case 4: switch(m) {case 0: t="SPSR_EL2\0ELR_EL2\0"; break;case 1: t="SP_EL1\0"; break;case 3: t="SPSR_irq\0SPSR_abt\0SPSR_und\0SPSR_fiq\0"; break;} break;case 5: switch(m) {case 0: t="?\0IFSR32_EL2\0"; break;case 1: t="AFSR0_EL2\0AFSR1_EL2\0"; break;case 2: t="ESR_EL2\0?\0?\0VSESR_EL2\0"; break;case 3: t="FPEXC32_EL2\0"; break;} break;case 6: if(m==0) t="FAR_EL2\0?\0?\0?\0HPFAR_EL2\0"; break;case 9: if(m==9) t="PMSCR_EL2\0"; break;case 10: switch(m) {case 2: t="MAIR_EL2\0"; break;case 3: t="AMAIR_EL2\0"; break;} break;case 12: switch(m) {case 0: t="VBAR_EL2\0RVBAR_EL2\0RMR_EL2\0"; break;case 1: t="?\0VDISR_EL2\0"; break;case 8: t="ICH_AP0R0_EL2\0ICH_AP0R1_EL2\0ICH_AP0R2_EL2\0ICH_AP0R3_EL2\0"; break;case 9: t="ICH_AP1R0_EL2\0ICH_AP1R1_EL2\0ICH_AP1R2_EL2\0ICH_AP1R3_EL2\0ICC_SRE_EL2\0"; break;case 11: t="ICH_HCR_EL2\0ICH_VTR_EL2\0ICH_MISR_EL2\0ICH_EISR_EL2\0?\0ICH_ELRSR_EL2\0?\0ICH_VMCR_EL2\0"; break;case 12: t="ICH_LR0_EL2\0ICH_LR1_EL2\0ICH_LR2_EL2\0ICH_LR3_EL2\0ICH_LR4_EL2\0ICH_LR5_EL2\0ICH_LR6_EL2\0ICH_LR7_EL2\0"; break;case 13: t="ICH_LR8_EL2\0ICH_LR9_EL2\0ICH_LR10_EL2\0ICH_LR11_EL2\0ICH_LR12_EL2\0ICH_LR13_EL2\0ICH_LR14_EL2\0ICH_LR15_EL2\0"; break;} break;case 13: if(m==0) t="?\0CONTEXTIDR_EL2\0TPIDR_EL2\0"; break;case 14: switch(m) {case 0: t="?\0?\0?\0CNTVOFF_EL2\0"; break;case 1: t="CNTHCTL_EL2\0"; break;case 2: t="CNTHP_TVAL_EL2\0CNTHP_CTL_EL2\0CNTHP_CVAL_EL2\0"; break;case 3: t="CNTHV_TVAL_EL2\0CNTHV_CTL_EL2\0CNTHV_CVAL_EL2\0"; break;} break;} break;case 5: if(n==4&&m==0) t="SPSR_EL12\0ELR_EL12\0"; break;case 6: if(n==4&&m==1) t="SP_EL2\0"; break;case 7: if(n==14&&m==2) t="CNTPS_TVAL_EL1\0CNTPS_CTL_EL1\0CNTPS_CVAL_EL1\0"; break;} break;}return t?disasm_str(t,j):NULL;} uint64_t disasm_dbm(int k, int j, int i) {int e=(k<<6)|(~j&0x3F),l=6;uint64_t m,r;while(l>=0 && !(e&(1<>(64-(j+1));m=(m>>i)|(m<<(e-i));r=m;i=e;while(i<64){r|=(m<>6)&0x8)|((ic32_5)&0x7); + op=((ic32>>6)&0x8)|((ic32_5)&0x7); } else if((ic32&0xfffff0ff)==0xd503305f) { names="clrex\0"; - i=((ic32_11)&1?(0xffffffff<<4):0)|((ic32_8)&0xf); - args[0]=disasm_arg_i_opt; + i=((ic32_11)&1?(0xffffffff<<4):0)|((ic32_8)&0xf); + args[0]=disasm_arg_i_opt; } else if((ic32&0xfffff09f)==0xd503309f) { names="dsb\0dmb\0?\0isb\0"; - op=((ic32_5)&0x3); j=((ic32_8)&0xf); - args[0]=disasm_arg_sh; + op=((ic32_5)&0x3); j=((ic32_8)&0xf); + args[0]=disasm_arg_sh; } else if((ic32&0xfff8f01f)==0xd500401f) { names="msr\0"; - i=((ic32_11)&1?(0xffffffff<<4):0)|((ic32_8)&0xf); p=((ic32_5)&0x7); - args[0]=disasm_arg_pstate; args[1]=disasm_arg_i; + i=((ic32_11)&1?(0xffffffff<<4):0)|((ic32_8)&0xf); p=((ic32_5)&0x7); + args[0]=disasm_arg_pstate; args[1]=disasm_arg_i; } else if((ic32&0xffffff80)==0xd5087600) { names="dc\0"; - d=((ic32_5)&0x3); t=((ic32)&0x1f); - args[0]=disasm_arg_dc0; args[1]=disasm_arg_Xt; + d=((ic32_5)&0x3); t=((ic32)&0x1f); + args[0]=disasm_arg_dc0; args[1]=disasm_arg_Xt; } else if((ic32&0xffffff80)==0xd5087800) { names="at\0"; - a=((ic32_5)&0x3); t=((ic32)&0x1f); - args[0]=disasm_arg_a0; args[1]=disasm_arg_Xt; + a=((ic32_5)&0x3); t=((ic32)&0x1f); + args[0]=disasm_arg_a0; args[1]=disasm_arg_Xt; } else if(((ic32_8)&0xffffff)==0xd50879) { names="at\0"; - a=((ic32_5)&0x7); t=((ic32)&0x1f); - args[0]=disasm_arg_a1; args[1]=disasm_arg_Xt; + a=((ic32_5)&0x7); t=((ic32)&0x1f); + args[0]=disasm_arg_a1; args[1]=disasm_arg_Xt; } else if((ic32&0xfffffbe0)==0xd5087a40) { names="dc\0"; - d=((ic32_10)&0x1); t=((ic32)&0x1f); - args[0]=disasm_arg_dc1; args[1]=disasm_arg_Xt; + d=((ic32_10)&0x1); t=((ic32)&0x1f); + args[0]=disasm_arg_dc1; args[1]=disasm_arg_Xt; } else if((ic32&0xffffffe0)==0xd50b7420) { names="dc\0"; - t=((ic32)&0x1f); - args[0]=disasm_arg_ZVA; args[1]=disasm_arg_Xt; + t=((ic32)&0x1f); + args[0]=disasm_arg_ZVA; args[1]=disasm_arg_Xt; } else if((ic32&0xfffffae0)==0xd50b7a20) { names="dc\0"; - d=((ic32_9)&0x2)|((ic32_8)&0x1); t=((ic32)&0x1f); - args[0]=disasm_arg_dc2; args[1]=disasm_arg_Xt; + d=((ic32_9)&0x2)|((ic32_8)&0x1); t=((ic32)&0x1f); + args[0]=disasm_arg_dc2; args[1]=disasm_arg_Xt; } else if((ic32&0xfffcfbc0)==0xd5087100) { names="ic\0"; - c=((ic32_15)&0x2)|((ic32_10)&0x1); t=((ic32)&0x1f); - args[0]=disasm_arg_ic; args[1]=disasm_arg_Xt_opt; + c=((ic32_15)&0x2)|((ic32_10)&0x1); t=((ic32)&0x1f); + args[0]=disasm_arg_ic; args[1]=disasm_arg_Xt_opt; } else if((ic32&0xfffffb60)==0xd50c8020) { names="tlbi\0"; - n=((ic32_9)&0x2)|((ic32>>7)&0x1); t=((ic32)&0x1f); - args[0]=disasm_arg_tl1; args[1]=disasm_arg_Xt_opt; + n=((ic32_9)&0x2)|((ic32>>7)&0x1); t=((ic32)&0x1f); + args[0]=disasm_arg_tl1; args[1]=disasm_arg_Xt_opt; } else if((ic32&0xfffffb40)==0xd50e8300) { names="tlbi\0"; - n=((ic32_8)&0x4)|((ic32>>6)&0x2)|((ic32_5)&0x1); t=((ic32)&0x1f); - args[0]=disasm_arg_tl2; args[1]=disasm_arg_Xt_opt; + n=((ic32_8)&0x4)|((ic32>>6)&0x2)|((ic32_5)&0x1); t=((ic32)&0x1f); + args[0]=disasm_arg_tl2; args[1]=disasm_arg_Xt_opt; } else if(((ic32_8)&0xfffdff)==0xd50c78) { names="at\0"; - a=((ic32_14)&0x8)|((ic32_5)&0x7); t=((ic32)&0x1f); - args[0]=disasm_arg_a2; args[1]=disasm_arg_Xt; + a=((ic32_14)&0x8)|((ic32_5)&0x7); t=((ic32)&0x1f); + args[0]=disasm_arg_a2; args[1]=disasm_arg_Xt; } else if(((ic32_8)&0xfffbfb)==0xd50883) { names="tlbi\0"; - n=((ic32_14)&0x10)|((ic32>>7)&0x8)|((ic32_5)&0x7); t=((ic32)&0x1f); - args[0]=disasm_arg_tl0; args[1]=disasm_arg_Xt_opt; + n=((ic32_14)&0x10)|((ic32>>7)&0x8)|((ic32_5)&0x7); t=((ic32)&0x1f); + args[0]=disasm_arg_tl0; args[1]=disasm_arg_Xt_opt; } else if(((ic32_16)&0xffe0)==0xd500) { names="msr\0"; - p=((ic32_19)&0x3); k=((ic32_16)&0x7); n=((ic32_12)&0xf); m=((ic32_8)&0xf); j=((ic32_5)&0x7); t=((ic32)&0x1f); - args[0]=disasm_arg_sysreg; args[1]=disasm_arg_Xt; + p=((ic32_19)&0x3); k=((ic32_16)&0x7); n=((ic32_12)&0xf); m=((ic32_8)&0xf); j=((ic32_5)&0x7); t=((ic32)&0x1f); + args[0]=disasm_arg_sysreg; args[1]=disasm_arg_Xt; } else if(((ic32_16)&0xfff8)==0xd528) { names="sysl\0"; - i=((ic32_18)&1?(0xffffffff<<3):0)|((ic32_16)&0x7); n=((ic32_12)&0xf); m=((ic32_8)&0xf); j=((ic32_5)&0x7); t=((ic32)&0x1f); - args[0]=disasm_arg_Xt; args[1]=disasm_arg_i; args[2]=disasm_arg_Cn; args[3]=disasm_arg_Cm; args[4]=disasm_arg_j; + i=((ic32_18)&1?(0xffffffff<<3):0)|((ic32_16)&0x7); n=((ic32_12)&0xf); m=((ic32_8)&0xf); j=((ic32_5)&0x7); t=((ic32)&0x1f); + args[0]=disasm_arg_Xt; args[1]=disasm_arg_i; args[2]=disasm_arg_Cn; args[3]=disasm_arg_Cm; args[4]=disasm_arg_j; } else if(((ic32_16)&0xffe0)==0xd520) { names="mrs\0"; - p=((ic32_19)&0x3); k=((ic32_16)&0x7); n=((ic32_12)&0xf); m=((ic32_8)&0xf); j=((ic32_5)&0x7); t=((ic32)&0x1f); - args[0]=disasm_arg_Xt; args[1]=disasm_arg_sysreg; + p=((ic32_19)&0x3); k=((ic32_16)&0x7); n=((ic32_12)&0xf); m=((ic32_8)&0xf); j=((ic32_5)&0x7); t=((ic32)&0x1f); + args[0]=disasm_arg_Xt; args[1]=disasm_arg_sysreg; } else if((ic32&0xff9ffc1f)==0xd61f0000) { names="br\0blr\0ret\0"; - op=((ic32_21)&0x3); n=((ic32_5)&0x1f); - args[0]=disasm_arg_Xn; + op=((ic32_21)&0x3); n=((ic32_5)&0x1f); + args[0]=disasm_arg_Xn; } else if((ic32&0xffdfffff)==0xd69f03e0) { names="eret\0drps\0"; - op=((ic32_21)&0x1); + op=((ic32_21)&0x1); } else if(((ic32_24)&0xff)==0xd8) { names="prfm\0"; - i=((ic32_23)&1?(0xffffffff<<19):0)|((ic32_5)&0x7ffff); t=((ic32)&0x1f); - args[0]=disasm_arg_prf_op; args[1]=disasm_arg_labeli4; + i=((ic32_23)&1?(0xffffffff<<19):0)|((ic32_5)&0x7ffff); t=((ic32)&0x1f); + args[0]=disasm_arg_prf_op; args[1]=disasm_arg_labeli4; } else if(((ic32_8)&0xffe00c)==0xf88000) { names="prfum\0"; - i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_prf_op; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; + i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_prf_op; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; } else if(((ic32_8)&0xffe00c)==0xf8a008) { names="prfm\0"; - m=((ic32_16)&0x1f); o=((ic32_13)&0x7); j=((ic32_12)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_prf_op; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_Rom; args[4]=disasm_arg_amountj3; args[5]=disasm_arg_offe; + m=((ic32_16)&0x1f); o=((ic32_13)&0x7); j=((ic32_12)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_prf_op; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_Rom; args[4]=disasm_arg_amountj3; args[5]=disasm_arg_offe; } else if(((ic32_16)&0xffc0)==0xf980) { names="prfm\0"; - j=((ic32_10)&0xfff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_prf_op; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_j_opt; args[4]=disasm_arg_offe; + j=((ic32_10)&0xfff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_prf_op; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_j_opt; args[4]=disasm_arg_offe; } else if(((ic32_16)&0xbfe0)==0x8820) { names="stxp\0stlxp\0"; - op=((ic32_15)&0x1); s=((ic32_30)&0x1); d=((ic32_16)&0x1f); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Wd; args[1]=disasm_arg_Rt; args[2]=disasm_arg_Rm; args[3]=disasm_arg_offs; args[4]=disasm_arg_XnS; args[5]=disasm_arg_offe; + op=((ic32_15)&0x1); s=((ic32_30)&0x1); d=((ic32_16)&0x1f); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Wd; args[1]=disasm_arg_Rt; args[2]=disasm_arg_Rm; args[3]=disasm_arg_offs; args[4]=disasm_arg_XnS; args[5]=disasm_arg_offe; } else if(((ic32_16)&0xbfff)==0x887f) { names="ldxp\0ldaxp\0"; - op=((ic32_15)&0x1); s=((ic32_30)&0x1); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rm; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_offe; + op=((ic32_15)&0x1); s=((ic32_30)&0x1); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rm; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_offe; } else if(((ic32_8)&0xbfa07c)==0x88207c) { names="cas\0casl\0casa\0casal\0"; - op=((ic32_21)&0x2)|((ic32_15)&0x1); s=((ic32_30)&0x1); d=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rd; args[1]=disasm_arg_Rt; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_offe; + op=((ic32_21)&0x2)|((ic32_15)&0x1); s=((ic32_30)&0x1); d=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rd; args[1]=disasm_arg_Rt; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_offe; } else if(((ic32_8)&0xbf3f7c)==0x881f7c) { names="?\0?\0ldxr\0ldaxr\0stllr\0stlr\0ldlar\0ldar\0"; - op=((ic32_21)&0x6)|((ic32_15)&0x1); s=((ic32_30)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_offe; + op=((ic32_21)&0x6)|((ic32_15)&0x1); s=((ic32_30)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_offe; } else if(((ic32_8)&0xbfa00c)==0xb80004) { names="str\0ldr\0"; - op=((ic32_22)&0x1); s=((ic32_30)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_offe; args[4]=disasm_arg_i_opt; + op=((ic32_22)&0x1); s=((ic32_30)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_offe; args[4]=disasm_arg_i_opt; } else if(((ic32_8)&0xbfa004)==0xb80000) { names="stur\0sttr\0ldur\0ldtr\0"; - op=((ic32_21)&0x2)|((ic32_11)&0x1); s=((ic32_30)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; + op=((ic32_21)&0x2)|((ic32_11)&0x1); s=((ic32_30)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; } else if(((ic32_8)&0xbfa004)==0xb80004) { names="str\0ldr\0"; - op=((ic32_22)&0x1); s=((ic32_30)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); p=((ic32_11)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; + op=((ic32_22)&0x1); s=((ic32_30)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); p=((ic32_11)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; } else if(((ic32_8)&0xbfa00c)==0xb82008) { names="str\0ldr\0"; - op=((ic32_22)&0x1); s=((ic32_30)&0x1); m=((ic32_16)&0x1f); o=((ic32_13)&0x7); j=((ic32_12)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_Rom; args[4]=disasm_arg_amountjs; args[5]=disasm_arg_offe; + op=((ic32_22)&0x1); s=((ic32_30)&0x1); m=((ic32_16)&0x1f); o=((ic32_13)&0x7); j=((ic32_12)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_Rom; args[4]=disasm_arg_amountjs; args[5]=disasm_arg_offe; } else if(((ic32_8)&0xbf200c)==0xb82000) { names="ldadd\0ldclr\0ldeor\0ldset\0ldsmax\0ldsmin\0ldumax\0ldumin\0swp\0?\0?\0?\0?\0?\0?\0?\0ldaddl\0ldclrl\0ldeorl\0ldsetl\0ldsmaxl\0ldsminl\0ldumaxl\0lduminl\0swpl\0?\0?\0?\0?\0?\0?\0?\0ldadda\0ldclra\0ldeora\0ldseta\0ldsmaxa\0ldsmina\0ldumaxa\0ldumina\0swpa\0?\0?\0?\0?\0?\0?\0?\0ldaddal\0ldclral\0ldeoral\0ldsetal\0ldsmaxal\0ldsminal\0ldumaxal\0lduminal\0swpal\0"; - op=((ic32_18)&0x30)|((ic32_12)&0xf); s=((ic32_30)&0x1); d=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rd; args[1]=disasm_arg_Rt; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_offe; + op=((ic32_18)&0x30)|((ic32_12)&0xf); s=((ic32_30)&0x1); d=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rd; args[1]=disasm_arg_Rt; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_offe; } else if(((ic32_16)&0xbf80)==0xb900) { names="str\0ldr\0"; - op=((ic32_22)&0x1); s=((ic32_30)&0x1); j=((ic32_10)&0xfff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_j_opt; args[4]=disasm_arg_offe; + op=((ic32_22)&0x1); s=((ic32_30)&0x1); j=((ic32_10)&0xfff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_j_opt; args[4]=disasm_arg_offe; } else if(((ic32_16)&0x7fa0)==0x1380) { names="extr\0"; - s=((ic32_31)&0x1); m=((ic32_16)&0x1f); i=((ic32_15)&1?(0xffffffff<<6):0)|((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; args[3]=disasm_arg_i; + s=((ic32_31)&0x1); m=((ic32_16)&0x1f); i=((ic32_15)&1?(0xffffffff<<6):0)|((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; args[3]=disasm_arg_i; } else if(((ic32_24)&0x7c)==0x14) { names="b\0bl\0"; - op=((ic32_31)&0x1); i=((ic32_25)&1?(0xffffffff<<26):0)|((ic32)&0x3ffffff); - args[0]=disasm_arg_labeli4; + op=((ic32_31)&0x1); i=((ic32_25)&1?(0xffffffff<<26):0)|((ic32)&0x3ffffff); + args[0]=disasm_arg_labeli4; } else if(((ic32_8)&0x7fe0fc)==0x1a0000) { names="adc\0"; - s=((ic32_31)&0x1); m=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; + s=((ic32_31)&0x1); m=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; } else if(((ic32_8)&0x7fe080)==0x1ac000) { names="?\0?\0udiv\0sdiv\0?\0?\0?\0?\0lslv\0lsrv\0asrv\0rorv\0?\0?\0?\0?\0crc32b\0crc32h\0crc32w\0crc32x\0crc32cb\0crc32ch\0crc32cw\0crc32cx\0"; - op=((ic32_10)&0x1f); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; + op=((ic32_10)&0x1f); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; } else if(((ic32_8)&0x7fe07c)==0x1b007c) { names="mul\0mneg\0"; - op=((ic32_15)&0x1); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; + op=((ic32_15)&0x1); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; } else if(((ic32_16)&0x7fe0)==0x1b00) { names="madd\0msub\0"; - op=((ic32_15)&0x1); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); d=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; args[3]=disasm_arg_Rd; + op=((ic32_15)&0x1); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); d=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; args[3]=disasm_arg_Rd; } else if(((ic32_8)&0x7ffffc)==0x1eae00) { names="fmov\0"; - s=((ic32_31)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Vn1d; + s=((ic32_31)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Vn1d; } else if(((ic32_8)&0x7ffffc)==0x1eaf00) { names="fmov\0"; - s=((ic32_31)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Vt1d; args[1]=disasm_arg_Rn; + s=((ic32_31)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Vt1d; args[1]=disasm_arg_Rn; } else if(((ic32_16)&0x7f3e)==0x1e02) { names="scvtf\0ucvtf\0"; - op=((ic32_16)&0x1); s=((ic32_31)&0x1); z=((ic32_22)&0x3); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_FPz5t; args[1]=disasm_arg_Rn; args[2]=disasm_arg_fbits; + op=((ic32_16)&0x1); s=((ic32_31)&0x1); z=((ic32_22)&0x3); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_FPz5t; args[1]=disasm_arg_Rn; args[2]=disasm_arg_fbits; } else if(((ic32_16)&0x7f3e)==0x1e18) { names="fcvtzs\0fcvtzu\0"; - op=((ic32_16)&0x1); s=((ic32_31)&0x1); z=((ic32_22)&0x3); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_FPz5n; args[2]=disasm_arg_fbits; + op=((ic32_16)&0x1); s=((ic32_31)&0x1); z=((ic32_22)&0x3); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_FPz5n; args[2]=disasm_arg_fbits; } else if(((ic32_8)&0x7f3afc)==0x1e2200) { names="scvtf\0ucvtf\0fmov\0fmov\0"; - op=((ic32>>17)&0x2)|((ic32_16)&0x1); s=((ic32_31)&0x1); z=((ic32_22)&0x3); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_FPz5t; args[1]=disasm_arg_Rn; + op=((ic32>>17)&0x2)|((ic32_16)&0x1); s=((ic32_31)&0x1); z=((ic32_22)&0x3); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_FPz5t; args[1]=disasm_arg_Rn; } else if(((ic32_8)&0x7f30fc)==0x1e2000) { names="fcvtns\0fcvtnu\0scvtf\0ucvtf\0fcvtas\0fcvtau\0fmov\0fmov\0fcvtns\0fcvtnu\0"; - op=((ic32_16)&0xf); s=((ic32_31)&0x1); z=((ic32_22)&0x3); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_FPz5n; + op=((ic32_16)&0xf); s=((ic32_31)&0x1); z=((ic32_22)&0x3); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_FPz5n; } else if(((ic32_8)&0x7f3efc)==0x1e3000) { names="fcvtms\0fcvtmu\0"; - op=((ic32_16)&0x1); s=((ic32_31)&0x1); z=((ic32_22)&0x3); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_FPz5n; + op=((ic32_16)&0x1); s=((ic32_31)&0x1); z=((ic32_22)&0x3); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_FPz5n; } else if(((ic32_16)&0x7f80)==0x2880) { names="stp\0ldp\0"; - op=((ic32_22)&0x1); s=((ic32_31)&0x1); i=((ic32_21)&1?(0xffffffff<<7):0)|((ic32_15)&0x7f); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rm; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_offe; args[5]=disasm_arg_is4_opt; + op=((ic32_22)&0x1); s=((ic32_31)&0x1); i=((ic32_21)&1?(0xffffffff<<7):0)|((ic32_15)&0x7f); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rm; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_offe; args[5]=disasm_arg_is4_opt; } else if(((ic32_24)&0x7e)==0x28) { names="stnp\0ldnp\0stp\0ldp\0"; - op=((ic32_23)&0x2)|((ic32_22)&0x1); s=((ic32_31)&0x1); p=((ic32_23)&0x1); i=((ic32_21)&1?(0xffffffff<<7):0)|((ic32_15)&0x7f); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rm; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_is4_opt; args[5]=disasm_arg_offe; + op=((ic32_23)&0x2)|((ic32_22)&0x1); s=((ic32_31)&0x1); p=((ic32_23)&0x1); i=((ic32_21)&1?(0xffffffff<<7):0)|((ic32_15)&0x7f); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rm; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_is4_opt; args[5]=disasm_arg_offe; } else if(((ic32_24)&0x7e)==0x34) { names="cbz\0cbnz\0"; - op=((ic32_24)&0x1); s=((ic32_31)&0x1); i=((ic32_23)&1?(0xffffffff<<19):0)|((ic32_5)&0x7ffff); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_labeli4; + op=((ic32_24)&0x1); s=((ic32_31)&0x1); i=((ic32_23)&1?(0xffffffff<<19):0)|((ic32_5)&0x7ffff); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_labeli4; } else if(((ic32_24)&0x7e)==0x36) { names="tbz\0tbnz\0"; - op=((ic32_24)&0x1); b=((ic32_26)&0x20)|((ic32_19)&0x1f); i=((ic32_18)&1?(0xffffffff<<14):0)|((ic32_5)&0x3fff); t=((ic32)&0x1f); - args[0]=disasm_arg_Xt; args[1]=disasm_arg_b; args[2]=disasm_arg_labeli4; + op=((ic32_24)&0x1); b=((ic32_26)&0x20)|((ic32_19)&0x1f); i=((ic32_18)&1?(0xffffffff<<14):0)|((ic32_5)&0x3fff); t=((ic32)&0x1f); + args[0]=disasm_arg_Xt; args[1]=disasm_arg_b; args[2]=disasm_arg_labeli4; } else if(((ic32_8)&0x7fe004)==0x388000) { names="?\0ldtrsb\0ldursw\0ldtrsw\0"; - op=((ic32_30)&0x2)|((ic32_11)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Xt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; + op=((ic32_30)&0x2)|((ic32_11)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Xt; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; } else if((ic32&0x7fe0ffe0)==0x5a0003e0) { names="ngc\0"; - s=((ic32_31)&0x1); m=((ic32_16)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rm; + s=((ic32_31)&0x1); m=((ic32_16)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rm; } else if(((ic32_8)&0x7ffff8)==0x5ac008) { names="rev\0"; - s=((ic32_31)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; + s=((ic32_31)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; } else if(((ic32_8)&0x7fffe8)==0x5ac000) { names="rbit\0rev16\0clz\0cls\0"; - op=((ic32_11)&0x2)|((ic32_10)&0x1); s=((ic32_31)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; - } else - if((ic32&0x7f20001f)==0x6b00001f) { - names="cmp\0"; - s=((ic32_31)&0x1); z=((ic32_22)&0x3); m=((ic32_16)&0x1f); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); - args[0]=disasm_arg_Rn; args[1]=disasm_arg_Rm; args[2]=disasm_arg_shiftj_opt; - } else - if((ic32&0x7f00001f)==0x7100001f) { - names="cmp\0"; - s=((ic32_31)&0x1); j=((ic32_22)&0x3); i=((ic32_21)&1?(0xffffffff<<12):0)|((ic32_10)&0xfff); n=((ic32_5)&0x1f); - args[0]=disasm_arg_RnS; args[1]=disasm_arg_i; args[2]=disasm_arg_j12_opt; + op=((ic32_11)&0x2)|((ic32_10)&0x1); s=((ic32_31)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; } else if(((ic32_8)&0x3fe008)==0x1a8000) { names="csel\0csinc\0csinv\0csneg\0"; - op=((ic32_29)&0x2)|((ic32_10)&0x1); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); c=((ic32_12)&0xf); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; args[3]=disasm_arg_c; + op=((ic32_29)&0x2)|((ic32_10)&0x1); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); c=((ic32_12)&0xf); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; args[3]=disasm_arg_c; } else if(((ic32_24)&0x3f)==0x1c) { names="ldr\0"; - z=((ic32_30)&0x3); i=((ic32_23)&1?(0xffffffff<<19):0)|((ic32_5)&0x7ffff); t=((ic32)&0x1f); - args[0]=disasm_arg_FPt; args[1]=disasm_arg_labeli4; + z=((ic32_30)&0x3); i=((ic32_23)&1?(0xffffffff<<19):0)|((ic32_5)&0x7ffff); t=((ic32)&0x1f); + args[0]=disasm_arg_FPt; args[1]=disasm_arg_labeli4; } else if((ic32&0x3fe0001f)==0x2b20001f) { names="cmn\0cmp\0"; - op=((ic32_30)&0x1); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); o=((ic32_13)&0x7); j=((ic32_10)&0x7); n=((ic32_5)&0x1f); - args[0]=disasm_arg_RnS; args[1]=disasm_arg_Rsom; args[2]=disasm_arg_exts; + op=((ic32_30)&0x1); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); o=((ic32_13)&0x7); j=((ic32_10)&0x7); n=((ic32_5)&0x1f); + args[0]=disasm_arg_RnS; args[1]=disasm_arg_Rsom; args[2]=disasm_arg_exts; } else if(((ic32_16)&0x3f80)==0x2c80) { names="stp\0ldp\0"; - op=((ic32_22)&0x1); z=((ic32_30)&0x3); i=((ic32_21)&1?(0xffffffff<<7):0)|((ic32_15)&0x7f); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_FPt; args[1]=disasm_arg_FPm; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_offe; args[5]=disasm_arg_iz4_opt; + op=((ic32_22)&0x1); z=((ic32_30)&0x3); i=((ic32_21)&1?(0xffffffff<<7):0)|((ic32_15)&0x7f); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_FPt; args[1]=disasm_arg_FPm; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_offe; args[5]=disasm_arg_iz4_opt; } else if(((ic32_24)&0x3e)==0x2c) { names="stnp\0ldnp\0stp\0ldp\0"; - op=((ic32_23)&0x2)|((ic32_22)&0x1); z=((ic32_30)&0x3); p=((ic32_23)&0x1); i=((ic32_21)&1?(0xffffffff<<7):0)|((ic32_15)&0x7f); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_FPt; args[1]=disasm_arg_FPm; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_iz4_opt; args[5]=disasm_arg_offe; + op=((ic32_23)&0x2)|((ic32_22)&0x1); z=((ic32_30)&0x3); p=((ic32_23)&0x1); i=((ic32_21)&1?(0xffffffff<<7):0)|((ic32_15)&0x7f); m=((ic32_10)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_FPt; args[1]=disasm_arg_FPm; args[2]=disasm_arg_offs; args[3]=disasm_arg_XnS; args[4]=disasm_arg_iz4_opt; args[5]=disasm_arg_offe; } else if((ic32&0x3fe00c10)==0x3a400000) { names="ccmn\0ccmp\0"; - op=((ic32_30)&0x1); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); c=((ic32_12)&0xf); n=((ic32_5)&0x1f); j=((ic32)&0xf); - args[0]=disasm_arg_Rn; args[1]=disasm_arg_Rm; args[2]=disasm_arg_j; args[3]=disasm_arg_c; + op=((ic32_30)&0x1); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); c=((ic32_12)&0xf); n=((ic32_5)&0x1f); j=((ic32)&0xf); + args[0]=disasm_arg_Rn; args[1]=disasm_arg_Rm; args[2]=disasm_arg_j; args[3]=disasm_arg_c; } else if((ic32&0x3fe00c10)==0x3a400800) { names="ccmn\0ccmp\0"; - op=((ic32_30)&0x1); s=((ic32_31)&0x1); b=((ic32_16)&0x1f); c=((ic32_12)&0xf); n=((ic32_5)&0x1f); j=((ic32)&0xf); - args[0]=disasm_arg_Rn; args[1]=disasm_arg_b; args[2]=disasm_arg_j; args[3]=disasm_arg_c; + op=((ic32_30)&0x1); s=((ic32_31)&0x1); b=((ic32_16)&0x1f); c=((ic32_12)&0xf); n=((ic32_5)&0x1f); j=((ic32)&0xf); + args[0]=disasm_arg_Rn; args[1]=disasm_arg_b; args[2]=disasm_arg_j; args[3]=disasm_arg_c; } else if(((ic32_8)&0x3f200c)==0x3c0000) { names="stur\0ldur\0"; - op=((ic32_22)&0x1); z=((ic32_30)&0x3); s=((ic32_23)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_FPst; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; + op=((ic32_22)&0x1); z=((ic32_30)&0x3); s=((ic32_23)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_FPst; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; } else if(((ic32_8)&0x3f200c)==0x3c0004) { names="str\0ldr\0"; - op=((ic32_22)&0x1); z=((ic32_30)&0x3); s=((ic32_23)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_FPst; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_offe; args[4]=disasm_arg_i_opt; + op=((ic32_22)&0x1); z=((ic32_30)&0x3); s=((ic32_23)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_FPst; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_offe; args[4]=disasm_arg_i_opt; } else if(((ic32_8)&0x3f2004)==0x3c0004) { names="str\0ldr\0"; - op=((ic32_22)&0x1); z=((ic32_30)&0x3); s=((ic32_23)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); p=((ic32_11)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_FPst; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; + op=((ic32_22)&0x1); z=((ic32_30)&0x3); s=((ic32_23)&0x1); i=((ic32_20)&1?(0xffffffff<<9):0)|((ic32_12)&0x1ff); p=((ic32_11)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_FPst; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_i_opt; args[4]=disasm_arg_offe; } else if(((ic32_8)&0x3f200c)==0x3c2008) { names="str\0ldr\0"; - op=((ic32_22)&0x1); z=((ic32_30)&0x3); s=((ic32_23)&0x1); m=((ic32_16)&0x1f); o=((ic32_13)&0x7); j=((ic32_12)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_FPst; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_Rom; args[4]=disasm_arg_amountz; args[5]=disasm_arg_offe; + op=((ic32_22)&0x1); z=((ic32_30)&0x3); s=((ic32_23)&0x1); m=((ic32_16)&0x1f); o=((ic32_13)&0x7); j=((ic32_12)&0x1); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_FPst; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_Rom; args[4]=disasm_arg_amountz; args[5]=disasm_arg_offe; } else if(((ic32_24)&0x3f)==0x3d) { names="str\0ldr\0"; - op=((ic32_22)&0x1); z=((ic32_30)&0x3); s=((ic32_23)&0x1); j=((ic32_10)&0xfff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_FPst; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_j_opt; args[4]=disasm_arg_offe; + op=((ic32_22)&0x1); z=((ic32_30)&0x3); s=((ic32_23)&0x1); j=((ic32_10)&0xfff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_FPst; args[1]=disasm_arg_offs; args[2]=disasm_arg_XnS; args[3]=disasm_arg_j_opt; args[4]=disasm_arg_offe; } else if(((ic32_16)&0x1fe0)==0xb20) { names="add\0adds\0sub\0subs\0"; - op=((ic32_29)&0x3); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); o=((ic32_13)&0x7); j=((ic32_10)&0x7); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_RtS; args[1]=disasm_arg_RnS; args[2]=disasm_arg_Rsom; args[3]=disasm_arg_exts; + op=((ic32_29)&0x3); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); o=((ic32_13)&0x7); j=((ic32_10)&0x7); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_RtS; args[1]=disasm_arg_RnS; args[2]=disasm_arg_Rsom; args[3]=disasm_arg_exts; } else if(((ic32_24)&0x1e)==0xa) { names="and\0bic\0add\0?\0orr\0orn\0adds\0?\0eor\0eon\0sub\0?\0ands\0bics\0subs\0"; - op=((ic32_27)&0xc)|((ic32_23)&0x2)|((ic32_21)&0x1); s=((ic32_31)&0x1); z=((ic32_22)&0x3); m=((ic32_16)&0x1f); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; args[3]=disasm_arg_shiftj_opt; + op=((ic32_27)&0xc)|((ic32_23)&0x2)|((ic32_21)&0x1); s=((ic32_31)&0x1); z=((ic32_22)&0x3); m=((ic32_16)&0x1f); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; args[3]=disasm_arg_shiftj_opt; } else if(((ic32_24)&0x1f)==0x10) { names="adr\0adrp\0"; - op=((ic32_31)&0x1); j=((ic32_29)&0x3); i=((ic32_23)&1?(0xffffffff<<19):0)|((ic32_5)&0x7ffff); t=((ic32)&0x1f); - args[0]=disasm_arg_Xt; args[1]=disasm_arg_labelij1; + op=((ic32_31)&0x1); j=((ic32_29)&0x3); i=((ic32_23)&1?(0xffffffff<<19):0)|((ic32_5)&0x7ffff); t=((ic32)&0x1f); + args[0]=disasm_arg_Xt; args[1]=disasm_arg_labelij1; } else if(((ic32_24)&0x1f)==0x11) { names="add\0adds\0sub\0subs\0"; - op=((ic32_29)&0x3); s=((ic32_31)&0x1); j=((ic32_22)&0x3); i=((ic32_21)&1?(0xffffffff<<12):0)|((ic32_10)&0xfff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_RtS; args[1]=disasm_arg_RnS; args[2]=disasm_arg_i; args[3]=disasm_arg_j12_opt; + op=((ic32_29)&0x3); s=((ic32_31)&0x1); j=((ic32_22)&0x3); i=((ic32_21)&1?(0xffffffff<<12):0)|((ic32_10)&0xfff); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_RtS; args[1]=disasm_arg_RnS; args[2]=disasm_arg_i; args[3]=disasm_arg_j12_opt; } else if(((ic32_16)&0x1f80)==0x1200) { names="and\0orr\0eor\0ands\0"; - op=((ic32_29)&0x3); s=((ic32_31)&0x1); k=((ic32_22)&0x1); i=((ic32_21)&1?(0xffffffff<<6):0)|((ic32_16)&0x3f); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_RtS; args[1]=disasm_arg_Rn; args[2]=disasm_arg_ib; + op=((ic32_29)&0x3); s=((ic32_31)&0x1); k=((ic32_22)&0x1); i=((ic32_21)&1?(0xffffffff<<6):0)|((ic32_16)&0x3f); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_RtS; args[1]=disasm_arg_Rn; args[2]=disasm_arg_ib; } else if(((ic32_16)&0x1f80)==0x1280) { names="movn\0?\0movz\0movk\0"; - op=((ic32_29)&0x3); s=((ic32_31)&0x1); j=((ic32_21)&0x3); i=((ic32_20)&1?(0xffffffff<<16):0)|((ic32_5)&0xffff); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_i; args[2]=disasm_arg_j16_opt; + op=((ic32_29)&0x3); s=((ic32_31)&0x1); j=((ic32_21)&0x3); i=((ic32_20)&1?(0xffffffff<<16):0)|((ic32_5)&0xffff); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_i; args[2]=disasm_arg_j16_opt; } else if(((ic32_16)&0x1f80)==0x1300) { names="sbfm\0bfm\0ubfm\0"; - op=((ic32_29)&0x3); s=((ic32_31)&0x1); i=((ic32_21)&1?(0xffffffff<<6):0)|((ic32_16)&0x3f); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_i; args[3]=disasm_arg_j; + op=((ic32_29)&0x3); s=((ic32_31)&0x1); i=((ic32_21)&1?(0xffffffff<<6):0)|((ic32_16)&0x3f); j=((ic32_10)&0x3f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_i; args[3]=disasm_arg_j; } else if(((ic32_8)&0x1fe0fc)==0x1a0000) { names="adc\0adcs\0sbc\0sbcs\0"; - op=((ic32_29)&0x3); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); - args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; + op=((ic32_29)&0x3); s=((ic32_31)&0x1); m=((ic32_16)&0x1f); n=((ic32_5)&0x1f); t=((ic32)&0x1f); + args[0]=disasm_arg_Rt; args[1]=disasm_arg_Rn; args[2]=disasm_arg_Rm; } else names=NULL; - - if(str!=NULL) { + if(str!=NULL && names==NULL) { + sprintf(str,"0x%08x",ic32); + } + + if(str!=NULL && names!=NULL) { str+=sprintf(str,disasm_str(names,op),disasm_str(conds,c)); if(str-olds<10)om=10-(str-olds);else om=1;for(op=0;op>3)&3), ((t>>1)&3)+1, disasm_str(prf_pol,t&1)); break; + case disasm_arg_prf_op: str+=sprintf(str,"%s L%d %s", disasm_str(prf_typ,(t>>3)&3), ((t>>1)&3)+1, disasm_str(prf_pol,t&1)); break; case disasm_arg_is4_opt: str+=sprintf(str,!i?"":"#0x%x", i<<(2+s)); break; case disasm_arg_FPm: str+=sprintf(str,"%c%d", z==2?'q':(z==1?'d':'s'), m); break; case disasm_arg_iz4_opt: str+=sprintf(str,!i?"":"#0x%x", i<<(2+z)); break; @@ -2018,14 +2011,14 @@ uint64_t disasm(uint64_t addr, char *str) case disasm_arg_FPst: str+=sprintf(str,"%c%d", s==1?'q':(z==3?'d':(z==2?'s':(z==1?'h':'b'))), t); break; case disasm_arg_j_opt: str+=sprintf(str,!j?"":"#0x%x", j); break; case disasm_arg_Rom: str+=sprintf(str,m==31?"%czr":"%c%d", (o&1?'x':'w'), m); break; - case disasm_arg_amountj: str+=sprintf(str,"%s", "%s #%d", disasm_str(extend64,o), j); break; - case disasm_arg_amountz: str+=sprintf(str,"%s", "%s #%d", disasm_str(extend64,o), j?(s?4:z):0); break; - case disasm_arg_amountjs: str+=sprintf(str,"%s", "%s #%d", disasm_str(extend64,o), j?(s?3:2):0); break; - case disasm_arg_amountj2: str+=sprintf(str,"%s", "%s #%d", disasm_str(extend64,o), j?2:0); break; - case disasm_arg_amountj3: str+=sprintf(str,"%s", "%s #%d", disasm_str(extend64,o), j?3:0); break; - case disasm_arg_shiftj_opt: str+=sprintf(str,"%s", !j?"":"%s #%d", disasm_str(shift,z), j); break; + case disasm_arg_amountj: str+=sprintf(str,"%s #%d", disasm_str(extend64,o), j); break; + case disasm_arg_amountz: str+=sprintf(str,"%s #%d", disasm_str(extend64,o), j?(s?4:z):0); break; + case disasm_arg_amountjs: str+=sprintf(str,"%s #%d", disasm_str(extend64,o), j?(s?3:2):0); break; + case disasm_arg_amountj2: str+=sprintf(str,"%s #%d", disasm_str(extend64,o), j?2:0); break; + case disasm_arg_amountj3: str+=sprintf(str,"%s #%d", disasm_str(extend64,o), j?3:0); break; + case disasm_arg_shiftj_opt: str+=sprintf(str, !j?"":"%s #%d", disasm_str(shift,z), j); break; case disasm_arg_Rsom: str+=sprintf(str,m==31?"%czr":"%c%d", (s&&(o&3)==3?'x':'w'), m); break; - case disasm_arg_exts: str+=sprintf(str,"%s", "%s #%d", s?disasm_str(extend64,o):disasm_str(extend32,o), j); break; + case disasm_arg_exts: str+=sprintf(str,"%s #%d", s?disasm_str(extend64,o):disasm_str(extend32,o), j); break; case disasm_arg_Wn: str+=sprintf(str,n==31?"wzr":"w%d", n); break; case disasm_arg_Wm: str+=sprintf(str,m==31?"wzr":"w%d", m); break; case disasm_arg_Xd: str+=sprintf(str,d==31?"xzr":"x%d", d); break; @@ -2041,7 +2034,7 @@ uint64_t disasm(uint64_t addr, char *str) case disasm_arg_FPjt: str+=sprintf(str,"%c%d", j&1?'b':((j&3)==2?'h':((j&7)==4?'s':'d')), t); break; case disasm_arg_Vnj: str+=sprintf(str,"V%d.%c", n, j&1?'b':((j&3)==2?'h':((j&7)==4?'s':'d'))); break; case disasm_arg_FPidx: str+=sprintf(str,"%d", j>>(j&1?1:((j&3)==2?2:((j&7)==4?3:4))), t); break; - case disasm_arg_Vtjq: str+=sprintf(str,"%s", "V%d.%s", t, disasm_str(quantum,(j&1?0:((j&3)==2?2:(j&7)==4?4:6))+q)); break; + case disasm_arg_Vtjq: str+=sprintf(str,"V%d.%s", t, disasm_str(quantum,(j&1?0:((j&3)==2?2:(j&7)==4?4:6))+q)); break; case disasm_arg_Ht: str+=sprintf(str,"h%d", t); break; case disasm_arg_Hn: str+=sprintf(str,"h%d", n); break; case disasm_arg_Hm: str+=sprintf(str,"h%d", m); break; @@ -2049,36 +2042,36 @@ uint64_t disasm(uint64_t addr, char *str) case disasm_arg_VtH1: str+=sprintf(str,"V%d.%dh", t, q?8:4); break; case disasm_arg_VnH1: str+=sprintf(str,"V%d.%dh", n, q?8:4); break; case disasm_arg_VmH1: str+=sprintf(str,"V%d.%dh", m, q?8:4); break; - case disasm_arg_Vtzq: str+=sprintf(str,"%s", "V%d.%s", t, disasm_str(quantum,4+(z*2)+q)); break; - case disasm_arg_Vnzq: str+=sprintf(str,"%s", "V%d.%s", n, disasm_str(quantum,4+(z*2)+q)); break; - case disasm_arg_Vmzq: str+=sprintf(str,"%s", "V%d.%s", m, disasm_str(quantum,4+(z*2)+q)); break; + case disasm_arg_Vtzq: str+=sprintf(str,"V%d.%s", t, disasm_str(quantum,4+(z*2)+q)); break; + case disasm_arg_Vnzq: str+=sprintf(str,"V%d.%s", n, disasm_str(quantum,4+(z*2)+q)); break; + case disasm_arg_Vmzq: str+=sprintf(str,"V%d.%s", m, disasm_str(quantum,4+(z*2)+q)); break; case disasm_arg_simd0: str+=sprintf(str,"#0.0"); break; case disasm_arg_FPz2t: str+=sprintf(str,"%c%d", z==1?'h':'s', t); break; case disasm_arg_FPz2n: str+=sprintf(str,"%c%d", z==1?'h':'s', n); break; case disasm_arg_FPz2m: str+=sprintf(str,"%c%d", z==1?'h':'s', m); break; - case disasm_arg_VnT: str+=sprintf(str,"%s", "V%d.%s", n, disasm_str(quantum,(z<<1)|q)); break; - case disasm_arg_VmT: str+=sprintf(str,"%s", "V%d.%s", m, disasm_str(quantum,(z<<1)|q)); break; + case disasm_arg_VnT: str+=sprintf(str,"V%d.%s", n, disasm_str(quantum,(z<<1)|q)); break; + case disasm_arg_VmT: str+=sprintf(str,"V%d.%s", m, disasm_str(quantum,(z<<1)|q)); break; case disasm_arg_FPz3t: str+=sprintf(str,"%c%d", z==3?'d':(z==2?'s':(z==1?'h':'b')), t); break; case disasm_arg_FPz3n: str+=sprintf(str,"%c%d", z==3?'d':(z==2?'s':(z==1?'h':'b')), n); break; case disasm_arg_FPz4n: str+=sprintf(str,"%c%d", z==2?'d':(z==1?'s':'h'), n); break; - case disasm_arg_VnT3: str+=sprintf(str,"%s", "V%d.%s", n, disasm_str(quantum,(z<<1)+3)); break; + case disasm_arg_VnT3: str+=sprintf(str,"V%d.%s", n, disasm_str(quantum,(z<<1)+3)); break; case disasm_arg_Vn2d: str+=sprintf(str,"V%d.2d", n); break; case disasm_arg_Vn2h: str+=sprintf(str,"V%d.2h", n); break; case disasm_arg_Vnz: str+=sprintf(str,"V%d.2%c", n, z?'d':'s'); break; case disasm_arg_FPz4t: str+=sprintf(str,"%c%d", z==2?'d':(z==1?'s':'h'), t); break; - case disasm_arg_Vtz: str+=sprintf(str,"%s", "V%d.%s", t, disasm_str(quantum,4+(z*2))); break; + case disasm_arg_Vtz: str+=sprintf(str,"V%d.%s", t, disasm_str(quantum,4+(z*2))); break; case disasm_arg_FPz3m: str+=sprintf(str,"%c%d", z==3?'d':(z==2?'s':(z==1?'h':'b')), m); break; case disasm_arg_Dt: str+=sprintf(str,"d%d", t); break; case disasm_arg_Dn: str+=sprintf(str,"d%d", n); break; case disasm_arg_shrshift: str+=sprintf(str,"#%d", ((j>>3)==1?16:((j>>4)==1?32:((j>>5)==1?64:128)))-j); break; - case disasm_arg_Vtj2: str+=sprintf(str,"%s", "V%d.%s", t, disasm_str(quantum,((j>>3)==1?0:((j>>4)==1?2:((j>>5)==1?4:6)))|q)); break; - case disasm_arg_Vnj2: str+=sprintf(str,"%s", "V%d.%s", n, disasm_str(quantum,((j>>3)==1?0:((j>>4)==1?2:((j>>5)==1?4:6)))|q)); break; + case disasm_arg_Vtj2: str+=sprintf(str,"V%d.%s", t, disasm_str(quantum,((j>>3)==1?0:((j>>4)==1?2:((j>>5)==1?4:6)))|q)); break; + case disasm_arg_Vnj2: str+=sprintf(str,"V%d.%s", n, disasm_str(quantum,((j>>3)==1?0:((j>>4)==1?2:((j>>5)==1?4:6)))|q)); break; case disasm_arg_shlshift: str+=sprintf(str,"#%d", j-((j>>3)==1?8:((j>>4)==1?16:((j>>5)==1?32:64)))); break; case disasm_arg_FPnj: str+=sprintf(str,"%c%d", (j>>3)==1?'h':((j>>4)==1?'s':'d'), n); break; - case disasm_arg_VnTa: str+=sprintf(str,"%s", "V%d.%s", n, disasm_str(quantum,((j>>3)==1?3:((j>>4)==1?4:7)))); break; + case disasm_arg_VnTa: str+=sprintf(str,"V%d.%s", n, disasm_str(quantum,((j>>3)==1?3:((j>>4)==1?4:7)))); break; case disasm_arg_FPjt2: str+=sprintf(str,"%c%d", (j>>3)==1?'b':((j>>4)==1?'h':((j>>5)==1?'s':'d')), t); break; case disasm_arg_FPjn2: str+=sprintf(str,"%c%d", (j>>3)==1?'b':((j>>4)==1?'h':((j>>5)==1?'s':'d')), n); break; - case disasm_arg_Vtz3: str+=sprintf(str,"%s", "V%d.%s", t, disasm_str(quantum,(z<<1)+6)); break; + case disasm_arg_Vtz3: str+=sprintf(str,"V%d.%s", t, disasm_str(quantum,(z<<1)+6)); break; case disasm_arg_VmTs: str+=sprintf(str,"V%d.%c[%d]", m, z==1?'h':'s', j); break; case disasm_arg_VmHs: str+=sprintf(str,"V%d.h[%d]", m, j); break; case disasm_arg_VmTs2: str+=sprintf(str,"V%d.%c[%d]", m, z==1?'d':'s', j); break; @@ -2089,14 +2082,14 @@ uint64_t disasm(uint64_t addr, char *str) case disasm_arg_Vtj: str+=sprintf(str,"V%d.%c", t, j&1?'b':((j&3)==2?'h':((j&7)==4?'s':'d'))); break; case disasm_arg_R2n: str+=sprintf(str,n==31?"%czr":"%c%d", ((j&15)==8?'x':'w'), n); break; case disasm_arg_FPidxk: str+=sprintf(str,"%d", k>>(k&1?1:((k&3)==2?2:((k&7)==4?3:4))), t); break; - case disasm_arg_Vtzq2: str+=sprintf(str,"%s", "V%d.%s", t, disasm_str(quantum,2+(z*2)+q)); break; - case disasm_arg_VnT2: str+=sprintf(str,"%s", "V%d.%s", n, disasm_str(quantum,z+3)); break; - case disasm_arg_Vnz3: str+=sprintf(str,"%s", "V%d.%s", n, disasm_str(quantum,(z<<1)+6)); break; - case disasm_arg_Vnzq2: str+=sprintf(str,"%s", "V%d.%s", n, disasm_str(quantum,2+(z*2)+q)); break; + case disasm_arg_Vtzq2: str+=sprintf(str,"V%d.%s", t, disasm_str(quantum,2+(z*2)+q)); break; + case disasm_arg_VnT2: str+=sprintf(str,"V%d.%s", n, disasm_str(quantum,z+3)); break; + case disasm_arg_Vnz3: str+=sprintf(str,"V%d.%s", n, disasm_str(quantum,(z<<1)+6)); break; + case disasm_arg_Vnzq2: str+=sprintf(str,"V%d.%s", n, disasm_str(quantum,2+(z*2)+q)); break; case disasm_arg_shift8: str+=sprintf(str,"#%d", 1<<(z+3)); break; - case disasm_arg_VtT3: str+=sprintf(str,"%s", "V%d.%s", t, disasm_str(quantum,(z<<1)+3)); break; - case disasm_arg_VmT3: str+=sprintf(str,"%s", "V%d.%s", m, disasm_str(quantum,(z<<1)+3)); break; - case disasm_arg_VtT4: str+=sprintf(str,"%s", "V%d.%s", t, disasm_str(quantum,z?8:3)); break; + case disasm_arg_VtT3: str+=sprintf(str,"V%d.%s", t, disasm_str(quantum,(z<<1)+3)); break; + case disasm_arg_VmT3: str+=sprintf(str,"V%d.%s", m, disasm_str(quantum,(z<<1)+3)); break; + case disasm_arg_VtT4: str+=sprintf(str,"V%d.%s", t, disasm_str(quantum,z?8:3)); break; case disasm_arg_imm8: str+=sprintf(str,"#%x", j); break; case disasm_arg_amountk_opt: str+=sprintf(str,!k?"":"lsl #%d", 1<<(k*3)); break; case disasm_arg_amountk2_opt: str+=sprintf(str,!k?"":"msl #%d", 1<<(k*3)); break; @@ -2131,3 +2124,4 @@ uint64_t disasm(uint64_t addr, char *str) #ifdef __cplusplus } #endif + diff --git a/src/jit/codegen_arm.cpp b/src/jit/arm/codegen_arm.cpp similarity index 99% rename from src/jit/codegen_arm.cpp rename to src/jit/arm/codegen_arm.cpp index bc255e1bc..30e15a217 100644 --- a/src/jit/codegen_arm.cpp +++ b/src/jit/arm/codegen_arm.cpp @@ -181,7 +181,7 @@ STATIC_INLINE void raw_pop_preserved_regs(void) { STATIC_INLINE void raw_flags_to_reg(int r) { - uintptr idx = (uintptr) &(regs.ccrflags.nzcv) - (uintptr) ®s; + uintptr idx = (uintptr) &(regflags.nzcv) - (uintptr) ®s; MRS_CPSR(r); if(flags_carry_inverted) { EOR_rri(r, r, ARM_C_FLAG); diff --git a/src/jit/codegen_arm.h b/src/jit/arm/codegen_arm.h similarity index 100% rename from src/jit/codegen_arm.h rename to src/jit/arm/codegen_arm.h diff --git a/src/jit/codegen_armA64.cpp b/src/jit/arm/codegen_arm64.cpp similarity index 65% rename from src/jit/codegen_armA64.cpp rename to src/jit/arm/codegen_arm64.cpp index 54fa726c1..80cd84c14 100644 --- a/src/jit/codegen_armA64.cpp +++ b/src/jit/arm/codegen_arm64.cpp @@ -30,7 +30,7 @@ */ #include "flags_arm.h" -#include +#include /************************************************************************* * Some basic information about the the target CPU * @@ -93,7 +93,7 @@ uae_u8 call_saved[] = {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 1,1,1,1, 1,1 */ static const uae_u8 need_to_preserve[] = {0,0,0,0, 0,0,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,0,0,1, 1,0,0,0}; -#include "codegen_armA64.h" +#include "codegen_arm64.h" #define FIX_INVERTED_CARRY \ if(flags_carry_inverted) { \ @@ -114,7 +114,7 @@ STATIC_INLINE void SIGNED8_IMM_2_REG(W4 r, IM8 v) { } STATIC_INLINE void UNSIGNED16_IMM_2_REG(W4 r, IM16 v) { - MOV_xi(r, v); + MOV_xi(r, v); } STATIC_INLINE void SIGNED16_IMM_2_REG(W4 r, IM16 v) { @@ -143,24 +143,24 @@ STATIC_INLINE void SIGNED16_REG_2_REG(W4 d, RR4 s) { STATIC_INLINE void LOAD_U32(int r, uae_u32 val) { - if((val & 0xffff0000) == 0xffff0000) { - MOVN_xi(r, ~val); - } else { - MOV_xi(r, val); - if(val >> 16) - MOVK_xish(r, val >> 16, 16); - } + if((val & 0xffff0000) == 0xffff0000) { + MOVN_xi(r, ~val); + } else { + MOV_xi(r, val); + if(val >> 16) + MOVK_xish(r, val >> 16, 16); + } } STATIC_INLINE void LOAD_U64(int r, uae_u64 val) { - MOV_xi(r, val); - if((val >> 16) & 0xffff) - MOVK_xish(r, val >> 16, 16); - if((val >> 32) & 0xffff) - MOVK_xish(r, val >> 32, 32); - if(val >> 48) - MOVK_xish(r, val >> 48, 48); + MOV_xi(r, val); + if((val >> 16) & 0xffff) + MOVK_xish(r, val >> 16, 16); + if((val >> 32) & 0xffff) + MOVK_xish(r, val >> 32, 32); + if(val >> 48) + MOVK_xish(r, val >> 48, 48); } @@ -171,24 +171,24 @@ STATIC_INLINE void raw_push_regs_to_preserve(void) { } STATIC_INLINE void raw_pop_preserved_regs(void) { - LDP_xxXpost(27, 28, RSP_INDEX, 16); + LDP_xxXpost(27, 28, RSP_INDEX, 16); } STATIC_INLINE void raw_flags_to_reg(int r) { - uintptr idx = (uintptr) &(regs.ccrflags.nzcv) - (uintptr) ®s; + uintptr idx = (uintptr) &(regflags.nzcv) - (uintptr) ®s; MRS_NZCV_x(r); if(flags_carry_inverted) { - EOR_xxCflag(r, r); - MSR_NZCV_x(r); - flags_carry_inverted = false; + EOR_xxCflag(r, r); + MSR_NZCV_x(r); + flags_carry_inverted = false; } STR_wXi(r, R_REGSTRUCT, idx); - live.state[FLAGTMP].status = INMEM; - live.state[FLAGTMP].realreg = -1; - /* We just "evicted" FLAGTMP. */ - live.nat[r].nholds = 0; + live.state[FLAGTMP].status = INMEM; + live.state[FLAGTMP].realreg = -1; + /* We just "evicted" FLAGTMP. */ + live.nat[r].nholds = 0; } STATIC_INLINE void raw_reg_to_flags(int r) @@ -213,66 +213,66 @@ LENDFUNC(WRITE,RMW,1,compemu_raw_inc_opcount,(IM16 op)) LOWFUNC(WRITE,READ,1,compemu_raw_cmp_pc,(IMPTR s)) { - /* s is always >= NATMEM_OFFSET and < NATMEM_OFFSET + max. Amiga mem */ - clobber_flags(); - - uintptr idx = (uintptr) &(regs.pc_p) - (uintptr) ®s; - LDR_xXi(REG_WORK1, R_REGSTRUCT, idx); // regs.pc_p is 64 bit - - LOAD_U64(REG_WORK2, s); + /* s is always >= NATMEM_OFFSET and < NATMEM_OFFSET + max. Amiga mem */ + clobber_flags(); + + uintptr idx = (uintptr) &(regs.pc_p) - (uintptr) ®s; + LDR_xXi(REG_WORK1, R_REGSTRUCT, idx); // regs.pc_p is 64 bit + + LOAD_U64(REG_WORK2, s); CMP_xx(REG_WORK1, REG_WORK2); } LENDFUNC(WRITE,READ,1,compemu_raw_cmp_pc,(IMPTR s)) LOWFUNC(NONE,WRITE,1,compemu_raw_set_pc_i,(IMPTR s)) { - LOAD_U64(REG_WORK1, s); - uintptr idx = (uintptr) &(regs.pc_p) - (uintptr) ®s; - STR_xXi(REG_WORK1, R_REGSTRUCT, idx); + LOAD_U64(REG_WORK1, s); + uintptr idx = (uintptr) &(regs.pc_p) - (uintptr) ®s; + STR_xXi(REG_WORK1, R_REGSTRUCT, idx); } LENDFUNC(NONE,WRITE,1,compemu_raw_set_pc_i,(IMPTR s)) LOWFUNC(NONE,WRITE,2,compemu_raw_mov_l_mi,(MEMW d, IM32 s)) { - /* d points always to memory in regs struct */ - LOAD_U32(REG_WORK2, s); - uintptr idx = d - (uintptr) ®s; - if(d == (uintptr) &(regs.pc_p)) - STR_xXi(REG_WORK2, R_REGSTRUCT, idx); - else - STR_wXi(REG_WORK2, R_REGSTRUCT, idx); + /* d points always to memory in regs struct */ + LOAD_U32(REG_WORK2, s); + uintptr idx = d - (uintptr) ®s; + if(d == (uintptr) &(regs.pc_p)) + STR_xXi(REG_WORK2, R_REGSTRUCT, idx); + else + STR_wXi(REG_WORK2, R_REGSTRUCT, idx); } LENDFUNC(NONE,WRITE,2,compemu_raw_mov_l_mi,(MEMW d, IM32 s)) LOWFUNC(NONE,WRITE,2,compemu_raw_mov_l_mr,(MEMW d, RR4 s)) { - /* d points always to memory in regs struct */ - uintptr idx = d - (uintptr) ®s; - if(d == (uintptr) &(regs.pc_p)) - STR_xXi(s, R_REGSTRUCT, idx); - else - STR_wXi(s, R_REGSTRUCT, idx); + /* d points always to memory in regs struct */ + uintptr idx = d - (uintptr) ®s; + if(d == (uintptr) &(regs.pc_p)) + STR_xXi(s, R_REGSTRUCT, idx); + else + STR_wXi(s, R_REGSTRUCT, idx); } LENDFUNC(NONE,WRITE,2,compemu_raw_mov_l_mr,(MEMW d, RR4 s)) LOWFUNC(NONE,NONE,2,compemu_raw_mov_l_ri,(W4 d, IM32 s)) { - LOAD_U32(d, s); + LOAD_U32(d, s); } LENDFUNC(NONE,NONE,2,compemu_raw_mov_l_ri,(W4 d, IM32 s)) LOWFUNC(NONE,READ,2,compemu_raw_mov_l_rm,(W4 d, MEMR s)) { - if(s >= (uintptr) ®s && s < ((uintptr) ®s) + sizeof(struct regstruct)) { - uintptr idx = s - (uintptr) ®s; - if(s == (uintptr) &(regs.pc_p)) - LDR_xXi(d, R_REGSTRUCT, idx); - else - LDR_wXi(d, R_REGSTRUCT, idx); - } else { - LOAD_U64(REG_WORK1, s); - LDR_xXi(d, REG_WORK1, 0); - } + if(s >= (uintptr) ®s && s < ((uintptr) ®s) + sizeof(struct regstruct)) { + uintptr idx = s - (uintptr) ®s; + if(s == (uintptr) &(regs.pc_p)) + LDR_xXi(d, R_REGSTRUCT, idx); + else + LDR_wXi(d, R_REGSTRUCT, idx); + } else { + LOAD_U64(REG_WORK1, s); + LDR_xXi(d, REG_WORK1, 0); + } } LENDFUNC(NONE,READ,2,compemu_raw_mov_l_rm,(W4 d, MEMR s)) @@ -284,18 +284,18 @@ LENDFUNC(NONE,NONE,2,compemu_raw_mov_l_rr,(W4 d, RR4 s)) LOWFUNC(WRITE,RMW,1,compemu_raw_dec_m,(MEMRW d)) { - clobber_flags(); + clobber_flags(); - LOAD_U64(REG_WORK1, d); - LDR_wXi(REG_WORK2, REG_WORK1, 0); - SUBS_wwi(REG_WORK2, REG_WORK2, 1); - STR_wXi(REG_WORK2, REG_WORK1, 0); + LOAD_U64(REG_WORK1, d); + LDR_wXi(REG_WORK2, REG_WORK1, 0); + SUBS_wwi(REG_WORK2, REG_WORK2, 1); + STR_wXi(REG_WORK2, REG_WORK1, 0); } LENDFUNC(WRITE,RMW,1,compemu_raw_dec_m,(MEMRW ds)) STATIC_INLINE void compemu_raw_call(uintptr t) { - LOAD_U64(REG_WORK1, t); + LOAD_U64(REG_WORK1, t); STR_xXpre(RLR_INDEX, RSP_INDEX, -16); BLR_x(REG_WORK1); @@ -311,8 +311,8 @@ STATIC_INLINE void compemu_raw_call_r(RR4 r) STATIC_INLINE void compemu_raw_jcc_l_oponly(int cc) { - FIX_INVERTED_CARRY - + FIX_INVERTED_CARRY + switch (cc) { case NATIVE_CC_HI: // HI BEQ_i(2); // beq no jump @@ -323,7 +323,7 @@ STATIC_INLINE void compemu_raw_jcc_l_oponly(int cc) BEQ_i(2); // beq jump BCC_i(2); // bcc no jump // jump - B_i(0); + B_i(0); // no jump break; @@ -333,20 +333,20 @@ STATIC_INLINE void compemu_raw_jcc_l_oponly(int cc) break; case NATIVE_CC_F_OGE: // Jump if valid and greater or equal - BVS_i(2); // do not jump if NaN + BVS_i(2); // do not jump if NaN BCS_i(0); // jump if carry set break; - + case NATIVE_CC_F_OLT: // Jump if vaild and less than BVS_i(2); // do not jump if NaN BCC_i(0); // jump if carry cleared break; - + case NATIVE_CC_F_OLE: // Jump if valid and less or equal BVS_i(2); // do not jump if NaN BLE_i(0); // jump if less or equal break; - + case NATIVE_CC_F_OGL: // Jump if valid and greator or less BVS_i(2); // do not jump if NaN BNE_i(0); // jump if not equal @@ -355,108 +355,108 @@ STATIC_INLINE void compemu_raw_jcc_l_oponly(int cc) case NATIVE_CC_F_OR: // Jump if valid BVC_i(0); break; - + case NATIVE_CC_F_UN: // Jump if NAN - BVS_i(0); + BVS_i(0); break; case NATIVE_CC_F_UEQ: // Jump if NAN or equal BVS_i(2); // jump if NaN BNE_i(2); // do not jump if greater or less // jump - B_i(0); + B_i(0); break; case NATIVE_CC_F_UGT: // Jump if NAN or greater than BVS_i(2); // jump if NaN BLS_i(2); // do not jump if lower or same // jump - B_i(0); + B_i(0); break; case NATIVE_CC_F_UGE: // Jump if NAN or greater or equal BVS_i(2); // jump if NaN BMI_i(2); // do not jump if lower // jump - B_i(0); + B_i(0); break; case NATIVE_CC_F_ULT: // Jump if NAN or less than BVS_i(2); // jump if NaN BGE_i(2); // do not jump if greater or equal // jump - B_i(0); + B_i(0); break; case NATIVE_CC_F_ULE: // Jump if NAN or less or equal BVS_i(2); // jump if NaN BGT_i(2); // do not jump if greater // jump - B_i(0); + B_i(0); break; - + default: - CC_B_i(cc, 0); + CC_B_i(cc, 0); break; } - // emit of target into last branch will be done by caller + // emit of target into last branch will be done by caller } STATIC_INLINE void compemu_raw_handle_except(IM32 cycles) { - uae_u32* branchadd; + uae_u32* branchadd; - clobber_flags(); + clobber_flags(); - uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); - LDR_wXi(REG_WORK1, R_REGSTRUCT, idx); + uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); + LDR_wXi(REG_WORK1, R_REGSTRUCT, idx); branchadd = (uae_u32*)get_target(); - CBZ_wi(REG_WORK1, 0); // no exception, jump to next instruction - - LOAD_U32(REG_PAR1, cycles); - uae_u32* branchadd2 = (uae_u32*)get_target(); - B_i(0); // - write_jmp_target(branchadd2, (uintptr)popall_execute_exception); - + CBZ_wi(REG_WORK1, 0); // no exception, jump to next instruction + + LOAD_U32(REG_PAR1, cycles); + uae_u32* branchadd2 = (uae_u32*)get_target(); + B_i(0); // + write_jmp_target(branchadd2, (uintptr)popall_execute_exception); + // Write target of next instruction write_jmp_target(branchadd, (uintptr)get_target()); } LOWFUNC(NONE,WRITE,1,compemu_raw_execute_normal,(MEMR s)) { - LOAD_U64(REG_WORK1, s); - LDR_xXi(REG_WORK1, REG_WORK1, 0); - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // - write_jmp_target(branchadd, (uintptr)popall_execute_normal_setpc); + LOAD_U64(REG_WORK1, s); + LDR_xXi(REG_WORK1, REG_WORK1, 0); + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // + write_jmp_target(branchadd, (uintptr)popall_execute_normal_setpc); } LENDFUNC(NONE,WRITE,1,compemu_raw_execute_normal,(MEMR s)) LOWFUNC(NONE,WRITE,1,compemu_raw_check_checksum,(MEMR s)) { - LOAD_U64(REG_WORK1, s); - LDR_xXi(REG_WORK1, REG_WORK1, 0); - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // - write_jmp_target(branchadd, (uintptr)popall_check_checksum_setpc); + LOAD_U64(REG_WORK1, s); + LDR_xXi(REG_WORK1, REG_WORK1, 0); + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // + write_jmp_target(branchadd, (uintptr)popall_check_checksum_setpc); } LENDFUNC(NONE,WRITE,1,compemu_raw_check_checksum,(MEMR s)) LOWFUNC(NONE,WRITE,1,compemu_raw_exec_nostats,(IMPTR s)) { - LOAD_U64(REG_WORK1, s); - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // - write_jmp_target(branchadd, (uintptr)popall_exec_nostats_setpc); + LOAD_U64(REG_WORK1, s); + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // + write_jmp_target(branchadd, (uintptr)popall_exec_nostats_setpc); } LENDFUNC(NONE,WRITE,1,compemu_raw_exec_nostats,(IMPTR s)) STATIC_INLINE void compemu_raw_maybe_recompile(void) { - BGE_i(2); - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); - write_jmp_target(branchadd, (uintptr)popall_recompile_block); + BGE_i(2); + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); + write_jmp_target(branchadd, (uintptr)popall_recompile_block); } STATIC_INLINE void compemu_raw_jmp(uintptr t) @@ -466,16 +466,16 @@ STATIC_INLINE void compemu_raw_jmp(uintptr t) B_i(0); write_jmp_target((uae_u32*)loc, t); } else { - LDR_xPCi(REG_WORK1, 8); - BR_x(REG_WORK1); - emit_longlong(t); - } + LDR_xPCi(REG_WORK1, 8); + BR_x(REG_WORK1); + emit_quad(t); + } } STATIC_INLINE void compemu_raw_jmp_pc_tag(void) { - uintptr idx = (uintptr)®s.pc_p - (uintptr)®s; - LDRH_wXi(REG_WORK1, R_REGSTRUCT, idx); + uintptr idx = (uintptr)®s.pc_p - (uintptr)®s; + LDRH_wXi(REG_WORK1, R_REGSTRUCT, idx); idx = (uintptr)®s.cache_tags - (uintptr)®s; LDR_xXi(REG_WORK2, R_REGSTRUCT, idx); LDR_xXxLSLi(REG_WORK1, REG_WORK2, REG_WORK1, 1); @@ -484,111 +484,109 @@ STATIC_INLINE void compemu_raw_jmp_pc_tag(void) STATIC_INLINE void compemu_raw_maybe_cachemiss(void) { - BEQ_i(2); - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); - write_jmp_target(branchadd, (uintptr)popall_cache_miss); + BEQ_i(2); + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); + write_jmp_target(branchadd, (uintptr)popall_cache_miss); } STATIC_INLINE void compemu_raw_maybe_do_nothing(IM32 cycles) { - uintptr idx = (uintptr)®s.spcflags - (uintptr) ®s; - LDR_wXi(REG_WORK1, R_REGSTRUCT, idx); - uae_s8 *branchadd = (uae_s8 *)get_target(); - CBZ_wi(REG_WORK1, 0); // - - idx = (uintptr)&countdown - (uintptr) ®s; - LDR_wXi(REG_WORK2, R_REGSTRUCT, idx); - if(cycles >= 0 && cycles <= 0xfff) { - SUB_wwi(REG_WORK2, REG_WORK2, cycles); - } else { - LOAD_U32(REG_WORK1, cycles); - SUB_www(REG_WORK2, REG_WORK2, REG_WORK1); - } - STR_wXi(REG_WORK2, R_REGSTRUCT, idx); + uintptr idx = (uintptr)®s.spcflags - (uintptr) ®s; + LDR_wXi(REG_WORK1, R_REGSTRUCT, idx); + uae_s8 *branchadd = (uae_s8 *)get_target(); + CBZ_wi(REG_WORK1, 0); // + + idx = (uintptr)&countdown - (uintptr) ®s; + LDR_wXi(REG_WORK2, R_REGSTRUCT, idx); + if(cycles >= 0 && cycles <= 0xfff) { + SUB_wwi(REG_WORK2, REG_WORK2, cycles); + } else { + LOAD_U32(REG_WORK1, cycles); + SUB_www(REG_WORK2, REG_WORK2, REG_WORK1); + } + STR_wXi(REG_WORK2, R_REGSTRUCT, idx); - uae_u32* branchadd2 = (uae_u32*)get_target(); - B_i(0); - write_jmp_target(branchadd2, (uintptr)popall_do_nothing); + uae_u32* branchadd2 = (uae_u32*)get_target(); + B_i(0); + write_jmp_target(branchadd2, (uintptr)popall_do_nothing); - // - write_jmp_target((uae_u32 *)branchadd, (uintptr)get_target()); + // + write_jmp_target((uae_u32 *)branchadd, (uintptr)get_target()); } // Optimize access to struct regstruct with and memory with fixed registers LOWFUNC(NONE,NONE,1,compemu_raw_init_r_regstruct,(IMPTR s)) { - LOAD_U64(R_REGSTRUCT, s); + LOAD_U64(R_REGSTRUCT, s); uintptr offsmem = (uintptr)&NATMEM_OFFSET - (uintptr) ®s; - LDR_xXi(R_MEMSTART, R_REGSTRUCT, offsmem); + LDR_xXi(R_MEMSTART, R_REGSTRUCT, offsmem); } LENDFUNC(NONE,NONE,1,compemu_raw_init_r_regstruct,(IMPTR s)) // Handle end of compiled block LOWFUNC(NONE,NONE,2,compemu_raw_endblock_pc_inreg,(RR4 rr_pc, IM32 cycles)) { - // countdown -= scaled_cycles(totcycles); - uintptr offs = (uintptr)&countdown - (uintptr)®s; + // countdown -= scaled_cycles(totcycles); + uintptr offs = (uintptr)&countdown - (uintptr)®s; LDR_wXi(REG_WORK1, R_REGSTRUCT, offs); - if(cycles >= 0 && cycles <= 0xfff) { - SUB_wwi(REG_WORK1, REG_WORK1, cycles); + if(cycles >= 0 && cycles <= 0xfff) { + SUB_wwi(REG_WORK1, REG_WORK1, cycles); } else { - LOAD_U32(REG_WORK2, cycles); - SUB_www(REG_WORK1, REG_WORK1, REG_WORK2); - } + LOAD_U32(REG_WORK2, cycles); + SUB_www(REG_WORK1, REG_WORK1, REG_WORK2); + } STR_wXi(REG_WORK1, R_REGSTRUCT, offs); TBNZ_xii(REG_WORK1, 31, 5); // test sign and branch if set (negative) - UBFIZ_xxii(rr_pc, rr_pc, 0, 16); // apply TAGMASK + UBFIZ_xxii(rr_pc, rr_pc, 0, 16); // apply TAGMASK offs = (uintptr)(®s.cache_tags) - (uintptr)®s; LDR_xXi(REG_WORK1, R_REGSTRUCT, offs); LDR_xXxLSLi(REG_WORK1, REG_WORK1, rr_pc, 3); // cacheline holds pointer -> multiply with 8 - BR_x(REG_WORK1); + BR_x(REG_WORK1); - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); - write_jmp_target(branchadd, (uintptr)popall_do_nothing); + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); + write_jmp_target(branchadd, (uintptr)popall_do_nothing); } LENDFUNC(NONE,NONE,2,compemu_raw_endblock_pc_inreg,(RR4 rr_pc, IM32 cycles)) STATIC_INLINE uae_u32* compemu_raw_endblock_pc_isconst(IM32 cycles, IMPTR v) { - /* v is always >= NATMEM_OFFSET and < NATMEM_OFFSET + max. Amiga mem */ + /* v is always >= NATMEM_OFFSET and < NATMEM_OFFSET + max. Amiga mem */ uae_u32* tba; - // countdown -= scaled_cycles(totcycles); - uintptr offs = (uintptr)&countdown - (uintptr)®s; + // countdown -= scaled_cycles(totcycles); + uintptr offs = (uintptr)&countdown - (uintptr)®s; LDR_wXi(REG_WORK1, R_REGSTRUCT, offs); - if(cycles >= 0 && cycles <= 0xfff) { - SUB_wwi(REG_WORK1, REG_WORK1, cycles); + if(cycles >= 0 && cycles <= 0xfff) { + SUB_wwi(REG_WORK1, REG_WORK1, cycles); } else { - LOAD_U32(REG_WORK2, cycles); - SUB_www(REG_WORK1, REG_WORK1, REG_WORK2); - } + LOAD_U32(REG_WORK2, cycles); + SUB_www(REG_WORK1, REG_WORK1, REG_WORK2); + } STR_wXi(REG_WORK1, R_REGSTRUCT, offs); - TBNZ_xii(REG_WORK1, 31, 2); // test sign and branch if set (negative) + TBNZ_xii(REG_WORK1, 31, 2); // test sign and branch if set (negative) tba = (uae_u32*)get_target(); - B_i(0); // - - LDR_xPCi(REG_WORK1, 12); // - offs = (uintptr)®s.pc_p - (uintptr)®s; - STR_xXi(REG_WORK1, R_REGSTRUCT, offs); - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); - write_jmp_target(branchadd, (uintptr)popall_do_nothing); + B_i(0); // + + LDR_xPCi(REG_WORK1, 12); // + offs = (uintptr)®s.pc_p - (uintptr)®s; + STR_xXi(REG_WORK1, R_REGSTRUCT, offs); + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); + write_jmp_target(branchadd, (uintptr)popall_do_nothing); - emit_longlong(v); + emit_quad(v); - return tba; + return tba; } /************************************************************************* * FPU stuff * *************************************************************************/ -#ifdef USE_JIT_FPU - LOWFUNC(NONE,NONE,2,raw_fmov_rr,(FW d, FR s)) { FMOV_dd(d, s); @@ -597,119 +595,119 @@ LENDFUNC(NONE,NONE,2,raw_fmov_rr,(FW d, FR s)) LOWFUNC(NONE,WRITE,2,compemu_raw_fmov_mr_drop,(MEMW mem, FR s)) { - if(mem >= (uintptr) ®s && mem < (uintptr) ®s + 32760 && ((mem - (uintptr) ®s) & 0x7) == 0) { - STR_dXi(s, R_REGSTRUCT, (mem - (uintptr) ®s)); - } else { - LOAD_U64(REG_WORK1, mem); - STR_dXi(s, REG_WORK1, 0); - } + if(mem >= (uintptr) ®s && mem < (uintptr) ®s + 32760 && ((mem - (uintptr) ®s) & 0x7) == 0) { + STR_dXi(s, R_REGSTRUCT, (mem - (uintptr) ®s)); + } else { + LOAD_U64(REG_WORK1, mem); + STR_dXi(s, REG_WORK1, 0); + } } LENDFUNC(NONE,WRITE,2,compemu_raw_fmov_mr_drop,(MEMW mem, FR s)) LOWFUNC(NONE,READ,2,compemu_raw_fmov_rm,(FW d, MEMR mem)) { - if(mem >= (uintptr) ®s && mem < (uintptr) ®s + 32760 && ((mem - (uintptr) ®s) & 0x7) == 0) { - LDR_dXi(d, R_REGSTRUCT, (mem - (uintptr) ®s)); - } else { - LOAD_U64(REG_WORK1, mem); - LDR_dXi(d, REG_WORK1, 0); - } + if(mem >= (uintptr) ®s && mem < (uintptr) ®s + 32760 && ((mem - (uintptr) ®s) & 0x7) == 0) { + LDR_dXi(d, R_REGSTRUCT, (mem - (uintptr) ®s)); + } else { + LOAD_U64(REG_WORK1, mem); + LDR_dXi(d, REG_WORK1, 0); + } } LENDFUNC(NONE,READ,2,compemu_raw_fmov_rm,(FW d, MEMW mem)) LOWFUNC(NONE,NONE,2,raw_fmov_l_rr,(FW d, RR4 s)) { - SCVTF_dw(d, s); + SCVTF_dw(d, s); } LENDFUNC(NONE,NONE,2,raw_fmov_l_rr,(FW d, RR4 s)) LOWFUNC(NONE,NONE,2,raw_fmov_s_rr,(FW d, RR4 s)) { - FMOV_sw(SCRATCH_F64_1, s); - FCVT_ds(d, SCRATCH_F64_1); + FMOV_sw(SCRATCH_F64_1, s); + FCVT_ds(d, SCRATCH_F64_1); } LENDFUNC(NONE,NONE,2,raw_fmov_s_rr,(FW d, RR4 s)) LOWFUNC(NONE,NONE,2,raw_fmov_w_rr,(FW d, RR2 s)) { - SIGNED16_REG_2_REG(REG_WORK1, s); - SCVTF_dw(d, REG_WORK1); + SIGNED16_REG_2_REG(REG_WORK1, s); + SCVTF_dw(d, REG_WORK1); } LENDFUNC(NONE,NONE,2,raw_fmov_w_rr,(FW d, RR2 s)) LOWFUNC(NONE,NONE,2,raw_fmov_b_rr,(FW d, RR1 s)) { - SIGNED8_REG_2_REG(REG_WORK1, s); - SCVTF_dw(d, REG_WORK1); + SIGNED8_REG_2_REG(REG_WORK1, s); + SCVTF_dw(d, REG_WORK1); } LENDFUNC(NONE,NONE,2,raw_fmov_b_rr,(FW d, RR1 s)) LOWFUNC(NONE,NONE,2,raw_fmov_d_rrr,(FW d, RR4 s1, RR4 s2)) { - BFI_xxii(s1, s2, 32, 32); - FMOV_dx(d, s1); + BFI_xxii(s1, s2, 32, 32); + FMOV_dx(d, s1); } LENDFUNC(NONE,NONE,2,raw_fmov_d_rrr,(FW d, RR4 s1, RR4 s2)) LOWFUNC(NONE,NONE,2,raw_fmov_to_l_rr,(W4 d, FR s)) { - FRINTI_dd(SCRATCH_F64_1, s); - FCVTAS_wd(d, SCRATCH_F64_1); + FRINTI_dd(SCRATCH_F64_1, s); + FCVTAS_wd(d, SCRATCH_F64_1); } LENDFUNC(NONE,NONE,2,raw_fmov_to_l_rr,(W4 d, FR s)) LOWFUNC(NONE,NONE,2,raw_fmov_to_s_rr,(W4 d, FR s)) { - FCVT_sd(SCRATCH_F64_1, s); - FMOV_ws(d, SCRATCH_F64_1); + FCVT_sd(SCRATCH_F64_1, s); + FMOV_ws(d, SCRATCH_F64_1); } LENDFUNC(NONE,NONE,2,raw_fmov_to_s_rr,(W4 d, FR s)) LOWFUNC(NONE,NONE,2,raw_fmov_to_w_rr,(W4 d, FR s, int targetIsReg)) { - FRINTI_dd(SCRATCH_F64_1, s); - FCVTAS_wd(REG_WORK1, SCRATCH_F64_1); - - // maybe saturate... - TBZ_xii(REG_WORK1, 31, 6); // positive - CLS_ww(REG_WORK2, REG_WORK1); // negative: if 17 bits are 1 -> no saturate - SUB_wwi(REG_WORK2, REG_WORK2, 16); - TBZ_xii(REG_WORK2, 31, 7); // done - MOVK_wi(d, 0x8000); // max. negative value in 16 bit - B_i(6); - - // positive - CLZ_ww(REG_WORK2, REG_WORK1); // positive: if 17 bits are 0 -> no saturate - SUB_wwi(REG_WORK2, REG_WORK2, 17); - TBZ_xii(REG_WORK2, 31, 2); - MOV_wi(REG_WORK1, 0x7fff); // max. positive value in 16 bit - - // done - BFI_wwii(d, REG_WORK1, 0, 16); + FRINTI_dd(SCRATCH_F64_1, s); + FCVTAS_wd(REG_WORK1, SCRATCH_F64_1); + + // maybe saturate... + TBZ_xii(REG_WORK1, 31, 6); // positive + CLS_ww(REG_WORK2, REG_WORK1); // negative: if 17 bits are 1 -> no saturate + SUB_wwi(REG_WORK2, REG_WORK2, 16); + TBZ_xii(REG_WORK2, 31, 7); // done + MOVK_wi(d, 0x8000); // max. negative value in 16 bit + B_i(6); + + // positive + CLZ_ww(REG_WORK2, REG_WORK1); // positive: if 17 bits are 0 -> no saturate + SUB_wwi(REG_WORK2, REG_WORK2, 17); + TBZ_xii(REG_WORK2, 31, 2); + MOV_wi(REG_WORK1, 0x7fff); // max. positive value in 16 bit + + // done + BFI_wwii(d, REG_WORK1, 0, 16); } LENDFUNC(NONE,NONE,2,raw_fmov_to_w_rr,(W4 d, FR s, int targetIsReg)) LOWFUNC(NONE,NONE,3,raw_fmov_to_b_rr,(W4 d, FR s, int targetIsReg)) { - FRINTI_dd(SCRATCH_F64_1, s); - FCVTAS_wd(REG_WORK1, SCRATCH_F64_1); + FRINTI_dd(SCRATCH_F64_1, s); + FCVTAS_wd(REG_WORK1, SCRATCH_F64_1); - // maybe saturate... - TBZ_xii(REG_WORK1, 31, 6); // positive - CLS_ww(REG_WORK2, REG_WORK1); // negative: if 25 bits are 1 -> no saturate - SUB_wwi(REG_WORK2, REG_WORK2, 24); - TBZ_xii(REG_WORK2, 31, 7); // done - MOV_wi(REG_WORK1, 0x80); // max. negative value in 8 bit - B_i(5); + // maybe saturate... + TBZ_xii(REG_WORK1, 31, 6); // positive + CLS_ww(REG_WORK2, REG_WORK1); // negative: if 25 bits are 1 -> no saturate + SUB_wwi(REG_WORK2, REG_WORK2, 24); + TBZ_xii(REG_WORK2, 31, 7); // done + MOV_wi(REG_WORK1, 0x80); // max. negative value in 8 bit + B_i(5); - // positive - CLZ_ww(REG_WORK2, REG_WORK1); // positive: if 25 bits are 0 -> no saturate - SUB_wwi(REG_WORK2, REG_WORK2, 25); - TBZ_xii(REG_WORK2, 31, 2); - MOV_wi(REG_WORK1, 0x7f); // max. positive value in 8 bit + // positive + CLZ_ww(REG_WORK2, REG_WORK1); // positive: if 25 bits are 0 -> no saturate + SUB_wwi(REG_WORK2, REG_WORK2, 25); + TBZ_xii(REG_WORK2, 31, 2); + MOV_wi(REG_WORK1, 0x7f); // max. positive value in 8 bit - // done - BFI_wwii(d, REG_WORK1, 0, 8); + // done + BFI_wwii(d, REG_WORK1, 0, 8); } LENDFUNC(NONE,NONE,3,raw_fmov_to_b_rr,(W4 d, FR s, int targetIsReg)) @@ -721,42 +719,42 @@ LENDFUNC(NONE,NONE,1,raw_fmov_d_ri_0,(FW r)) LOWFUNC(NONE,NONE,1,raw_fmov_d_ri_1,(FW r)) { - FMOV_di(r, 0b01110000); + FMOV_di(r, 0b01110000); } LENDFUNC(NONE,NONE,1,raw_fmov_d_ri_1,(FW r)) LOWFUNC(NONE,NONE,1,raw_fmov_d_ri_10,(FW r)) { - FMOV_di(r, 0b00100100); + FMOV_di(r, 0b00100100); } LENDFUNC(NONE,NONE,1,raw_fmov_d_ri_10,(FW r)) LOWFUNC(NONE,NONE,1,raw_fmov_d_ri_100,(FW r)) { - MOV_wi(REG_WORK1, 100); - SCVTF_dw(r, REG_WORK1); + MOV_wi(REG_WORK1, 100); + SCVTF_dw(r, REG_WORK1); } LENDFUNC(NONE,NONE,1,raw_fmov_d_ri_100,(FW r)) LOWFUNC(NONE,READ,2,raw_fmov_d_rm,(FW r, MEMR m)) { - LOAD_U64(REG_WORK1, m); - LDR_dXi(r, REG_WORK1, 0); + LOAD_U64(REG_WORK1, m); + LDR_dXi(r, REG_WORK1, 0); } LENDFUNC(NONE,READ,2,raw_fmov_d_rm,(FW r, MEMR m)) LOWFUNC(NONE,READ,2,raw_fmovs_rm,(FW r, MEMR m)) { - LOAD_U64(REG_WORK1, m); - LDR_sXi(r, REG_WORK1, 0); - FCVT_ds(r, r); + LOAD_U64(REG_WORK1, m); + LDR_sXi(r, REG_WORK1, 0); + FCVT_ds(r, r); } LENDFUNC(NONE,READ,2,raw_fmovs_rm,(FW r, MEMR m)) LOWFUNC(NONE,NONE,3,raw_fmov_to_d_rrr,(W4 d1, W4 d2, FR s)) { - FMOV_xd(d1, s); - LSR_xxi(d2, d1, 32); + FMOV_xd(d1, s); + LSR_xxi(d2, d1, 32); } LENDFUNC(NONE,NONE,3,raw_fmov_to_d_rrr,(W4 d1, W4 d2, FR s)) @@ -804,21 +802,21 @@ LENDFUNC(NONE,NONE,2,raw_fsub_rr,(FRW d, FR s)) LOWFUNC(NONE,NONE,2,raw_frndint_rr,(FW d, FR s)) { - FRINTI_dd(d, s); + FRINTI_dd(d, s); } LENDFUNC(NONE,NONE,2,raw_frndint_rr,(FW d, FR s)) LOWFUNC(NONE,NONE,2,raw_frndintz_rr,(FW d, FR s)) { - FRINTZ_dd(d, s); + FRINTZ_dd(d, s); } LENDFUNC(NONE,NONE,2,raw_frndintz_rr,(FW d, FR s)) LOWFUNC(NONE,NONE,2,raw_fmod_rr,(FRW d, FR s)) { FDIV_ddd(SCRATCH_F64_1, d, s); - FRINTZ_dd(SCRATCH_F64_1, SCRATCH_F64_1); - FMSUB_dddd(d, SCRATCH_F64_1, s, d); + FRINTZ_dd(SCRATCH_F64_1, SCRATCH_F64_1); + FMSUB_dddd(d, SCRATCH_F64_1, s, d); } LENDFUNC(NONE,NONE,2,raw_fmod_rr,(FRW d, FR s)) @@ -840,9 +838,9 @@ LENDFUNC(NONE,NONE,1,raw_fcuts_r,(FRW r)) LOWFUNC(NONE,NONE,2,raw_frem1_rr,(FRW d, FR s)) { - FDIV_ddd(SCRATCH_F64_2, d, s); - FRINTA_dd(SCRATCH_F64_2, SCRATCH_F64_2); - FMSUB_dddd(d, SCRATCH_F64_2, s, d); + FDIV_ddd(SCRATCH_F64_2, d, s); + FRINTA_dd(SCRATCH_F64_2, SCRATCH_F64_2); + FMSUB_dddd(d, SCRATCH_F64_2, s, d); } LENDFUNC(NONE,NONE,2,raw_frem1_rr,(FRW d, FR s)) @@ -866,7 +864,7 @@ LOWFUNC(NONE,NONE,3,raw_ffunc_rr,(double (*func)(double), FW d, FR s)) { FMOV_dd(0, s); - LOAD_U64(REG_WORK1, (uintptr)func); + LOAD_U64(REG_WORK1, (uintptr)func); STR_xXpre(RLR_INDEX, RSP_INDEX, -16); BLR_x(REG_WORK1); @@ -887,8 +885,8 @@ LOWFUNC(NONE,NONE,3,raw_fpowx_rr,(uae_u32 x, FW d, FR s)) } FMOV_dd(1, s); - - LOAD_U64(REG_WORK1, (uintptr)func); + + LOAD_U64(REG_WORK1, (uintptr)func); STR_xXpre(RLR_INDEX, RSP_INDEX, -16); BLR_x(REG_WORK1); @@ -900,54 +898,54 @@ LENDFUNC(NONE,NONE,3,raw_fpowx_rr,(uae_u32 x, FW d, FR s)) LOWFUNC(NONE,WRITE,2,raw_fp_from_exten_mr,(RR4 adr, FR s)) { - FMOV_xd(REG_WORK1, s); - FCMP_d0(s); + FMOV_xd(REG_WORK1, s); + FCMP_d0(s); ADD_xxx(REG_WORK4, adr, R_MEMSTART); - uae_u32* branchadd_iszero = (uae_u32*)get_target(); - BEQ_i(0); // iszero + uae_u32* branchadd_iszero = (uae_u32*)get_target(); + BEQ_i(0); // iszero - UBFX_xxii(REG_WORK2, REG_WORK1, 52, 11); // get exponent + UBFX_xxii(REG_WORK2, REG_WORK1, 52, 11); // get exponent CMP_xi(REG_WORK2, 2047); - - uae_u32* branchadd_isnan = (uae_u32*)get_target(); + + uae_u32* branchadd_isnan = (uae_u32*)get_target(); BEQ_i(0); // isnan - MOV_xi(REG_WORK3, 15360); // diff of bias between double and long double - ADD_xxx(REG_WORK2, REG_WORK2, REG_WORK3); // exponent done - UBFX_xxii(REG_WORK3, REG_WORK1, 63, 1); // extract sign - LSL_xxi(REG_WORK3, REG_WORK3, 31); - ORR_xxxLSLi(REG_WORK2, REG_WORK3, REG_WORK2, 16); // merge sign and exponent - - REV32_xx(REG_WORK2, REG_WORK2); - STRH_wXi(REG_WORK2, REG_WORK4, 0); // write exponent - ADD_xxi(REG_WORK4, REG_WORK4, 4); - - LSL_xxi(REG_WORK1, REG_WORK1, 11); // shift mantissa to correct position - REV_xx(REG_WORK1, REG_WORK1); - SET_xxbit(REG_WORK1, REG_WORK1, 7); // insert explicit 1 - STR_xXi(REG_WORK1, REG_WORK4, 0); - uae_u32* branchadd_end = (uae_u32*)get_target(); - B_i(0); // end_of_op - - // isnan - write_jmp_target(branchadd_isnan, (uintptr)get_target()); - MOV_xish(REG_WORK1, 0x7fff, 16); - MOVN_xi(REG_WORK2, 0); - B_i(4); - - // iszero - write_jmp_target(branchadd_iszero, (uintptr)get_target()); - UBFX_xxii(REG_WORK1, REG_WORK1, 63, 1); // extract sign - LSL_xxi(REG_WORK1, REG_WORK1, 31); - MOV_xi(REG_WORK2, 0); - - REV32_xx(REG_WORK1, REG_WORK1); - STR_wXi(REG_WORK1, REG_WORK4, 0); - STP_wwXi(REG_WORK2, REG_WORK2, REG_WORK4, 4); - - // end_of_op - write_jmp_target(branchadd_end, (uintptr)get_target()); + MOV_xi(REG_WORK3, 15360); // diff of bias between double and long double + ADD_xxx(REG_WORK2, REG_WORK2, REG_WORK3); // exponent done + UBFX_xxii(REG_WORK3, REG_WORK1, 63, 1); // extract sign + LSL_xxi(REG_WORK3, REG_WORK3, 31); + ORR_xxxLSLi(REG_WORK2, REG_WORK3, REG_WORK2, 16); // merge sign and exponent + + REV32_xx(REG_WORK2, REG_WORK2); + STRH_wXi(REG_WORK2, REG_WORK4, 0); // write exponent + ADD_xxi(REG_WORK4, REG_WORK4, 4); + + LSL_xxi(REG_WORK1, REG_WORK1, 11); // shift mantissa to correct position + REV_xx(REG_WORK1, REG_WORK1); + SET_xxbit(REG_WORK1, REG_WORK1, 7); // insert explicit 1 + STR_xXi(REG_WORK1, REG_WORK4, 0); + uae_u32* branchadd_end = (uae_u32*)get_target(); + B_i(0); // end_of_op + + // isnan + write_jmp_target(branchadd_isnan, (uintptr)get_target()); + MOV_xish(REG_WORK1, 0x7fff, 16); + MOVN_xi(REG_WORK2, 0); + B_i(4); + + // iszero + write_jmp_target(branchadd_iszero, (uintptr)get_target()); + UBFX_xxii(REG_WORK1, REG_WORK1, 63, 1); // extract sign + LSL_xxi(REG_WORK1, REG_WORK1, 31); + MOV_xi(REG_WORK2, 0); + + REV32_xx(REG_WORK1, REG_WORK1); + STR_wXi(REG_WORK1, REG_WORK4, 0); + STP_wwXi(REG_WORK2, REG_WORK2, REG_WORK4, 4); + + // end_of_op + write_jmp_target(branchadd_end, (uintptr)get_target()); } LENDFUNC(NONE,WRITE,2,raw_fp_from_exten_mr,(RR4 adr, FR s)) @@ -955,22 +953,22 @@ LOWFUNC(NONE,READ,2,raw_fp_to_exten_rm,(FW d, RR4 adr)) { ADD_xxx(REG_WORK3, adr, R_MEMSTART); - ADD_xxi(REG_WORK1, REG_WORK3, 4); + ADD_xxi(REG_WORK1, REG_WORK3, 4); LDR_xXi(REG_WORK1, REG_WORK1, 0); CLEAR_xxbit(REG_WORK1, REG_WORK1, 7); // clear explicit 1 REV_xx(REG_WORK1, REG_WORK1); - LDRH_wXi(REG_WORK4, REG_WORK3, 0); - REV16_xx(REG_WORK4, REG_WORK4); // exponent now in lower half + LDRH_wXi(REG_WORK4, REG_WORK3, 0); + REV16_xx(REG_WORK4, REG_WORK4); // exponent now in lower half - ANDS_xx7fff(REG_WORK2, REG_WORK4); + ANDS_xx7fff(REG_WORK2, REG_WORK4); uae_u32* branchadd_notzero = (uae_u32*)get_target(); BNE_i(0); // not_zero uae_u32* branchadd_notzero2 = (uae_u32*)get_target(); - CBNZ_xi(REG_WORK1, 0); // not zero + CBNZ_xi(REG_WORK1, 0); // not zero - // zero + // zero MOVI_di(d, 0); uae_u32* branchadd_end = (uae_u32*)get_target(); TBZ_xii(REG_WORK4, 15, 0); // end_of_op @@ -979,9 +977,9 @@ LOWFUNC(NONE,READ,2,raw_fp_to_exten_rm,(FW d, RR4 adr)) uae_u32* branchadd_end2 = (uae_u32*)get_target(); B_i(0); // end_of_op - // not_zero - write_jmp_target(branchadd_notzero, (uintptr)get_target()); - write_jmp_target(branchadd_notzero2, (uintptr)get_target()); + // not_zero + write_jmp_target(branchadd_notzero, (uintptr)get_target()); + write_jmp_target(branchadd_notzero2, (uintptr)get_target()); MOV_xi(REG_WORK3, 15360); // diff of bias between double and long double SUB_xxx(REG_WORK2, REG_WORK2, REG_WORK3); // exponent done, ToDo: check for carry -> result gets Inf in double UBFX_xxii(REG_WORK4, REG_WORK4, 15, 1); // extract sign @@ -991,23 +989,23 @@ LOWFUNC(NONE,READ,2,raw_fp_to_exten_rm,(FW d, RR4 adr)) ORR_xxx(REG_WORK1, REG_WORK1, REG_WORK2); FMOV_dx(d, REG_WORK1); - // end_of_op - write_jmp_target(branchadd_end, (uintptr)get_target()); - write_jmp_target(branchadd_end2, (uintptr)get_target()); + // end_of_op + write_jmp_target(branchadd_end, (uintptr)get_target()); + write_jmp_target(branchadd_end2, (uintptr)get_target()); } LENDFUNC(NONE,READ,2,raw_fp_to_exten_rm,(FW d, RR4 adr)) LOWFUNC(NONE,WRITE,2,raw_fp_from_double_mr,(RR4 adr, FR s)) { - REV64_dd(SCRATCH_F64_1, s); - STR_dXx(SCRATCH_F64_1, adr, R_MEMSTART); + REV64_dd(SCRATCH_F64_1, s); + STR_dXx(SCRATCH_F64_1, adr, R_MEMSTART); } LENDFUNC(NONE,WRITE,2,raw_fp_from_double_mr,(RR4 adr, FR s)) LOWFUNC(NONE,READ,2,raw_fp_to_double_rm,(FW d, RR4 adr)) { LDR_dXx(d, adr, R_MEMSTART); - REV64_dd(d, d); + REV64_dd(d, d); } LENDFUNC(NONE,READ,2,raw_fp_to_double_rm,(FW d, RR4 adr)) @@ -1022,19 +1020,19 @@ LOWFUNC(NONE,NONE,2,raw_fp_fscc_ri,(RW4 d, int cc)) case NATIVE_CC_F_NEVER: CLEAR_LOW8_xx(d, d); break; - + case NATIVE_CC_NE: // Set if not equal - CSETM_wc(REG_WORK1, NATIVE_CC_NE); - BFXIL_xxii(d, REG_WORK1, 0, 8); + CSETM_wc(REG_WORK1, NATIVE_CC_NE); + BFXIL_xxii(d, REG_WORK1, 0, 8); break; case NATIVE_CC_EQ: // Set if equal - CSETM_wc(REG_WORK1, NATIVE_CC_EQ); - BFXIL_xxii(d, REG_WORK1, 0, 8); + CSETM_wc(REG_WORK1, NATIVE_CC_EQ); + BFXIL_xxii(d, REG_WORK1, 0, 8); break; case NATIVE_CC_F_OGT: // Set if valid and greater than - BVS_i(4); // do not set if NaN + BVS_i(4); // do not set if NaN BLE_i(3); // do not set if less or equal SET_LOW8_xx(d, d); B_i(2); @@ -1048,7 +1046,7 @@ LOWFUNC(NONE,NONE,2,raw_fp_fscc_ri,(RW4 d, int cc)) B_i(2); CLEAR_LOW8_xx(d, d); break; - + case NATIVE_CC_F_OLT: // Set if vaild and less than BVS_i(4); // do not set if NaN BCS_i(3); // do not set if carry set @@ -1056,7 +1054,7 @@ LOWFUNC(NONE,NONE,2,raw_fp_fscc_ri,(RW4 d, int cc)) B_i(2); CLEAR_LOW8_xx(d, d); break; - + case NATIVE_CC_F_OLE: // Set if valid and less or equal BVS_i(4); // do not set if NaN BGT_i(3); // do not set if greater than @@ -1064,7 +1062,7 @@ LOWFUNC(NONE,NONE,2,raw_fp_fscc_ri,(RW4 d, int cc)) B_i(2); CLEAR_LOW8_xx(d, d); break; - + case NATIVE_CC_F_OGL: // Set if valid and greator or less BVS_i(4); // do not set if NaN BEQ_i(3); // do not set if equal @@ -1074,13 +1072,13 @@ LOWFUNC(NONE,NONE,2,raw_fp_fscc_ri,(RW4 d, int cc)) break; case NATIVE_CC_F_OR: // Set if valid - CSETM_wc(REG_WORK1, NATIVE_CC_VC); // do not set if NaN - BFXIL_xxii(d, REG_WORK1, 0, 8); + CSETM_wc(REG_WORK1, NATIVE_CC_VC); // do not set if NaN + BFXIL_xxii(d, REG_WORK1, 0, 8); break; - + case NATIVE_CC_F_UN: // Set if NAN - CSETM_wc(REG_WORK1, NATIVE_CC_VS); // do not set if valid - BFXIL_xxii(d, REG_WORK1, 0, 8); + CSETM_wc(REG_WORK1, NATIVE_CC_VS); // do not set if valid + BFXIL_xxii(d, REG_WORK1, 0, 8); break; case NATIVE_CC_F_UEQ: // Set if NAN or equal @@ -1125,6 +1123,3 @@ LOWFUNC(NONE,NONE,2,raw_fp_fscc_ri,(RW4 d, int cc)) } } LENDFUNC(NONE,NONE,2,raw_fp_fscc_ri,(RW4 d, int cc)) - -#endif // USE_JIT_FPU - diff --git a/src/jit/codegen_armA64.h b/src/jit/arm/codegen_arm64.h similarity index 99% rename from src/jit/codegen_armA64.h rename to src/jit/arm/codegen_arm64.h index 84cbef68c..e0405628b 100644 --- a/src/jit/codegen_armA64.h +++ b/src/jit/arm/codegen_arm64.h @@ -2,7 +2,7 @@ * compiler/codegen_armA64.h - AARCH64 code generator * * Copyright (c) 2019 TomB - * + * * This file is part of the UAE4ARM project. * * JIT compiler m68k -> ARMv8.1 @@ -65,7 +65,7 @@ /*---------------------------------------- - * branch instructions + * branch instructions *----------------------------------------*/ // i is the number of instructions, i.e. 4 bytes #define B_i(i) _W((0b000101 << 26) | ((i) & 0x03ffffff)) @@ -147,7 +147,7 @@ #define STURH_wXi(Wt,Xn,i) _W((0b01111000000 << 21) | ((i & 0x1ff) << 12) | ((Xn) << 5) | (Wt)) /*---------------------------------------- - * move immediate/register + * move immediate/register *----------------------------------------*/ #define MOV_wi(Wd,i16) _W((0b01010010100 << 21) | (((i16) & 0xffff) << 5) | (Wd)) #define MOV_xi(Xd,i16) _W((0b11010010100 << 21) | (((i16) & 0xffff) << 5) | (Xd)) diff --git a/src/jit/arm/compemu_arm.cpp b/src/jit/arm/compemu_arm.cpp new file mode 100644 index 000000000..cefb84f9c --- /dev/null +++ b/src/jit/arm/compemu_arm.cpp @@ -0,0 +1,54104 @@ +#include "sysconfig.h" +#if defined(JIT) +#include "sysdeps.h" +#include "options.h" +#include "memory.h" +#include "newcpu.h" +#include "custom.h" +#include "comptbl_arm.h" +#include "compemu_arm.h" + +#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) +#define PART_1 1 +#define PART_2 1 +#define PART_3 1 +#define PART_4 1 +#define PART_5 1 +#define PART_6 1 +#define PART_7 1 +#define PART_8 1 +#endif + +#ifdef USE_JIT_FPU +extern void comp_fpp_opp(); +extern void comp_fscc_opp(); +extern void comp_fbcc_opp(); +#endif + +#ifdef PART_1 + +/* OR.B #.B,Dn */ +uae_u32 REGPARAM2 op_0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_OR_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(An) */ +uae_u32 REGPARAM2 op_10_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_18_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,-(An) */ +uae_u32 REGPARAM2 op_20_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_28_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_30_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_38_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_39_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ORSR.B #.W */ +uae_u32 REGPARAM2 op_3c_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + make_flags_live(); + jff_ORSR(ARM_CCR_MAP[src & 0xF], ((src & 0x10) >> 4)); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,Dn */ +uae_u32 REGPARAM2 op_40_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_OR_w_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(An) */ +uae_u32 REGPARAM2 op_50_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_58_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,-(An) */ +uae_u32 REGPARAM2 op_60_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_68_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_70_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_78_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_79_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,Dn */ +uae_u32 REGPARAM2 op_80_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_OR_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(An) */ +uae_u32 REGPARAM2 op_90_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_98_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,-(An) */ +uae_u32 REGPARAM2 op_a0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_a8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_b8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_b9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.L Dn,Dn */ +uae_u32 REGPARAM2 op_100_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + make_flags_live(); + jff_BTST_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(An) */ +uae_u32 REGPARAM2 op_110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b(dst, src); + live_flags(); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,-(An) */ +uae_u32 REGPARAM2 op_120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_138_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_139_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(d16,PC) */ +uae_u32 REGPARAM2 op_13a_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_13b_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,#.B */ +uae_u32 REGPARAM2 op_13c_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = alloc_scratch(); + mov_l_ri(dst, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + make_flags_live(); + jff_BTST_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.L Dn,Dn */ +uae_u32 REGPARAM2 op_140_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + make_flags_live(); + jff_BCHG_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(An) */ +uae_u32 REGPARAM2 op_150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,-(An) */ +uae_u32 REGPARAM2 op_160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_178_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_179_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.L Dn,Dn */ +uae_u32 REGPARAM2 op_180_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + make_flags_live(); + jff_BCLR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(An) */ +uae_u32 REGPARAM2 op_190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_1b8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_1b9_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.L Dn,Dn */ +uae_u32 REGPARAM2 op_1c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + make_flags_live(); + jff_BSET_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(An) */ +uae_u32 REGPARAM2 op_1d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_1d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_1f8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_1f9_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,Dn */ +uae_u32 REGPARAM2 op_200_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_AND_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(An) */ +uae_u32 REGPARAM2 op_210_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_218_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,-(An) */ +uae_u32 REGPARAM2 op_220_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_228_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_230_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_238_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_239_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ANDSR.B #.W */ +uae_u32 REGPARAM2 op_23c_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + make_flags_live(); + jff_ANDSR(ARM_CCR_MAP[src & 0xF], (src & 0x10)); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,Dn */ +uae_u32 REGPARAM2 op_240_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_AND_w_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(An) */ +uae_u32 REGPARAM2 op_250_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_258_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,-(An) */ +uae_u32 REGPARAM2 op_260_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_268_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_270_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_278_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_279_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,Dn */ +uae_u32 REGPARAM2 op_280_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_AND_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(An) */ +uae_u32 REGPARAM2 op_290_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_298_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,-(An) */ +uae_u32 REGPARAM2 op_2a0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_2a8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2b0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_2b8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_2b9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,Dn */ +uae_u32 REGPARAM2 op_400_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(An) */ +uae_u32 REGPARAM2 op_410_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_418_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,-(An) */ +uae_u32 REGPARAM2 op_420_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_428_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_430_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_438_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_439_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,Dn */ +uae_u32 REGPARAM2 op_440_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(An) */ +uae_u32 REGPARAM2 op_450_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_458_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,-(An) */ +uae_u32 REGPARAM2 op_460_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_468_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_470_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_478_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_479_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,Dn */ +uae_u32 REGPARAM2 op_480_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(An) */ +uae_u32 REGPARAM2 op_490_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_498_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,-(An) */ +uae_u32 REGPARAM2 op_4a0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_4a8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4b0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_4b8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_4b9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,Dn */ +uae_u32 REGPARAM2 op_600_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(An) */ +uae_u32 REGPARAM2 op_610_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_618_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,-(An) */ +uae_u32 REGPARAM2 op_620_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_628_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_630_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_638_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_639_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,Dn */ +uae_u32 REGPARAM2 op_640_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(An) */ +uae_u32 REGPARAM2 op_650_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_658_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,-(An) */ +uae_u32 REGPARAM2 op_660_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_668_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_670_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_678_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_679_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,Dn */ +uae_u32 REGPARAM2 op_680_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(An) */ +uae_u32 REGPARAM2 op_690_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_698_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,-(An) */ +uae_u32 REGPARAM2 op_6a0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_6a8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_6b0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_6b8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_6b9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.L #.W,Dn */ +uae_u32 REGPARAM2 op_800_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + make_flags_live(); + jff_BTST_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(An) */ +uae_u32 REGPARAM2 op_810_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_818_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b_imm(dst, src); + live_flags(); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,-(An) */ +uae_u32 REGPARAM2 op_820_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_828_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_830_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_838_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_839_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_83a_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_83b_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BTST_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.L #.W,Dn */ +uae_u32 REGPARAM2 op_840_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + make_flags_live(); + jff_BCHG_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(An) */ +uae_u32 REGPARAM2 op_850_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_858_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,-(An) */ +uae_u32 REGPARAM2 op_860_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_868_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_870_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_878_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_879_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCHG_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.L #.W,Dn */ +uae_u32 REGPARAM2 op_880_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + make_flags_live(); + jff_BCLR_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(An) */ +uae_u32 REGPARAM2 op_890_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_898_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,-(An) */ +uae_u32 REGPARAM2 op_8a0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_8a8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8b0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_8b8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_8b9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BCLR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.L #.W,Dn */ +uae_u32 REGPARAM2 op_8c0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + make_flags_live(); + jff_BSET_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(An) */ +uae_u32 REGPARAM2 op_8d0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_8d8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,-(An) */ +uae_u32 REGPARAM2 op_8e0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_8e8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8f0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_8f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_8f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + make_flags_live(); + jff_BSET_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,Dn */ +uae_u32 REGPARAM2 op_a00_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_EOR_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(An) */ +uae_u32 REGPARAM2 op_a10_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_a18_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,-(An) */ +uae_u32 REGPARAM2 op_a20_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_a28_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_a30_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_a38_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_a39_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b_imm(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EORSR.B #.W */ +uae_u32 REGPARAM2 op_a3c_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + make_flags_live(); + jff_EORSR(ARM_CCR_MAP[src & 0xF], ((src & 0x10) >> 4)); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,Dn */ +uae_u32 REGPARAM2 op_a40_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_EOR_w_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(An) */ +uae_u32 REGPARAM2 op_a50_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_a58_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,-(An) */ +uae_u32 REGPARAM2 op_a60_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_a68_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_a70_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_a78_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_a79_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w_imm(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,Dn */ +uae_u32 REGPARAM2 op_a80_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_EOR_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(An) */ +uae_u32 REGPARAM2 op_a90_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_a98_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,-(An) */ +uae_u32 REGPARAM2 op_aa0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_aa8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_ab0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_ab8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_ab9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l_imm(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_2 + +/* CMP.B #.B,Dn */ +uae_u32 REGPARAM2 op_c00_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(An) */ +uae_u32 REGPARAM2 op_c10_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_c18_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,-(An) */ +uae_u32 REGPARAM2 op_c20_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_c28_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c30_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_c38_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_c39_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(d16,PC) */ +uae_u32 REGPARAM2 op_c3a_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_c3b_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,Dn */ +uae_u32 REGPARAM2 op_c40_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(An) */ +uae_u32 REGPARAM2 op_c50_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_c58_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,-(An) */ +uae_u32 REGPARAM2 op_c60_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_c68_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c70_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_c78_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_c79_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_c7a_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_c7b_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,Dn */ +uae_u32 REGPARAM2 op_c80_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(An) */ +uae_u32 REGPARAM2 op_c90_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_c98_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,-(An) */ +uae_u32 REGPARAM2 op_ca0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_ca8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_cb0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_cb8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_cb9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(d16,PC) */ +uae_u32 REGPARAM2 op_cba_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_cbb_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,Dn */ +uae_u32 REGPARAM2 op_1000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),Dn */ +uae_u32 REGPARAM2 op_1010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,Dn */ +uae_u32 REGPARAM2 op_1018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),Dn */ +uae_u32 REGPARAM2 op_1020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_1028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_1030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_1038_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_1039_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_103a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_103b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,Dn */ +uae_u32 REGPARAM2 op_103c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(An) */ +uae_u32 REGPARAM2 op_1080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(An) */ +uae_u32 REGPARAM2 op_1090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(An) */ +uae_u32 REGPARAM2 op_1098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(An) */ +uae_u32 REGPARAM2 op_10a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(An) */ +uae_u32 REGPARAM2 op_10a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_10b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(An) */ +uae_u32 REGPARAM2 op_10b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(An) */ +uae_u32 REGPARAM2 op_10b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(An) */ +uae_u32 REGPARAM2 op_10ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_10bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(An) */ +uae_u32 REGPARAM2 op_10bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_10c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(An)+ */ +uae_u32 REGPARAM2 op_10d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(An)+ */ +uae_u32 REGPARAM2 op_10d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(An)+ */ +uae_u32 REGPARAM2 op_10e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_10e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_10f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_10f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_10f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_10fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_10fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_10fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1100_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),-(An) */ +uae_u32 REGPARAM2 op_1110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,-(An) */ +uae_u32 REGPARAM2 op_1118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),-(An) */ +uae_u32 REGPARAM2 op_1120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),-(An) */ +uae_u32 REGPARAM2 op_1128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_1130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_1138_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_1139_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_113a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_113b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,-(An) */ +uae_u32 REGPARAM2 op_113c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1140_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(d16,An) */ +uae_u32 REGPARAM2 op_1150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_1158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(d16,An) */ +uae_u32 REGPARAM2 op_1160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_1168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_1170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_1178_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_1179_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_117a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_117b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_117c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1180_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_11c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(xxx).W */ +uae_u32 REGPARAM2 op_11d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_11d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(xxx).W */ +uae_u32 REGPARAM2 op_11e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_11e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_11f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_11f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_11f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_11fa_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_11fb_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_11fc_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_13c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(xxx).L */ +uae_u32 REGPARAM2 op_13d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_13d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(xxx).L */ +uae_u32 REGPARAM2 op_13e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_13e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_13f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_13f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_13f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_13fa_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_13fb_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_13fc_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_b(src); + live_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,Dn */ +uae_u32 REGPARAM2 op_2000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,Dn */ +uae_u32 REGPARAM2 op_2008_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),Dn */ +uae_u32 REGPARAM2 op_2010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,Dn */ +uae_u32 REGPARAM2 op_2018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),Dn */ +uae_u32 REGPARAM2 op_2020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_2028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_2030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_2038_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_2039_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_203a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_203b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,Dn */ +uae_u32 REGPARAM2 op_203c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L Dn,An */ +uae_u32 REGPARAM2 op_2040_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L An,An */ +uae_u32 REGPARAM2 op_2048_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (An),An */ +uae_u32 REGPARAM2 op_2050_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (An)+,An */ +uae_u32 REGPARAM2 op_2058_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L -(An),An */ +uae_u32 REGPARAM2 op_2060_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (d16,An),An */ +uae_u32 REGPARAM2 op_2068_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_2070_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_2078_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_2079_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_207a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_207b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L #.L,An */ +uae_u32 REGPARAM2 op_207c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(An) */ +uae_u32 REGPARAM2 op_2080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(An) */ +uae_u32 REGPARAM2 op_2088_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(An) */ +uae_u32 REGPARAM2 op_2090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,(An) */ +uae_u32 REGPARAM2 op_2098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(An) */ +uae_u32 REGPARAM2 op_20a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(An) */ +uae_u32 REGPARAM2 op_20a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_20b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(An) */ +uae_u32 REGPARAM2 op_20b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(An) */ +uae_u32 REGPARAM2 op_20b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(An) */ +uae_u32 REGPARAM2 op_20ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_20bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(An) */ +uae_u32 REGPARAM2 op_20bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_20c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(An)+ */ +uae_u32 REGPARAM2 op_20c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + if (srcreg == (uae_s32) dstreg) { + src = alloc_scratch(); + mov_l_rr(src, srcreg + 8); + } + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(An)+ */ +uae_u32 REGPARAM2 op_20d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_20d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(An)+ */ +uae_u32 REGPARAM2 op_20e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_20e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_20f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_20f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_20f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_20fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_20fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_20fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,-(An) */ +uae_u32 REGPARAM2 op_2100_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,-(An) */ +uae_u32 REGPARAM2 op_2108_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + if (srcreg == (uae_s32) dstreg) { + src = alloc_scratch(); + mov_l_rr(src, srcreg + 8); + } + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),-(An) */ +uae_u32 REGPARAM2 op_2110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,-(An) */ +uae_u32 REGPARAM2 op_2118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),-(An) */ +uae_u32 REGPARAM2 op_2120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),-(An) */ +uae_u32 REGPARAM2 op_2128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_2130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_2138_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_2139_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_213a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_213b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,-(An) */ +uae_u32 REGPARAM2 op_213c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_2140_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(d16,An) */ +uae_u32 REGPARAM2 op_2148_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(d16,An) */ +uae_u32 REGPARAM2 op_2150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_2158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(d16,An) */ +uae_u32 REGPARAM2 op_2160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_2168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_2170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_2178_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_2179_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_217a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_217b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_217c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2180_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2188_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_3 + +/* MOVE.L (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_21c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(xxx).W */ +uae_u32 REGPARAM2 op_21c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(xxx).W */ +uae_u32 REGPARAM2 op_21d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_21d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(xxx).W */ +uae_u32 REGPARAM2 op_21e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_21e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_21f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_21f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_21f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_21fa_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_21fb_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_21fc_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_23c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(xxx).L */ +uae_u32 REGPARAM2 op_23c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(xxx).L */ +uae_u32 REGPARAM2 op_23d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_23d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(xxx).L */ +uae_u32 REGPARAM2 op_23e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_23e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_23f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_23f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_23f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_23fa_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_23fb_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_23fc_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_l(src); + live_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,Dn */ +uae_u32 REGPARAM2 op_3000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,Dn */ +uae_u32 REGPARAM2 op_3008_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),Dn */ +uae_u32 REGPARAM2 op_3010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,Dn */ +uae_u32 REGPARAM2 op_3018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),Dn */ +uae_u32 REGPARAM2 op_3020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_3028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_3030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_3038_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_3039_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_303a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_303b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,Dn */ +uae_u32 REGPARAM2 op_303c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_MOVE_w_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W Dn,An */ +uae_u32 REGPARAM2 op_3040_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W An,An */ +uae_u32 REGPARAM2 op_3048_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (An),An */ +uae_u32 REGPARAM2 op_3050_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (An)+,An */ +uae_u32 REGPARAM2 op_3058_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W -(An),An */ +uae_u32 REGPARAM2 op_3060_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (d16,An),An */ +uae_u32 REGPARAM2 op_3068_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_3070_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_3078_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_3079_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_307a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_307b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W #.W,An */ +uae_u32 REGPARAM2 op_307c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(An) */ +uae_u32 REGPARAM2 op_3080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(An) */ +uae_u32 REGPARAM2 op_3088_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(An) */ +uae_u32 REGPARAM2 op_3090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(An) */ +uae_u32 REGPARAM2 op_3098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(An) */ +uae_u32 REGPARAM2 op_30a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(An) */ +uae_u32 REGPARAM2 op_30a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_30b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(An) */ +uae_u32 REGPARAM2 op_30b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(An) */ +uae_u32 REGPARAM2 op_30b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(An) */ +uae_u32 REGPARAM2 op_30ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_30bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(An) */ +uae_u32 REGPARAM2 op_30bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_30c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(An)+ */ +uae_u32 REGPARAM2 op_30c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + if (srcreg == (uae_s32) dstreg) { + src = alloc_scratch(); + mov_l_rr(src, srcreg + 8); + } + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(An)+ */ +uae_u32 REGPARAM2 op_30d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(An)+ */ +uae_u32 REGPARAM2 op_30d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(An)+ */ +uae_u32 REGPARAM2 op_30e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_30e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_30f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_30f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_30f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_30fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_30fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_30fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,-(An) */ +uae_u32 REGPARAM2 op_3100_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,-(An) */ +uae_u32 REGPARAM2 op_3108_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + if (srcreg == (uae_s32) dstreg) { + src = alloc_scratch(); + mov_l_rr(src, srcreg + 8); + } + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),-(An) */ +uae_u32 REGPARAM2 op_3110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,-(An) */ +uae_u32 REGPARAM2 op_3118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),-(An) */ +uae_u32 REGPARAM2 op_3120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),-(An) */ +uae_u32 REGPARAM2 op_3128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_3130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_3138_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_3139_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_313a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_313b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,-(An) */ +uae_u32 REGPARAM2 op_313c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_3140_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(d16,An) */ +uae_u32 REGPARAM2 op_3148_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(d16,An) */ +uae_u32 REGPARAM2 op_3150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_3158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(d16,An) */ +uae_u32 REGPARAM2 op_3160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_3168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_3170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_3178_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_3179_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_317a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_317b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_317c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3180_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3188_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_31c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(xxx).W */ +uae_u32 REGPARAM2 op_31c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(xxx).W */ +uae_u32 REGPARAM2 op_31d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_31d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(xxx).W */ +uae_u32 REGPARAM2 op_31e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_31e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_31f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_31f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_31f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_31fa_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_31fb_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_31fc_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_33c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(xxx).L */ +uae_u32 REGPARAM2 op_33c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(xxx).L */ +uae_u32 REGPARAM2 op_33d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_33d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(xxx).L */ +uae_u32 REGPARAM2 op_33e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_33e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_33f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_33f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_33f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_33fa_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_33fb_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_33fc_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + jff_TST_w(src); + live_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B Dn */ +uae_u32 REGPARAM2 op_4000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jff_NEGX_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (An) */ +uae_u32 REGPARAM2 op_4010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + make_flags_live(); + jff_NEGX_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (An)+ */ +uae_u32 REGPARAM2 op_4018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + make_flags_live(); + jff_NEGX_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B -(An) */ +uae_u32 REGPARAM2 op_4020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + make_flags_live(); + jff_NEGX_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (d16,An) */ +uae_u32 REGPARAM2 op_4028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + make_flags_live(); + jff_NEGX_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + make_flags_live(); + jff_NEGX_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (xxx).W */ +uae_u32 REGPARAM2 op_4038_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + make_flags_live(); + jff_NEGX_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (xxx).L */ +uae_u32 REGPARAM2 op_4039_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + make_flags_live(); + jff_NEGX_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W Dn */ +uae_u32 REGPARAM2 op_4040_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jff_NEGX_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (An) */ +uae_u32 REGPARAM2 op_4050_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + make_flags_live(); + jff_NEGX_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (An)+ */ +uae_u32 REGPARAM2 op_4058_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + make_flags_live(); + jff_NEGX_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W -(An) */ +uae_u32 REGPARAM2 op_4060_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + make_flags_live(); + jff_NEGX_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (d16,An) */ +uae_u32 REGPARAM2 op_4068_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + make_flags_live(); + jff_NEGX_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4070_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + make_flags_live(); + jff_NEGX_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (xxx).W */ +uae_u32 REGPARAM2 op_4078_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + make_flags_live(); + jff_NEGX_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (xxx).L */ +uae_u32 REGPARAM2 op_4079_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + make_flags_live(); + jff_NEGX_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L Dn */ +uae_u32 REGPARAM2 op_4080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jff_NEGX_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (An) */ +uae_u32 REGPARAM2 op_4090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + make_flags_live(); + jff_NEGX_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (An)+ */ +uae_u32 REGPARAM2 op_4098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + make_flags_live(); + jff_NEGX_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L -(An) */ +uae_u32 REGPARAM2 op_40a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + make_flags_live(); + jff_NEGX_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (d16,An) */ +uae_u32 REGPARAM2 op_40a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + make_flags_live(); + jff_NEGX_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_40b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + make_flags_live(); + jff_NEGX_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (xxx).W */ +uae_u32 REGPARAM2 op_40b8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + make_flags_live(); + jff_NEGX_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (xxx).L */ +uae_u32 REGPARAM2 op_40b9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + make_flags_live(); + jff_NEGX_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (An),An */ +uae_u32 REGPARAM2 op_41d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (d16,An),An */ +uae_u32 REGPARAM2 op_41e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_41f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_41f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_41f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_41fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_41fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B Dn */ +uae_u32 REGPARAM2 op_4200_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_CLR_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (An) */ +uae_u32 REGPARAM2 op_4210_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (An)+ */ +uae_u32 REGPARAM2 op_4218_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_b(src); + live_flags(); + writebyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B -(An) */ +uae_u32 REGPARAM2 op_4220_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (d16,An) */ +uae_u32 REGPARAM2 op_4228_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4230_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (xxx).W */ +uae_u32 REGPARAM2 op_4238_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (xxx).L */ +uae_u32 REGPARAM2 op_4239_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W Dn */ +uae_u32 REGPARAM2 op_4240_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_CLR_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (An) */ +uae_u32 REGPARAM2 op_4250_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (An)+ */ +uae_u32 REGPARAM2 op_4258_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_w(src); + live_flags(); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W -(An) */ +uae_u32 REGPARAM2 op_4260_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (d16,An) */ +uae_u32 REGPARAM2 op_4268_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4270_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (xxx).W */ +uae_u32 REGPARAM2 op_4278_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (xxx).L */ +uae_u32 REGPARAM2 op_4279_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L Dn */ +uae_u32 REGPARAM2 op_4280_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_CLR_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (An) */ +uae_u32 REGPARAM2 op_4290_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (An)+ */ +uae_u32 REGPARAM2 op_4298_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_l(src); + live_flags(); + writelong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L -(An) */ +uae_u32 REGPARAM2 op_42a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (d16,An) */ +uae_u32 REGPARAM2 op_42a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_42b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (xxx).W */ +uae_u32 REGPARAM2 op_42b8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (xxx).L */ +uae_u32 REGPARAM2 op_42b9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + dont_care_flags(); + jff_CLR_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_4 + +/* NEG.B Dn */ +uae_u32 REGPARAM2 op_4400_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + jff_NEG_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (An) */ +uae_u32 REGPARAM2 op_4410_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + jff_NEG_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (An)+ */ +uae_u32 REGPARAM2 op_4418_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + jff_NEG_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B -(An) */ +uae_u32 REGPARAM2 op_4420_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + jff_NEG_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (d16,An) */ +uae_u32 REGPARAM2 op_4428_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + jff_NEG_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4430_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + jff_NEG_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (xxx).W */ +uae_u32 REGPARAM2 op_4438_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + jff_NEG_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (xxx).L */ +uae_u32 REGPARAM2 op_4439_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + jff_NEG_b(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W Dn */ +uae_u32 REGPARAM2 op_4440_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + jff_NEG_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (An) */ +uae_u32 REGPARAM2 op_4450_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_NEG_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (An)+ */ +uae_u32 REGPARAM2 op_4458_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_NEG_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W -(An) */ +uae_u32 REGPARAM2 op_4460_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jff_NEG_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (d16,An) */ +uae_u32 REGPARAM2 op_4468_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_NEG_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4470_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jff_NEG_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (xxx).W */ +uae_u32 REGPARAM2 op_4478_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_NEG_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (xxx).L */ +uae_u32 REGPARAM2 op_4479_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jff_NEG_w(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L Dn */ +uae_u32 REGPARAM2 op_4480_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + jff_NEG_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (An) */ +uae_u32 REGPARAM2 op_4490_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + jff_NEG_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (An)+ */ +uae_u32 REGPARAM2 op_4498_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + jff_NEG_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L -(An) */ +uae_u32 REGPARAM2 op_44a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + jff_NEG_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (d16,An) */ +uae_u32 REGPARAM2 op_44a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + jff_NEG_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_44b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + jff_NEG_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (xxx).W */ +uae_u32 REGPARAM2 op_44b8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + jff_NEG_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (xxx).L */ +uae_u32 REGPARAM2 op_44b9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + jff_NEG_l(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B Dn */ +uae_u32 REGPARAM2 op_4600_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_NOT_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (An) */ +uae_u32 REGPARAM2 op_4610_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_NOT_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (An)+ */ +uae_u32 REGPARAM2 op_4618_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_NOT_b(src); + live_flags(); + writebyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B -(An) */ +uae_u32 REGPARAM2 op_4620_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_NOT_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (d16,An) */ +uae_u32 REGPARAM2 op_4628_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_NOT_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4630_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_NOT_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (xxx).W */ +uae_u32 REGPARAM2 op_4638_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_NOT_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (xxx).L */ +uae_u32 REGPARAM2 op_4639_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_NOT_b(src); + live_flags(); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W Dn */ +uae_u32 REGPARAM2 op_4640_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_NOT_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (An) */ +uae_u32 REGPARAM2 op_4650_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_NOT_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (An)+ */ +uae_u32 REGPARAM2 op_4658_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_NOT_w(src); + live_flags(); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W -(An) */ +uae_u32 REGPARAM2 op_4660_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_NOT_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (d16,An) */ +uae_u32 REGPARAM2 op_4668_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_NOT_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4670_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_NOT_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (xxx).W */ +uae_u32 REGPARAM2 op_4678_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_NOT_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (xxx).L */ +uae_u32 REGPARAM2 op_4679_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_NOT_w(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L Dn */ +uae_u32 REGPARAM2 op_4680_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_NOT_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (An) */ +uae_u32 REGPARAM2 op_4690_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_NOT_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (An)+ */ +uae_u32 REGPARAM2 op_4698_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_NOT_l(src); + live_flags(); + writelong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L -(An) */ +uae_u32 REGPARAM2 op_46a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_NOT_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (d16,An) */ +uae_u32 REGPARAM2 op_46a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_NOT_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_46b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_NOT_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (xxx).W */ +uae_u32 REGPARAM2 op_46b8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_NOT_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (xxx).L */ +uae_u32 REGPARAM2 op_46b9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_NOT_l(src); + live_flags(); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LINK.L An,#.L */ +uae_u32 REGPARAM2 op_4808_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + if (srcreg == 7) dodgy = 1; + int src = dodgy ? alloc_scratch() : srcreg + 8; + if (dodgy) + mov_l_rr(src, srcreg + 8); + uae_s32 offs = comp_get_ilong((m68k_pc_offset += 4) - 4); /* absl */ + sub_l_ri(15, 4); + writelong_clobber(15, src); + if (!dodgy) + mov_l_rr(src, 15); + arm_ADD_l_ri(15, offs); + if (srcreg + 8 != src) + mov_l_rr(srcreg + 8, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SWAP.W Dn */ +uae_u32 REGPARAM2 op_4840_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_SWAP(src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (An) */ +uae_u32 REGPARAM2 op_4850_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + if (srcreg == 7) dodgy = 1; + int srca = dodgy ? alloc_scratch() : srcreg + 8; + if (dodgy) + mov_l_rr(srca, srcreg + 8); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (d16,An) */ +uae_u32 REGPARAM2 op_4868_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + if (srcreg == 7) dodgy = 1; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4870_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + if (srcreg == 7) dodgy = 1; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (xxx).W */ +uae_u32 REGPARAM2 op_4878_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (xxx).L */ +uae_u32 REGPARAM2 op_4879_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (d16,PC) */ +uae_u32 REGPARAM2 op_487a_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_487b_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + { + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXT.W Dn */ +uae_u32 REGPARAM2 op_4880_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_EXT_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,(An) */ +uae_u32 REGPARAM2 op_4890_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_w(native, i, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writeword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,-(An) */ +uae_u32 REGPARAM2 op_48a0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + offset -= 2; + jnf_MVMLE_w(native, 15 - i, offset); + } + } + lea_l_brr(8 + dstreg, srca, (uae_s32) offset); + } else { + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + arm_SUB_l_ri8(srca, 2); + writeword(srca, 15 - i); + } + } + mov_l_rr(8 + dstreg, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_48a8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_w(native, i, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writeword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_48b0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_w(native, i, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writeword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_48b8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_w(native, i, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writeword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_48b9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_w(native, i, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writeword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXT.L Dn */ +uae_u32 REGPARAM2 op_48c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_EXT_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,(An) */ +uae_u32 REGPARAM2 op_48d0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_l(native, i, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writelong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,-(An) */ +uae_u32 REGPARAM2 op_48e0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + offset -= 4; + jnf_MVMLE_l(native, 15 - i, offset); + } + } + lea_l_brr(8 + dstreg, srca, (uae_s32) offset); + } else { + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + arm_SUB_l_ri8(srca, 4); + writelong(srca, 15 - i); + } + } + mov_l_rr(8 + dstreg, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_48e8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_l(native, i, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writelong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_48f0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_l(native, i, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writelong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_48f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_l(native, i, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writelong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_48f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_l(native, i, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writelong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXT.B Dn */ +uae_u32 REGPARAM2 op_49c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_EXT_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B Dn */ +uae_u32 REGPARAM2 op_4a00_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_TST_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (An) */ +uae_u32 REGPARAM2 op_4a10_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (An)+ */ +uae_u32 REGPARAM2 op_4a18_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B -(An) */ +uae_u32 REGPARAM2 op_4a20_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (d16,An) */ +uae_u32 REGPARAM2 op_4a28_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4a30_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (xxx).W */ +uae_u32 REGPARAM2 op_4a38_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (xxx).L */ +uae_u32 REGPARAM2 op_4a39_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (d16,PC) */ +uae_u32 REGPARAM2 op_4a3a_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4a3b_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B #.B */ +uae_u32 REGPARAM2 op_4a3c_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_b(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W Dn */ +uae_u32 REGPARAM2 op_4a40_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W An */ +uae_u32 REGPARAM2 op_4a48_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (An) */ +uae_u32 REGPARAM2 op_4a50_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (An)+ */ +uae_u32 REGPARAM2 op_4a58_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W -(An) */ +uae_u32 REGPARAM2 op_4a60_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (d16,An) */ +uae_u32 REGPARAM2 op_4a68_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4a70_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (xxx).W */ +uae_u32 REGPARAM2 op_4a78_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (xxx).L */ +uae_u32 REGPARAM2 op_4a79_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (d16,PC) */ +uae_u32 REGPARAM2 op_4a7a_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4a7b_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W #.W */ +uae_u32 REGPARAM2 op_4a7c_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + jff_TST_w(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L Dn */ +uae_u32 REGPARAM2 op_4a80_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L An */ +uae_u32 REGPARAM2 op_4a88_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (An) */ +uae_u32 REGPARAM2 op_4a90_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (An)+ */ +uae_u32 REGPARAM2 op_4a98_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + arm_ADD_l_ri8(srcreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L -(An) */ +uae_u32 REGPARAM2 op_4aa0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (d16,An) */ +uae_u32 REGPARAM2 op_4aa8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4ab0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (xxx).W */ +uae_u32 REGPARAM2 op_4ab8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (xxx).L */ +uae_u32 REGPARAM2 op_4ab9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (d16,PC) */ +uae_u32 REGPARAM2 op_4aba_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4abb_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L #.L */ +uae_u32 REGPARAM2 op_4abc_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + dont_care_flags(); + jff_TST_l(src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,Dn */ +uae_u32 REGPARAM2 op_4c00_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dst = dstreg; + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(An) */ +uae_u32 REGPARAM2 op_4c10_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_4c18_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,-(An) */ +uae_u32 REGPARAM2 op_4c20_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4c28_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4c30_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4c38_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4c39_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4c3a_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4c3b_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,#.L */ +uae_u32 REGPARAM2 op_4c3c_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dst = alloc_scratch(); + mov_l_ri(dst, comp_get_ilong((m68k_pc_offset += 4) - 4)); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jff_MULS64(r2, r3); + } else { + jff_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jff_MULS32(r2, dst); + } else { + jff_MULU32(r2, dst); + } + } + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DIVL.L #.W,Dn */ +uae_u32 REGPARAM2 op_4c40_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dst=dstreg; + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(An) */ +uae_u32 REGPARAM2 op_4c50_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=dstreg+8; + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_4c58_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=dstreg+8; + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dstreg+8,4); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,-(An) */ +uae_u32 REGPARAM2 op_4c60_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=dstreg+8; + arm_SUB_l_ri8(dstreg+8,4); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4c68_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4c70_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4c78_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4c79_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4c7a_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta,address+PC16off); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4c7b_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + int pctmp=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); + release_scratch(pctmp); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,#.L */ +uae_u32 REGPARAM2 op_4c7c_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dst=alloc_scratch(); + mov_l_ri(dst,comp_get_ilong((m68k_pc_offset+=4)-4)); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jff_DIVLS32(r2,dst,r3); + } else { + jff_DIVLU32(r2,dst,r3); + } + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* MVMEL.W #.W,(An) */ +uae_u32 REGPARAM2 op_4c90_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_4c98_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + if (srca != i) + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + jnf_ADD_im8(8 + dstreg, srca, offset); + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + mov_l_rr(8 + dstreg, tmp); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4ca8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4cb0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4cb8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4cb9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4cba_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4cbb_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(An) */ +uae_u32 REGPARAM2 op_4cd0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_4cd8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + if (srca != i) + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + jnf_ADD_im8(8 + dstreg, srca, offset); + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + mov_l_rr(8 + dstreg, tmp); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4ce8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4cf0_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4cf8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4cf9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4cfa_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4cfb_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LINK.W An,#.W */ +uae_u32 REGPARAM2 op_4e50_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + if (srcreg == 7) dodgy = 1; + int src = dodgy ? alloc_scratch() : srcreg + 8; + if (dodgy) + mov_l_rr(src, srcreg + 8); + uae_s32 offs = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + sub_l_ri(15, 4); + writelong_clobber(15, src); + if (!dodgy) + mov_l_rr(src, 15); + arm_ADD_l_ri(15, offs); + if (srcreg + 8 != src) + mov_l_rr(srcreg + 8, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* UNLK.L An */ +uae_u32 REGPARAM2 op_4e58_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + if (src == 15) { + readlong(15, src); + } else { + mov_l_rr(15, src); + readlong(15, src); + arm_ADD_l_ri8(15, 4); + } + if (srcreg + 8 != src) + mov_l_rr(srcreg + 8, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOP.L */ +uae_u32 REGPARAM2 op_4e71_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RTD.L #.W */ +uae_u32 REGPARAM2 op_4e74_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 offs = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + offs += 4; + { + int newad = alloc_scratch(); + readlong(15, newad); + mov_l_mr((uintptr) ®s.pc, newad); + get_n_addr_jmp(newad, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + arm_ADD_l_ri(15, offs); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RTS.L */ +uae_u32 REGPARAM2 op_4e75_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int newad = alloc_scratch(); + readlong(15, newad); + mov_l_mr((uintptr) ®s.pc, newad); + get_n_addr_jmp(newad, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + arm_ADD_l_ri8(15, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (An) */ +uae_u32 REGPARAM2 op_4e90_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (d16,An) */ +uae_u32 REGPARAM2 op_4ea8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4eb0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (xxx).W */ +uae_u32 REGPARAM2 op_4eb8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (xxx).L */ +uae_u32 REGPARAM2 op_4eb9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (d16,PC) */ +uae_u32 REGPARAM2 op_4eba_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4ebb_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (An) */ +uae_u32 REGPARAM2 op_4ed0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (d16,An) */ +uae_u32 REGPARAM2 op_4ee8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4ef0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (xxx).W */ +uae_u32 REGPARAM2 op_4ef8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (xxx).L */ +uae_u32 REGPARAM2 op_4ef9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (d16,PC) */ +uae_u32 REGPARAM2 op_4efa_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4efb_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,Dn */ +uae_u32 REGPARAM2 op_5000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(An) */ +uae_u32 REGPARAM2 op_5010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(An)+ */ +uae_u32 REGPARAM2 op_5018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,-(An) */ +uae_u32 REGPARAM2 op_5020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(d16,An) */ +uae_u32 REGPARAM2 op_5028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(xxx).W */ +uae_u32 REGPARAM2 op_5038_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(xxx).L */ +uae_u32 REGPARAM2 op_5039_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,Dn */ +uae_u32 REGPARAM2 op_5040_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDAQ.W #,An */ +uae_u32 REGPARAM2 op_5048_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg + 8; + jnf_ADDA_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(An) */ +uae_u32 REGPARAM2 op_5050_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(An)+ */ +uae_u32 REGPARAM2 op_5058_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,-(An) */ +uae_u32 REGPARAM2 op_5060_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(d16,An) */ +uae_u32 REGPARAM2 op_5068_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5070_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(xxx).W */ +uae_u32 REGPARAM2 op_5078_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(xxx).L */ +uae_u32 REGPARAM2 op_5079_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,Dn */ +uae_u32 REGPARAM2 op_5080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDAQ.L #,An */ +uae_u32 REGPARAM2 op_5088_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg + 8; + jnf_ADDA_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,(An) */ +uae_u32 REGPARAM2 op_5090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_5 + +/* ADDQ.L #,(An)+ */ +uae_u32 REGPARAM2 op_5098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,-(An) */ +uae_u32 REGPARAM2 op_50a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,(d16,An) */ +uae_u32 REGPARAM2 op_50a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_50b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,(xxx).W */ +uae_u32 REGPARAM2 op_50b8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,(xxx).L */ +uae_u32 REGPARAM2 op_50b9_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_50c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + mov_b_ri(srcreg, 0xff); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_50c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_50d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_50d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_50e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_50e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_50f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_50f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_50f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,Dn */ +uae_u32 REGPARAM2 op_5100_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(An) */ +uae_u32 REGPARAM2 op_5110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(An)+ */ +uae_u32 REGPARAM2 op_5118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,-(An) */ +uae_u32 REGPARAM2 op_5120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(d16,An) */ +uae_u32 REGPARAM2 op_5128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(xxx).W */ +uae_u32 REGPARAM2 op_5138_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(xxx).L */ +uae_u32 REGPARAM2 op_5139_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,Dn */ +uae_u32 REGPARAM2 op_5140_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBAQ.W #,An */ +uae_u32 REGPARAM2 op_5148_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg + 8; + jnf_SUBA_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(An) */ +uae_u32 REGPARAM2 op_5150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(An)+ */ +uae_u32 REGPARAM2 op_5158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,-(An) */ +uae_u32 REGPARAM2 op_5160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(d16,An) */ +uae_u32 REGPARAM2 op_5168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(xxx).W */ +uae_u32 REGPARAM2 op_5178_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(xxx).L */ +uae_u32 REGPARAM2 op_5179_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,Dn */ +uae_u32 REGPARAM2 op_5180_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBAQ.L #,An */ +uae_u32 REGPARAM2 op_5188_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg + 8; + jnf_SUBA_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(An) */ +uae_u32 REGPARAM2 op_5190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(An)+ */ +uae_u32 REGPARAM2 op_5198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,-(An) */ +uae_u32 REGPARAM2 op_51a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(d16,An) */ +uae_u32 REGPARAM2 op_51a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_51b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(xxx).W */ +uae_u32 REGPARAM2 op_51b8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(xxx).L */ +uae_u32 REGPARAM2 op_51b9_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_51c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + mov_b_ri(srcreg, 0); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_51c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + sub_w_ri(src, 1); + uae_u32 v2; + uae_u32 v1 = get_const(PC_P); + v2 = get_const(offs); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_51d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_51d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_51e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_51e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_51f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_51f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_51f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_52c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 8); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_52c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 8); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_52d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_52d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_52e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_52e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_52f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_52f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_52f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_53c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 9); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_53c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 9); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_53d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_53d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_53e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_53e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_53f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_53f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_53f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_54c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 3); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_54c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 3); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_54d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_54d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_54e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_54e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_54f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_54f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_54f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_55c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_55c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 2); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_55d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_55d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_55e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_55e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_55f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_55f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_55f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_56c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 1); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_56c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 1); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_56d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_56d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_56e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_56e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_56f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_56f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_56f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_57c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 0); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_57c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 0); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_57d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_57d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_57e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_57e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_57f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_57f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_57f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_58c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 7); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_58c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 7); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_58d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_58d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_58e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_58e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_58f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_58f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_58f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_59c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 6); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_59c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 6); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_59d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_59d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_59e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_59e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_59f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_59f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_59f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5ac0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 5); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5ac8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 5); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5ad0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5ad8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ae0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ae8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5af0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5af8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5af9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5bc0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5bc8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 4); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5bd0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5bd8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5be0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5be8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5bf0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5bf8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5bf9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5cc0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 10); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5cc8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 10); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5cd0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5cd8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ce0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ce8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5cf0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5cf8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5cf9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5dc0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 11); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5dc8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 11); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5dd0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5dd8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5de0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5de8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5df0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5df8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5df9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5ec0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 12); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5ec8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 12); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5ed0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5ed8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ee0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ee8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5ef0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5ef8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5ef9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5fc0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 13); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5fc8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 13); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5fd0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5fd8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5fe0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5fe8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5ff0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5ff8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5ff9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6000_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + mov_l_rr(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6001_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + mov_l_rr(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_60ff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + mov_l_rr(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSR.W #.W */ +uae_u32 REGPARAM2 op_6100_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + arm_ADD_l_ri(src, m68k_pc_offset_thisinst + 2); + m68k_pc_offset = 0; + arm_ADD_l(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSRQ.B # */ +uae_u32 REGPARAM2 op_6101_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + arm_ADD_l_ri(src, m68k_pc_offset_thisinst + 2); + m68k_pc_offset = 0; + arm_ADD_l(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSR.L #.L */ +uae_u32 REGPARAM2 op_61ff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + arm_ADD_l_ri(src, m68k_pc_offset_thisinst + 2); + m68k_pc_offset = 0; + arm_ADD_l(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6200_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 8); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6201_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 8); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_62ff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 8); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_6 + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6300_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 9); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6301_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 9); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_63ff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 9); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6400_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 3); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6401_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 3); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_64ff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 3); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6500_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 2); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6501_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 2); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_65ff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 2); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6600_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 1); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6601_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 1); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_66ff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 1); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6700_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 0); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6701_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 0); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_67ff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 0); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6800_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 7); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6801_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 7); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_68ff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 7); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6900_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 6); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6901_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 6); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_69ff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 6); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6a00_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 5); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6a01_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 5); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6aff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 5); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6b00_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 4); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6b01_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 4); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6bff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 4); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6c00_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 10); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6c01_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 10); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6cff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 10); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6d00_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 11); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6d01_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 11); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6dff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 11); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6e00_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 12); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6e01_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 12); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6eff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 12); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6f00_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 13); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6f01_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 13); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6fff_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 13); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEQ.L #,Dn */ +uae_u32 REGPARAM2 op_7000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_MOVE_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,Dn */ +uae_u32 REGPARAM2 op_8000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (An),Dn */ +uae_u32 REGPARAM2 op_8010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (An)+,Dn */ +uae_u32 REGPARAM2 op_8018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B -(An),Dn */ +uae_u32 REGPARAM2 op_8020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_8028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_8030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_8038_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_8039_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_803a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_803b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,Dn */ +uae_u32 REGPARAM2 op_803c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_OR_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,Dn */ +uae_u32 REGPARAM2 op_8040_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (An),Dn */ +uae_u32 REGPARAM2 op_8050_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (An)+,Dn */ +uae_u32 REGPARAM2 op_8058_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W -(An),Dn */ +uae_u32 REGPARAM2 op_8060_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_8068_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_8070_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_8078_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_8079_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_807a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_807b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,Dn */ +uae_u32 REGPARAM2 op_807c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_OR_w_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,Dn */ +uae_u32 REGPARAM2 op_8080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (An),Dn */ +uae_u32 REGPARAM2 op_8090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (An)+,Dn */ +uae_u32 REGPARAM2 op_8098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L -(An),Dn */ +uae_u32 REGPARAM2 op_80a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_80a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_80b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_80b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_80b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_80ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_80bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,Dn */ +uae_u32 REGPARAM2 op_80bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_OR_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DIVU.W Dn,Dn */ +uae_u32 REGPARAM2 op_80c0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int src=srcreg; + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (An),Dn */ +uae_u32 REGPARAM2 op_80d0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (An)+,Dn */ +uae_u32 REGPARAM2 op_80d8_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + int src=alloc_scratch(); + readword(srca,src); + arm_ADD_l_ri8(srcreg+8,2); + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W -(An),Dn */ +uae_u32 REGPARAM2 op_80e0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + arm_SUB_l_ri8(srcreg+8,2); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_80e8_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_80f0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_80f8_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_80f9_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_80fa_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca,address+PC16off); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_80fb_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + int pctmp=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); + release_scratch(pctmp); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W #.W,Dn */ +uae_u32 REGPARAM2 op_80fc_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int src=alloc_scratch(); + mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int dst=dstreg; + register_possible_exception(); + jff_DIVU(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* OR.B Dn,(An) */ +uae_u32 REGPARAM2 op_8110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_8118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_8120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_8128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_8138_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_8139_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_OR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(An) */ +uae_u32 REGPARAM2 op_8150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_8158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,-(An) */ +uae_u32 REGPARAM2 op_8160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_8168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_8178_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_8179_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_OR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(An) */ +uae_u32 REGPARAM2 op_8190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_8198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,-(An) */ +uae_u32 REGPARAM2 op_81a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_81a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_81b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_81b8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_81b9_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_OR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DIVS.W Dn,Dn */ +uae_u32 REGPARAM2 op_81c0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int src=srcreg; + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (An),Dn */ +uae_u32 REGPARAM2 op_81d0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (An)+,Dn */ +uae_u32 REGPARAM2 op_81d8_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + int src=alloc_scratch(); + readword(srca,src); + arm_ADD_l_ri8(srcreg+8,2); + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W -(An),Dn */ +uae_u32 REGPARAM2 op_81e0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + arm_SUB_l_ri8(srcreg+8,2); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_81e8_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_81f0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_81f8_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_81f9_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_81fa_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca,address+PC16off); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_81fb_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + int pctmp=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); + release_scratch(pctmp); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W #.W,Dn */ +uae_u32 REGPARAM2 op_81fc_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int src=alloc_scratch(); + mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int dst=dstreg; + register_possible_exception(); + jff_DIVS(dst,src); + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* SUB.B Dn,Dn */ +uae_u32 REGPARAM2 op_9000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (An),Dn */ +uae_u32 REGPARAM2 op_9010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (An)+,Dn */ +uae_u32 REGPARAM2 op_9018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B -(An),Dn */ +uae_u32 REGPARAM2 op_9020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_9028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_9030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_9038_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_9039_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_903a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_903b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,Dn */ +uae_u32 REGPARAM2 op_903c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_SUB_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,Dn */ +uae_u32 REGPARAM2 op_9040_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W An,Dn */ +uae_u32 REGPARAM2 op_9048_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (An),Dn */ +uae_u32 REGPARAM2 op_9050_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (An)+,Dn */ +uae_u32 REGPARAM2 op_9058_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W -(An),Dn */ +uae_u32 REGPARAM2 op_9060_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_9068_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_9070_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_9078_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_9079_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_907a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_907b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,Dn */ +uae_u32 REGPARAM2 op_907c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_SUB_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,Dn */ +uae_u32 REGPARAM2 op_9080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L An,Dn */ +uae_u32 REGPARAM2 op_9088_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (An),Dn */ +uae_u32 REGPARAM2 op_9090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (An)+,Dn */ +uae_u32 REGPARAM2 op_9098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L -(An),Dn */ +uae_u32 REGPARAM2 op_90a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_90a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_90b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_90b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_90b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_90ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_90bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,Dn */ +uae_u32 REGPARAM2 op_90bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_SUB_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W Dn,An */ +uae_u32 REGPARAM2 op_90c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W An,An */ +uae_u32 REGPARAM2 op_90c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (An),An */ +uae_u32 REGPARAM2 op_90d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (An)+,An */ +uae_u32 REGPARAM2 op_90d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W -(An),An */ +uae_u32 REGPARAM2 op_90e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (d16,An),An */ +uae_u32 REGPARAM2 op_90e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_90f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_90f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_90f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_90fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_90fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W #.W,An */ +uae_u32 REGPARAM2 op_90fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg + 8; + jnf_SUBA_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.B Dn,Dn */ +uae_u32 REGPARAM2 op_9100_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + make_flags_live(); + jff_SUBX_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.B -(An),-(An) */ +uae_u32 REGPARAM2 op_9108_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + make_flags_live(); + jff_SUBX_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(An) */ +uae_u32 REGPARAM2 op_9110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_9118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,-(An) */ +uae_u32 REGPARAM2 op_9120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_9128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_9130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_9138_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_9139_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_SUB_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.W Dn,Dn */ +uae_u32 REGPARAM2 op_9140_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + make_flags_live(); + jff_SUBX_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.W -(An),-(An) */ +uae_u32 REGPARAM2 op_9148_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + make_flags_live(); + jff_SUBX_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(An) */ +uae_u32 REGPARAM2 op_9150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_9158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,-(An) */ +uae_u32 REGPARAM2 op_9160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_9168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_9170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_9178_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_9179_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_SUB_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.L Dn,Dn */ +uae_u32 REGPARAM2 op_9180_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + make_flags_live(); + jff_SUBX_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.L -(An),-(An) */ +uae_u32 REGPARAM2 op_9188_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + make_flags_live(); + jff_SUBX_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(An) */ +uae_u32 REGPARAM2 op_9190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_9198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,-(An) */ +uae_u32 REGPARAM2 op_91a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_91a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_91b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_91b8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_91b9_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_SUB_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L Dn,An */ +uae_u32 REGPARAM2 op_91c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L An,An */ +uae_u32 REGPARAM2 op_91c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (An),An */ +uae_u32 REGPARAM2 op_91d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (An)+,An */ +uae_u32 REGPARAM2 op_91d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L -(An),An */ +uae_u32 REGPARAM2 op_91e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (d16,An),An */ +uae_u32 REGPARAM2 op_91e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_91f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_91f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_91f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_91fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_91fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L #.L,An */ +uae_u32 REGPARAM2 op_91fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg + 8; + jnf_SUBA_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B Dn,Dn */ +uae_u32 REGPARAM2 op_b000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (An),Dn */ +uae_u32 REGPARAM2 op_b010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (An)+,Dn */ +uae_u32 REGPARAM2 op_b018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B -(An),Dn */ +uae_u32 REGPARAM2 op_b020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_b028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b038_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b039_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b03a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b03b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,Dn */ +uae_u32 REGPARAM2 op_b03c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_CMP_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W Dn,Dn */ +uae_u32 REGPARAM2 op_b040_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W An,Dn */ +uae_u32 REGPARAM2 op_b048_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (An),Dn */ +uae_u32 REGPARAM2 op_b050_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (An)+,Dn */ +uae_u32 REGPARAM2 op_b058_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W -(An),Dn */ +uae_u32 REGPARAM2 op_b060_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_b068_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b070_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b078_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b079_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b07a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b07b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,Dn */ +uae_u32 REGPARAM2 op_b07c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_CMP_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L Dn,Dn */ +uae_u32 REGPARAM2 op_b080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L An,Dn */ +uae_u32 REGPARAM2 op_b088_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (An),Dn */ +uae_u32 REGPARAM2 op_b090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_7 + +/* CMP.L (An)+,Dn */ +uae_u32 REGPARAM2 op_b098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L -(An),Dn */ +uae_u32 REGPARAM2 op_b0a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_b0a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b0b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b0b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b0b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b0ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b0bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,Dn */ +uae_u32 REGPARAM2 op_b0bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_CMP_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W Dn,An */ +uae_u32 REGPARAM2 op_b0c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W An,An */ +uae_u32 REGPARAM2 op_b0c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (An),An */ +uae_u32 REGPARAM2 op_b0d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (An)+,An */ +uae_u32 REGPARAM2 op_b0d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W -(An),An */ +uae_u32 REGPARAM2 op_b0e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (d16,An),An */ +uae_u32 REGPARAM2 op_b0e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_b0f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_b0f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_b0f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_b0fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_b0fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W #.W,An */ +uae_u32 REGPARAM2 op_b0fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,Dn */ +uae_u32 REGPARAM2 op_b100_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_EOR_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPM.B (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b108_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_CMP_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(An) */ +uae_u32 REGPARAM2 op_b110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_b118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_b120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b138_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b139_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_EOR_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,Dn */ +uae_u32 REGPARAM2 op_b140_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_EOR_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPM.W (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b148_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_CMP_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(An) */ +uae_u32 REGPARAM2 op_b150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_b158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w(dst, src); + live_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,-(An) */ +uae_u32 REGPARAM2 op_b160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b178_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b179_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_EOR_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,Dn */ +uae_u32 REGPARAM2 op_b180_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_EOR_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPM.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b188_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_CMP_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(An) */ +uae_u32 REGPARAM2 op_b190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_b198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l(dst, src); + live_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,-(An) */ +uae_u32 REGPARAM2 op_b1a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b1a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b1b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b1b8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b1b9_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_EOR_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L Dn,An */ +uae_u32 REGPARAM2 op_b1c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L An,An */ +uae_u32 REGPARAM2 op_b1c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (An),An */ +uae_u32 REGPARAM2 op_b1d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (An)+,An */ +uae_u32 REGPARAM2 op_b1d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L -(An),An */ +uae_u32 REGPARAM2 op_b1e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (d16,An),An */ +uae_u32 REGPARAM2 op_b1e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_b1f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_b1f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_b1f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_b1fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_b1fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L #.L,An */ +uae_u32 REGPARAM2 op_b1fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg + 8; + dont_care_flags(); + jff_CMPA_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,Dn */ +uae_u32 REGPARAM2 op_c000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (An),Dn */ +uae_u32 REGPARAM2 op_c010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (An)+,Dn */ +uae_u32 REGPARAM2 op_c018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B -(An),Dn */ +uae_u32 REGPARAM2 op_c020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_c028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c038_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c039_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c03a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c03b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,Dn */ +uae_u32 REGPARAM2 op_c03c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_AND_b_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,Dn */ +uae_u32 REGPARAM2 op_c040_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (An),Dn */ +uae_u32 REGPARAM2 op_c050_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c058_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W -(An),Dn */ +uae_u32 REGPARAM2 op_c060_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c068_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c070_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c078_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c079_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c07a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c07b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,Dn */ +uae_u32 REGPARAM2 op_c07c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_AND_w_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,Dn */ +uae_u32 REGPARAM2 op_c080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (An),Dn */ +uae_u32 REGPARAM2 op_c090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (An)+,Dn */ +uae_u32 REGPARAM2 op_c098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L -(An),Dn */ +uae_u32 REGPARAM2 op_c0a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_c0a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c0b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c0b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c0b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c0ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c0bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,Dn */ +uae_u32 REGPARAM2 op_c0bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_AND_l_imm(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W Dn,Dn */ +uae_u32 REGPARAM2 op_c0c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int src = srcreg; + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (An),Dn */ +uae_u32 REGPARAM2 op_c0d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c0d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W -(An),Dn */ +uae_u32 REGPARAM2 op_c0e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c0e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c0f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c0f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c0f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c0fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c0fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W #.W,Dn */ +uae_u32 REGPARAM2 op_c0fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = dstreg; + jff_MULU(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(An) */ +uae_u32 REGPARAM2 op_c110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_c118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,-(An) */ +uae_u32 REGPARAM2 op_c120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c138_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c139_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_AND_b(dst, src); + live_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXG.L Dn,Dn */ +uae_u32 REGPARAM2 op_c140_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + int tmp = alloc_scratch(); + mov_l_rr(tmp, src); + if (srcreg != dst) + mov_l_rr(srcreg, dst); + if (dstreg != tmp) + mov_l_rr(dstreg, tmp); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXG.L An,An */ +uae_u32 REGPARAM2 op_c148_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + int tmp = alloc_scratch(); + mov_l_rr(tmp, src); + if (srcreg + 8 != dst) + mov_l_rr(srcreg + 8, dst); + if (dstreg + 8 != tmp) + mov_l_rr(dstreg + 8, tmp); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(An) */ +uae_u32 REGPARAM2 op_c150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_c158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,-(An) */ +uae_u32 REGPARAM2 op_c160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c178_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c179_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_AND_w(dst, src); + live_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXG.L Dn,An */ +uae_u32 REGPARAM2 op_c188_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + int tmp = alloc_scratch(); + mov_l_rr(tmp, src); + if (srcreg != dst) + mov_l_rr(srcreg, dst); + if (dstreg + 8 != tmp) + mov_l_rr(dstreg + 8, tmp); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(An) */ +uae_u32 REGPARAM2 op_c190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_c198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,-(An) */ +uae_u32 REGPARAM2 op_c1a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c1a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c1b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c1b8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c1b9_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_AND_l(dst, src); + live_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W Dn,Dn */ +uae_u32 REGPARAM2 op_c1c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int src = srcreg; + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (An),Dn */ +uae_u32 REGPARAM2 op_c1d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c1d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W -(An),Dn */ +uae_u32 REGPARAM2 op_c1e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c1e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c1f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c1f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c1f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c1fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c1fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W #.W,Dn */ +uae_u32 REGPARAM2 op_c1fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = dstreg; + jff_MULS(dst, src); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,Dn */ +uae_u32 REGPARAM2 op_d000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (An),Dn */ +uae_u32 REGPARAM2 op_d010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (An)+,Dn */ +uae_u32 REGPARAM2 op_d018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B -(An),Dn */ +uae_u32 REGPARAM2 op_d020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_d028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d038_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d039_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d03a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d03b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,Dn */ +uae_u32 REGPARAM2 op_d03c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_ADD_b_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,Dn */ +uae_u32 REGPARAM2 op_d040_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W An,Dn */ +uae_u32 REGPARAM2 op_d048_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (An),Dn */ +uae_u32 REGPARAM2 op_d050_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (An)+,Dn */ +uae_u32 REGPARAM2 op_d058_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W -(An),Dn */ +uae_u32 REGPARAM2 op_d060_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_d068_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d070_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d078_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d079_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d07a_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d07b_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,Dn */ +uae_u32 REGPARAM2 op_d07c_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jff_ADD_w_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,Dn */ +uae_u32 REGPARAM2 op_d080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L An,Dn */ +uae_u32 REGPARAM2 op_d088_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (An),Dn */ +uae_u32 REGPARAM2 op_d090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (An)+,Dn */ +uae_u32 REGPARAM2 op_d098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L -(An),Dn */ +uae_u32 REGPARAM2 op_d0a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_d0a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d0b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d0b8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d0b9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d0ba_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d0bb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,Dn */ +uae_u32 REGPARAM2 op_d0bc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jff_ADD_l_imm(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W Dn,An */ +uae_u32 REGPARAM2 op_d0c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W An,An */ +uae_u32 REGPARAM2 op_d0c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (An),An */ +uae_u32 REGPARAM2 op_d0d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (An)+,An */ +uae_u32 REGPARAM2 op_d0d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W -(An),An */ +uae_u32 REGPARAM2 op_d0e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (d16,An),An */ +uae_u32 REGPARAM2 op_d0e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_d0f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_d0f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_d0f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_d0fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_d0fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W #.W,An */ +uae_u32 REGPARAM2 op_d0fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg + 8; + jnf_ADDA_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.B Dn,Dn */ +uae_u32 REGPARAM2 op_d100_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + make_flags_live(); + jff_ADDX_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.B -(An),-(An) */ +uae_u32 REGPARAM2 op_d108_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + make_flags_live(); + jff_ADDX_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(An) */ +uae_u32 REGPARAM2 op_d110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_d118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,-(An) */ +uae_u32 REGPARAM2 op_d120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d138_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d139_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jff_ADD_b(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.W Dn,Dn */ +uae_u32 REGPARAM2 op_d140_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + make_flags_live(); + jff_ADDX_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.W -(An),-(An) */ +uae_u32 REGPARAM2 op_d148_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + make_flags_live(); + jff_ADDX_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(An) */ +uae_u32 REGPARAM2 op_d150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_d158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,-(An) */ +uae_u32 REGPARAM2 op_d160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d178_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d179_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jff_ADD_w(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.L Dn,Dn */ +uae_u32 REGPARAM2 op_d180_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + make_flags_live(); + jff_ADDX_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.L -(An),-(An) */ +uae_u32 REGPARAM2 op_d188_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + make_flags_live(); + jff_ADDX_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(An) */ +uae_u32 REGPARAM2 op_d190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_d198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,-(An) */ +uae_u32 REGPARAM2 op_d1a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d1a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d1b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d1b8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d1b9_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jff_ADD_l(dst, src); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L Dn,An */ +uae_u32 REGPARAM2 op_d1c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L An,An */ +uae_u32 REGPARAM2 op_d1c8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (An),An */ +uae_u32 REGPARAM2 op_d1d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (An)+,An */ +uae_u32 REGPARAM2 op_d1d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L -(An),An */ +uae_u32 REGPARAM2 op_d1e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (d16,An),An */ +uae_u32 REGPARAM2 op_d1e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_d1f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_d1f8_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_d1f9_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_d1fa_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_d1fb_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L #.L,An */ +uae_u32 REGPARAM2 op_d1fc_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg + 8; + jnf_ADDA_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRQ.B #,Dn */ +uae_u32 REGPARAM2 op_e000_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASR_b_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRQ.B #,Dn */ +uae_u32 REGPARAM2 op_e008_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSR_b_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXRQ.B #,Dn */ +uae_u32 REGPARAM2 op_e010_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + make_flags_live(); + jff_ROXR_b(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORQ.B #,Dn */ +uae_u32 REGPARAM2 op_e018_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jff_ROR_b(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e020_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASR_b_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e028_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSR_b_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_8 + +/* ROXR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e030_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + make_flags_live(); + jff_ROXR_b(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e038_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jff_ROR_b(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRQ.W #,Dn */ +uae_u32 REGPARAM2 op_e040_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASR_w_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRQ.W #,Dn */ +uae_u32 REGPARAM2 op_e048_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSR_w_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXRQ.W #,Dn */ +uae_u32 REGPARAM2 op_e050_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + make_flags_live(); + jff_ROXR_w(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORQ.W #,Dn */ +uae_u32 REGPARAM2 op_e058_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jff_ROR_w(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e060_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASR_w_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e068_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSR_w_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e070_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + make_flags_live(); + jff_ROXR_w(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e078_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jff_ROR_w(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRQ.L #,Dn */ +uae_u32 REGPARAM2 op_e080_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASR_l_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRQ.L #,Dn */ +uae_u32 REGPARAM2 op_e088_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSR_l_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXRQ.L #,Dn */ +uae_u32 REGPARAM2 op_e090_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + make_flags_live(); + jff_ROXR_l(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORQ.L #,Dn */ +uae_u32 REGPARAM2 op_e098_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jff_ROR_l(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASR_l_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSR_l_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + make_flags_live(); + jff_ROXR_l(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0b8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jff_ROR_l(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (An) */ +uae_u32 REGPARAM2 op_e0d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_ASRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (An)+ */ +uae_u32 REGPARAM2 op_e0d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_ASRW(src); + live_flags(); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W -(An) */ +uae_u32 REGPARAM2 op_e0e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jff_ASRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (d16,An) */ +uae_u32 REGPARAM2 op_e0e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_ASRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e0f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jff_ASRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (xxx).W */ +uae_u32 REGPARAM2 op_e0f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_ASRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (xxx).L */ +uae_u32 REGPARAM2 op_e0f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jff_ASRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e100_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASL_b_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e108_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSL_b_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e110_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + make_flags_live(); + jff_ROXL_b(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e118_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jff_ROL_b(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e120_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASL_b_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e128_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSL_b_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e130_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + make_flags_live(); + jff_ROXL_b(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e138_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jff_ROL_b(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e140_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASL_w_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e148_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSL_w_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e150_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + make_flags_live(); + jff_ROXL_w(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e158_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jff_ROL_w(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e160_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASL_w_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e168_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSL_w_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e170_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + make_flags_live(); + jff_ROXL_w(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e178_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jff_ROL_w(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e180_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASL_l_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e188_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSL_l_imm(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e190_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + make_flags_live(); + jff_ROXL_l(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e198_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jff_ROL_l(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1a0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_ASL_l_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1a8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jff_LSL_l_reg(data, srcreg); + live_flags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1b0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + make_flags_live(); + jff_ROXL_l(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1b8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jff_ROL_l(data, cnt); + live_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (An) */ +uae_u32 REGPARAM2 op_e1d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_ASLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (An)+ */ +uae_u32 REGPARAM2 op_e1d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_ASLW(src); + live_flags(); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W -(An) */ +uae_u32 REGPARAM2 op_e1e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jff_ASLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (d16,An) */ +uae_u32 REGPARAM2 op_e1e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_ASLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e1f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jff_ASLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (xxx).W */ +uae_u32 REGPARAM2 op_e1f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_ASLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (xxx).L */ +uae_u32 REGPARAM2 op_e1f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jff_ASLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (An) */ +uae_u32 REGPARAM2 op_e2d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_LSRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (An)+ */ +uae_u32 REGPARAM2 op_e2d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_LSRW(src); + live_flags(); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W -(An) */ +uae_u32 REGPARAM2 op_e2e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jff_LSRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (d16,An) */ +uae_u32 REGPARAM2 op_e2e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_LSRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e2f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jff_LSRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (xxx).W */ +uae_u32 REGPARAM2 op_e2f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_LSRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (xxx).L */ +uae_u32 REGPARAM2 op_e2f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jff_LSRW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (An) */ +uae_u32 REGPARAM2 op_e3d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_LSLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (An)+ */ +uae_u32 REGPARAM2 op_e3d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_LSLW(src); + live_flags(); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W -(An) */ +uae_u32 REGPARAM2 op_e3e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jff_LSLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (d16,An) */ +uae_u32 REGPARAM2 op_e3e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_LSLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e3f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jff_LSLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (xxx).W */ +uae_u32 REGPARAM2 op_e3f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_LSLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (xxx).L */ +uae_u32 REGPARAM2 op_e3f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jff_LSLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (An) */ +uae_u32 REGPARAM2 op_e6d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_RORW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (An)+ */ +uae_u32 REGPARAM2 op_e6d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_RORW(src); + live_flags(); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W -(An) */ +uae_u32 REGPARAM2 op_e6e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jff_RORW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (d16,An) */ +uae_u32 REGPARAM2 op_e6e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_RORW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e6f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jff_RORW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (xxx).W */ +uae_u32 REGPARAM2 op_e6f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_RORW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (xxx).L */ +uae_u32 REGPARAM2 op_e6f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jff_RORW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (An) */ +uae_u32 REGPARAM2 op_e7d0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_ROLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (An)+ */ +uae_u32 REGPARAM2 op_e7d8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jff_ROLW(src); + live_flags(); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W -(An) */ +uae_u32 REGPARAM2 op_e7e0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jff_ROLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (d16,An) */ +uae_u32 REGPARAM2 op_e7e8_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_ROLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e7f0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jff_ROLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (xxx).W */ +uae_u32 REGPARAM2 op_e7f8_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jff_ROLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (xxx).L */ +uae_u32 REGPARAM2 op_e7f9_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jff_ROLW(src); + live_flags(); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BFINS.L #.W,Dn */ +uae_u32 REGPARAM2 op_efc0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dst=dstreg; + if ((extra & 0x0820) == 0x0000) { + jff_BFINS_ii(dst, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0800) { + jff_BFINS_di(dst, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jff_BFINS_id(dst, srcreg, offs, width); + } else { + jff_BFINS_dd(dst, srcreg, offs, width); + } + live_flags(); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* BFINS.L #.W,(An) */ +uae_u32 REGPARAM2 op_efd0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dsta=alloc_scratch(); + mov_l_rr(dsta,dstreg+8); + if ((extra & 0x0800) == 0x0800) { + arm_ADD_ldiv8(dsta,offs); + } + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dsta, 4); + int dst2=alloc_scratch(); + readlong(dsta,dst2); + if ((extra & 0x0820) == 0x0000) { + if(32 - offs - width >= 0) { + jff_BFINS_ii(dst, srcreg, offs, width); + } else { + jff_BFINS2_ii(dst, dst2, srcreg, offs, width); + } + } else if ((extra & 0x0820) == 0x0800) { + jff_BFINS2_di(dst, dst2, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jff_BFINS2_id(dst, dst2, srcreg, offs, width); + } else { + jff_BFINS2_dd(dst, dst2, srcreg, offs, width); + } + live_flags(); + writelong(dsta,dst2); + arm_SUB_l_ri8(dsta, 4); + writelong(dsta,dst); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* BFINS.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_efe8_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dsta=alloc_scratch(); + lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if ((extra & 0x0800) == 0x0800) { + arm_ADD_ldiv8(dsta,offs); + } + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dsta, 4); + int dst2=alloc_scratch(); + readlong(dsta,dst2); + if ((extra & 0x0820) == 0x0000) { + if(32 - offs - width >= 0) { + jff_BFINS_ii(dst, srcreg, offs, width); + } else { + jff_BFINS2_ii(dst, dst2, srcreg, offs, width); + } + } else if ((extra & 0x0820) == 0x0800) { + jff_BFINS2_di(dst, dst2, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jff_BFINS2_id(dst, dst2, srcreg, offs, width); + } else { + jff_BFINS2_dd(dst, dst2, srcreg, offs, width); + } + live_flags(); + writelong(dsta,dst2); + arm_SUB_l_ri8(dsta, 4); + writelong(dsta,dst); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* BFINS.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_eff0_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dsta=alloc_scratch(); + calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); + if ((extra & 0x0800) == 0x0800) { + arm_ADD_ldiv8(dsta,offs); + } + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dsta, 4); + int dst2=alloc_scratch(); + readlong(dsta,dst2); + if ((extra & 0x0820) == 0x0000) { + if(32 - offs - width >= 0) { + jff_BFINS_ii(dst, srcreg, offs, width); + } else { + jff_BFINS2_ii(dst, dst2, srcreg, offs, width); + } + } else if ((extra & 0x0820) == 0x0800) { + jff_BFINS2_di(dst, dst2, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jff_BFINS2_id(dst, dst2, srcreg, offs, width); + } else { + jff_BFINS2_dd(dst, dst2, srcreg, offs, width); + } + live_flags(); + writelong(dsta,dst2); + arm_SUB_l_ri8(dsta, 4); + writelong(dsta,dst); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* BFINS.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_eff8_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dsta=alloc_scratch(); + mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if ((extra & 0x0800) == 0x0800) { + arm_ADD_ldiv8(dsta,offs); + } + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dsta, 4); + int dst2=alloc_scratch(); + readlong(dsta,dst2); + if ((extra & 0x0820) == 0x0000) { + if(32 - offs - width >= 0) { + jff_BFINS_ii(dst, srcreg, offs, width); + } else { + jff_BFINS2_ii(dst, dst2, srcreg, offs, width); + } + } else if ((extra & 0x0820) == 0x0800) { + jff_BFINS2_di(dst, dst2, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jff_BFINS2_id(dst, dst2, srcreg, offs, width); + } else { + jff_BFINS2_dd(dst, dst2, srcreg, offs, width); + } + live_flags(); + writelong(dsta,dst2); + arm_SUB_l_ri8(dsta, 4); + writelong(dsta,dst); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* BFINS.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_eff9_0_comp_ff(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dsta=alloc_scratch(); + mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + if ((extra & 0x0800) == 0x0800) { + arm_ADD_ldiv8(dsta,offs); + } + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dsta, 4); + int dst2=alloc_scratch(); + readlong(dsta,dst2); + if ((extra & 0x0820) == 0x0000) { + if(32 - offs - width >= 0) { + jff_BFINS_ii(dst, srcreg, offs, width); + } else { + jff_BFINS2_ii(dst, dst2, srcreg, offs, width); + } + } else if ((extra & 0x0820) == 0x0800) { + jff_BFINS2_di(dst, dst2, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jff_BFINS2_id(dst, dst2, srcreg, offs, width); + } else { + jff_BFINS2_dd(dst, dst2, srcreg, offs, width); + } + live_flags(); + writelong(dsta,dst2); + arm_SUB_l_ri8(dsta, 4); + writelong(dsta,dst); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* FPP.L #.W,Dn */ +uae_u32 REGPARAM2 op_f200_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,An */ +uae_u32 REGPARAM2 op_f208_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(An) */ +uae_u32 REGPARAM2 op_f210_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_f218_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,-(An) */ +uae_u32 REGPARAM2 op_f220_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_f228_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_f230_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_f238_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_f239_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_f23a_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_f23b_0_comp_ff(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,#.L */ +uae_u32 REGPARAM2 op_f23c_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,Dn */ +uae_u32 REGPARAM2 op_f240_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(An) */ +uae_u32 REGPARAM2 op_f250_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_f258_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,-(An) */ +uae_u32 REGPARAM2 op_f260_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_f268_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_f270_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_f278_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_f279_0_comp_ff(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FBccQ.L #,#.W */ +uae_u32 REGPARAM2 op_f280_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 63); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + comp_fbcc_opp(opcode); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FBccQ.L #,#.L */ +uae_u32 REGPARAM2 op_f2c0_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 63); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + comp_fbcc_opp(opcode); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* MOVE16.L (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_f600_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (special_mem) { + FAIL(1); + return 0; + } + int srca = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + jnf_ADD_im8(srcreg + 8, srcreg + 8, 16); + jnf_MOVE16(dsta, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* MOVE16.L (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_f608_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (special_mem) { + FAIL(1); + return 0; + } + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dsta = dstreg + 8; + jnf_ADD_im8(dstreg + 8, dstreg + 8, 16); + jnf_MOVE16(dsta, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* MOVE16.L (An),(xxx).L */ +uae_u32 REGPARAM2 op_f610_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (special_mem) { + FAIL(1); + return 0; + } + int srca = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + jnf_MOVE16(dsta, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* MOVE16.L (xxx).L,(An) */ +uae_u32 REGPARAM2 op_f618_0_comp_ff(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (special_mem) { + FAIL(1); + return 0; + } + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dsta = dstreg + 8; + jnf_MOVE16(dsta, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* MOVE16.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_f620_0_comp_ff(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_s32 dstreg = 0; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (special_mem) { + FAIL(1); + return 0; + } + { + uae_u16 dstreg = ((comp_get_iword((m68k_pc_offset += 2) - 2)) >> 12) & 0x07; + int srca = srcreg + 8; + int dsta = dstreg + 8; + jnf_MOVE16(dsta, srca); + if (srcreg != dstreg) + jnf_ADD_im8(srcreg + 8, srcreg + 8, 16); + jnf_ADD_im8(dstreg + 8, dstreg + 8, 16); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +#endif + + +#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) + #define PART_1 1 +#define PART_2 1 +#define PART_3 1 +#define PART_4 1 +#define PART_5 1 +#define PART_6 1 +#define PART_7 1 +#define PART_8 1 +#endif + +extern void comp_fpp_opp(); + +extern void comp_fscc_opp(); + +extern void comp_fbcc_opp(); + +#ifdef PART_1 + +/* OR.B #.B,Dn */ +uae_u32 REGPARAM2 op_0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(An) */ +uae_u32 REGPARAM2 op_10_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_18_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b_imm(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,-(An) */ +uae_u32 REGPARAM2 op_20_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_28_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_30_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_38_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_39_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ORSR.B #.W */ +uae_u32 REGPARAM2 op_3c_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,Dn */ +uae_u32 REGPARAM2 op_40_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(An) */ +uae_u32 REGPARAM2 op_50_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_58_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w_imm(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,-(An) */ +uae_u32 REGPARAM2 op_60_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_68_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_70_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_78_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_79_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,Dn */ +uae_u32 REGPARAM2 op_80_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(An) */ +uae_u32 REGPARAM2 op_90_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_98_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l_imm(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,-(An) */ +uae_u32 REGPARAM2 op_a0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_a8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_b8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_b9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.L Dn,Dn */ +uae_u32 REGPARAM2 op_100_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(An) */ +uae_u32 REGPARAM2 op_110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,-(An) */ +uae_u32 REGPARAM2 op_120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_138_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_139_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(d16,PC) */ +uae_u32 REGPARAM2 op_13a_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_13b_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B Dn,#.B */ +uae_u32 REGPARAM2 op_13c_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = alloc_scratch(); + mov_l_ri(dst, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.L Dn,Dn */ +uae_u32 REGPARAM2 op_140_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + jnf_BCHG_l(dst, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(An) */ +uae_u32 REGPARAM2 op_150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,-(An) */ +uae_u32 REGPARAM2 op_160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_178_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_179_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.L Dn,Dn */ +uae_u32 REGPARAM2 op_180_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + jnf_BCLR_l(dst, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(An) */ +uae_u32 REGPARAM2 op_190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_1b8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_1b9_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.L Dn,Dn */ +uae_u32 REGPARAM2 op_1c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + jnf_BSET_l(dst, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(An) */ +uae_u32 REGPARAM2 op_1d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_1d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_1f8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_1f9_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,Dn */ +uae_u32 REGPARAM2 op_200_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(An) */ +uae_u32 REGPARAM2 op_210_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_218_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b_imm(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,-(An) */ +uae_u32 REGPARAM2 op_220_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_228_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_230_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_238_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_239_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ANDSR.B #.W */ +uae_u32 REGPARAM2 op_23c_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,Dn */ +uae_u32 REGPARAM2 op_240_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(An) */ +uae_u32 REGPARAM2 op_250_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_258_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w_imm(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,-(An) */ +uae_u32 REGPARAM2 op_260_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_268_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_270_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_278_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_279_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,Dn */ +uae_u32 REGPARAM2 op_280_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(An) */ +uae_u32 REGPARAM2 op_290_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_298_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l_imm(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,-(An) */ +uae_u32 REGPARAM2 op_2a0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_2a8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2b0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_2b8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_2b9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,Dn */ +uae_u32 REGPARAM2 op_400_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(An) */ +uae_u32 REGPARAM2 op_410_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_418_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,-(An) */ +uae_u32 REGPARAM2 op_420_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_428_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_430_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_438_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_439_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,Dn */ +uae_u32 REGPARAM2 op_440_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(An) */ +uae_u32 REGPARAM2 op_450_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_458_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,-(An) */ +uae_u32 REGPARAM2 op_460_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_468_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_470_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_478_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_479_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,Dn */ +uae_u32 REGPARAM2 op_480_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(An) */ +uae_u32 REGPARAM2 op_490_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_498_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,-(An) */ +uae_u32 REGPARAM2 op_4a0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_4a8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4b0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_4b8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_4b9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,Dn */ +uae_u32 REGPARAM2 op_600_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(An) */ +uae_u32 REGPARAM2 op_610_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_618_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,-(An) */ +uae_u32 REGPARAM2 op_620_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_628_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_630_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_638_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_639_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,Dn */ +uae_u32 REGPARAM2 op_640_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(An) */ +uae_u32 REGPARAM2 op_650_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_658_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,-(An) */ +uae_u32 REGPARAM2 op_660_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_668_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_670_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_678_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_679_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,Dn */ +uae_u32 REGPARAM2 op_680_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(An) */ +uae_u32 REGPARAM2 op_690_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_698_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,-(An) */ +uae_u32 REGPARAM2 op_6a0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_6a8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_6b0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_6b8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_6b9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.L #.W,Dn */ +uae_u32 REGPARAM2 op_800_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(An) */ +uae_u32 REGPARAM2 op_810_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_818_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,-(An) */ +uae_u32 REGPARAM2 op_820_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_828_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_830_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_838_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_839_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_83a_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BTST.B #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_83b_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.L #.W,Dn */ +uae_u32 REGPARAM2 op_840_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + jnf_BCHG_l_imm(dst, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(An) */ +uae_u32 REGPARAM2 op_850_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_858_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,-(An) */ +uae_u32 REGPARAM2 op_860_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_868_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_870_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_878_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCHG.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_879_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCHG_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.L #.W,Dn */ +uae_u32 REGPARAM2 op_880_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + jnf_BCLR_l_imm(dst, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(An) */ +uae_u32 REGPARAM2 op_890_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_898_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,-(An) */ +uae_u32 REGPARAM2 op_8a0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_8a8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8b0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_8b8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BCLR.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_8b9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BCLR_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.L #.W,Dn */ +uae_u32 REGPARAM2 op_8c0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + jnf_BSET_l_imm(dst, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(An) */ +uae_u32 REGPARAM2 op_8d0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_8d8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,-(An) */ +uae_u32 REGPARAM2 op_8e0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_8e8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8f0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_8f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSET.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_8f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + jnf_BSET_b_imm(dst, src); + dont_care_flags(); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,Dn */ +uae_u32 REGPARAM2 op_a00_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_EOR_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(An) */ +uae_u32 REGPARAM2 op_a10_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_a18_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b_imm(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,-(An) */ +uae_u32 REGPARAM2 op_a20_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_a28_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_a30_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_a38_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_a39_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EORSR.B #.W */ +uae_u32 REGPARAM2 op_a3c_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,Dn */ +uae_u32 REGPARAM2 op_a40_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_EOR_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(An) */ +uae_u32 REGPARAM2 op_a50_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_a58_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w_imm(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,-(An) */ +uae_u32 REGPARAM2 op_a60_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_a68_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_a70_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_a78_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_a79_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,Dn */ +uae_u32 REGPARAM2 op_a80_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jnf_EOR_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(An) */ +uae_u32 REGPARAM2 op_a90_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_a98_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l_imm(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,-(An) */ +uae_u32 REGPARAM2 op_aa0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_aa8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_ab0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_ab8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_ab9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_2 + +/* CMP.B #.B,Dn */ +uae_u32 REGPARAM2 op_c00_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(An) */ +uae_u32 REGPARAM2 op_c10_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_c18_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,-(An) */ +uae_u32 REGPARAM2 op_c20_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_c28_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c30_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_c38_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_c39_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(d16,PC) */ +uae_u32 REGPARAM2 op_c3a_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_c3b_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,Dn */ +uae_u32 REGPARAM2 op_c40_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(An) */ +uae_u32 REGPARAM2 op_c50_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_c58_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,-(An) */ +uae_u32 REGPARAM2 op_c60_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_c68_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c70_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_c78_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_c79_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_c7a_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_c7b_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,Dn */ +uae_u32 REGPARAM2 op_c80_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(An) */ +uae_u32 REGPARAM2 op_c90_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_c98_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,-(An) */ +uae_u32 REGPARAM2 op_ca0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_ca8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_cb0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_cb8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_cb9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(d16,PC) */ +uae_u32 REGPARAM2 op_cba_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_cbb_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,Dn */ +uae_u32 REGPARAM2 op_1000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),Dn */ +uae_u32 REGPARAM2 op_1010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,Dn */ +uae_u32 REGPARAM2 op_1018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),Dn */ +uae_u32 REGPARAM2 op_1020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_1028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_1030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_1038_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_1039_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_103a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_103b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,Dn */ +uae_u32 REGPARAM2 op_103c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(An) */ +uae_u32 REGPARAM2 op_1080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(An) */ +uae_u32 REGPARAM2 op_1090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(An) */ +uae_u32 REGPARAM2 op_1098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(An) */ +uae_u32 REGPARAM2 op_10a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(An) */ +uae_u32 REGPARAM2 op_10a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_10b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(An) */ +uae_u32 REGPARAM2 op_10b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(An) */ +uae_u32 REGPARAM2 op_10b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(An) */ +uae_u32 REGPARAM2 op_10ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_10bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(An) */ +uae_u32 REGPARAM2 op_10bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_10c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(An)+ */ +uae_u32 REGPARAM2 op_10d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(An)+ */ +uae_u32 REGPARAM2 op_10d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(An)+ */ +uae_u32 REGPARAM2 op_10e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_10e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_10f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_10f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_10f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_10fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_10fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_10fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + dont_care_flags(); + writebyte(dsta, src); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1100_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),-(An) */ +uae_u32 REGPARAM2 op_1110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,-(An) */ +uae_u32 REGPARAM2 op_1118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),-(An) */ +uae_u32 REGPARAM2 op_1120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),-(An) */ +uae_u32 REGPARAM2 op_1128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_1130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_1138_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_1139_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_113a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_113b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,-(An) */ +uae_u32 REGPARAM2 op_113c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1140_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(d16,An) */ +uae_u32 REGPARAM2 op_1150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_1158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(d16,An) */ +uae_u32 REGPARAM2 op_1160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_1168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_1170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_1178_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_1179_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_117a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_117b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_117c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1180_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_11c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(xxx).W */ +uae_u32 REGPARAM2 op_11d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_11d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(xxx).W */ +uae_u32 REGPARAM2 op_11e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_11e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_11f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_11f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_11f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_11fa_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_11fb_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_11fc_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_13c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An),(xxx).L */ +uae_u32 REGPARAM2 op_13d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_13d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B -(An),(xxx).L */ +uae_u32 REGPARAM2 op_13e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_13e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_13f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_13f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_13f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_13fa_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_13fb_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_13fc_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writebyte(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,Dn */ +uae_u32 REGPARAM2 op_2000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,Dn */ +uae_u32 REGPARAM2 op_2008_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),Dn */ +uae_u32 REGPARAM2 op_2010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,Dn */ +uae_u32 REGPARAM2 op_2018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),Dn */ +uae_u32 REGPARAM2 op_2020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_2028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_2030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_2038_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_2039_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_203a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_203b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,Dn */ +uae_u32 REGPARAM2 op_203c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L Dn,An */ +uae_u32 REGPARAM2 op_2040_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L An,An */ +uae_u32 REGPARAM2 op_2048_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (An),An */ +uae_u32 REGPARAM2 op_2050_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (An)+,An */ +uae_u32 REGPARAM2 op_2058_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L -(An),An */ +uae_u32 REGPARAM2 op_2060_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (d16,An),An */ +uae_u32 REGPARAM2 op_2068_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_2070_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_2078_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_2079_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_207a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_207b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.L #.L,An */ +uae_u32 REGPARAM2 op_207c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dst = dstreg + 8; + jnf_MOVEA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(An) */ +uae_u32 REGPARAM2 op_2080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(An) */ +uae_u32 REGPARAM2 op_2088_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(An) */ +uae_u32 REGPARAM2 op_2090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,(An) */ +uae_u32 REGPARAM2 op_2098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(An) */ +uae_u32 REGPARAM2 op_20a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(An) */ +uae_u32 REGPARAM2 op_20a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_20b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(An) */ +uae_u32 REGPARAM2 op_20b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(An) */ +uae_u32 REGPARAM2 op_20b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(An) */ +uae_u32 REGPARAM2 op_20ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_20bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(An) */ +uae_u32 REGPARAM2 op_20bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_20c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(An)+ */ +uae_u32 REGPARAM2 op_20c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + if (srcreg == (uae_s32) dstreg) { + src = alloc_scratch(); + mov_l_rr(src, srcreg + 8); + } + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(An)+ */ +uae_u32 REGPARAM2 op_20d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_20d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(An)+ */ +uae_u32 REGPARAM2 op_20e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_20e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_20f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_20f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_20f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_20fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_20fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_20fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = dstreg + 8; + dont_care_flags(); + writelong(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,-(An) */ +uae_u32 REGPARAM2 op_2100_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,-(An) */ +uae_u32 REGPARAM2 op_2108_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + if (srcreg == (uae_s32) dstreg) { + src = alloc_scratch(); + mov_l_rr(src, srcreg + 8); + } + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),-(An) */ +uae_u32 REGPARAM2 op_2110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,-(An) */ +uae_u32 REGPARAM2 op_2118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),-(An) */ +uae_u32 REGPARAM2 op_2120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),-(An) */ +uae_u32 REGPARAM2 op_2128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_2130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_2138_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_2139_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_213a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_213b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,-(An) */ +uae_u32 REGPARAM2 op_213c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_2140_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(d16,An) */ +uae_u32 REGPARAM2 op_2148_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(d16,An) */ +uae_u32 REGPARAM2 op_2150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_2158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(d16,An) */ +uae_u32 REGPARAM2 op_2160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_2168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_2170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_2178_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_2179_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_217a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_217b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_217c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2180_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2188_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_3 + +/* MOVE.L (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_21c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(xxx).W */ +uae_u32 REGPARAM2 op_21c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(xxx).W */ +uae_u32 REGPARAM2 op_21d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_21d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(xxx).W */ +uae_u32 REGPARAM2 op_21e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_21e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_21f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_21f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_21f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_21fa_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_21fb_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_21fc_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_23c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L An,(xxx).L */ +uae_u32 REGPARAM2 op_23c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An),(xxx).L */ +uae_u32 REGPARAM2 op_23d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_23d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L -(An),(xxx).L */ +uae_u32 REGPARAM2 op_23e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_23e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_23f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_23f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_23f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_23fa_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_23fb_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_23fc_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writelong(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,Dn */ +uae_u32 REGPARAM2 op_3000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,Dn */ +uae_u32 REGPARAM2 op_3008_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),Dn */ +uae_u32 REGPARAM2 op_3010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,Dn */ +uae_u32 REGPARAM2 op_3018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),Dn */ +uae_u32 REGPARAM2 op_3020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_3028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_3030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_3038_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_3039_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_303a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_303b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,Dn */ +uae_u32 REGPARAM2 op_303c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W Dn,An */ +uae_u32 REGPARAM2 op_3040_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W An,An */ +uae_u32 REGPARAM2 op_3048_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (An),An */ +uae_u32 REGPARAM2 op_3050_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (An)+,An */ +uae_u32 REGPARAM2 op_3058_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W -(An),An */ +uae_u32 REGPARAM2 op_3060_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (d16,An),An */ +uae_u32 REGPARAM2 op_3068_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_3070_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_3078_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_3079_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_307a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_307b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEA.W #.W,An */ +uae_u32 REGPARAM2 op_307c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = dstreg + 8; + jnf_MOVEA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(An) */ +uae_u32 REGPARAM2 op_3080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(An) */ +uae_u32 REGPARAM2 op_3088_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(An) */ +uae_u32 REGPARAM2 op_3090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(An) */ +uae_u32 REGPARAM2 op_3098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(An) */ +uae_u32 REGPARAM2 op_30a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(An) */ +uae_u32 REGPARAM2 op_30a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_30b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(An) */ +uae_u32 REGPARAM2 op_30b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(An) */ +uae_u32 REGPARAM2 op_30b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(An) */ +uae_u32 REGPARAM2 op_30ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_30bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(An) */ +uae_u32 REGPARAM2 op_30bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_30c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(An)+ */ +uae_u32 REGPARAM2 op_30c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + if (srcreg == (uae_s32) dstreg) { + src = alloc_scratch(); + mov_l_rr(src, srcreg + 8); + } + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(An)+ */ +uae_u32 REGPARAM2 op_30d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(An)+ */ +uae_u32 REGPARAM2 op_30d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(An)+ */ +uae_u32 REGPARAM2 op_30e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_30e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_30f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_30f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_30f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_30fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_30fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_30fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + dont_care_flags(); + writeword(dsta, src); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,-(An) */ +uae_u32 REGPARAM2 op_3100_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,-(An) */ +uae_u32 REGPARAM2 op_3108_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + if (srcreg == (uae_s32) dstreg) { + src = alloc_scratch(); + mov_l_rr(src, srcreg + 8); + } + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),-(An) */ +uae_u32 REGPARAM2 op_3110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,-(An) */ +uae_u32 REGPARAM2 op_3118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),-(An) */ +uae_u32 REGPARAM2 op_3120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),-(An) */ +uae_u32 REGPARAM2 op_3128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_3130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_3138_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_3139_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_313a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_313b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,-(An) */ +uae_u32 REGPARAM2 op_313c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_3140_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(d16,An) */ +uae_u32 REGPARAM2 op_3148_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(d16,An) */ +uae_u32 REGPARAM2 op_3150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_3158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(d16,An) */ +uae_u32 REGPARAM2 op_3160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_3168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_3170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_3178_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_3179_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_317a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_317b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_317c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3180_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3188_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_31c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(xxx).W */ +uae_u32 REGPARAM2 op_31c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(xxx).W */ +uae_u32 REGPARAM2 op_31d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_31d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(xxx).W */ +uae_u32 REGPARAM2 op_31e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_31e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_31f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_31f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_31f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_31fa_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_31fb_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_31fc_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_33c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W An,(xxx).L */ +uae_u32 REGPARAM2 op_33c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An),(xxx).L */ +uae_u32 REGPARAM2 op_33d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_33d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W -(An),(xxx).L */ +uae_u32 REGPARAM2 op_33e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_33e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_33f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_33f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_33f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_33fa_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_33fb_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + release_scratch(srca); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVE.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_33fc_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + dont_care_flags(); + writeword(dsta, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B Dn */ +uae_u32 REGPARAM2 op_4000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + jnf_NEGX_b(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (An) */ +uae_u32 REGPARAM2 op_4010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEGX_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (An)+ */ +uae_u32 REGPARAM2 op_4018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEGX_b(src); + writebyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B -(An) */ +uae_u32 REGPARAM2 op_4020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEGX_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (d16,An) */ +uae_u32 REGPARAM2 op_4028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEGX_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEGX_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (xxx).W */ +uae_u32 REGPARAM2 op_4038_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEGX_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.B (xxx).L */ +uae_u32 REGPARAM2 op_4039_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEGX_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W Dn */ +uae_u32 REGPARAM2 op_4040_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + jnf_NEGX_w(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (An) */ +uae_u32 REGPARAM2 op_4050_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_NEGX_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (An)+ */ +uae_u32 REGPARAM2 op_4058_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_NEGX_w(src); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W -(An) */ +uae_u32 REGPARAM2 op_4060_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jnf_NEGX_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (d16,An) */ +uae_u32 REGPARAM2 op_4068_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_NEGX_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4070_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jnf_NEGX_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (xxx).W */ +uae_u32 REGPARAM2 op_4078_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_NEGX_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.W (xxx).L */ +uae_u32 REGPARAM2 op_4079_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jnf_NEGX_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L Dn */ +uae_u32 REGPARAM2 op_4080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + jnf_NEGX_l(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (An) */ +uae_u32 REGPARAM2 op_4090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEGX_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (An)+ */ +uae_u32 REGPARAM2 op_4098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEGX_l(src); + writelong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L -(An) */ +uae_u32 REGPARAM2 op_40a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEGX_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (d16,An) */ +uae_u32 REGPARAM2 op_40a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEGX_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_40b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEGX_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (xxx).W */ +uae_u32 REGPARAM2 op_40b8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEGX_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEGX.L (xxx).L */ +uae_u32 REGPARAM2 op_40b9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEGX_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (An),An */ +uae_u32 REGPARAM2 op_41d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (d16,An),An */ +uae_u32 REGPARAM2 op_41e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_41f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_41f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_41f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_41fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LEA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_41fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int dst = dstreg + 8; + if (dstreg + 8 != srca) + mov_l_rr(dstreg + 8, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B Dn */ +uae_u32 REGPARAM2 op_4200_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jnf_CLR_b(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (An) */ +uae_u32 REGPARAM2 op_4210_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (An)+ */ +uae_u32 REGPARAM2 op_4218_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_b(src); + writebyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B -(An) */ +uae_u32 REGPARAM2 op_4220_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (d16,An) */ +uae_u32 REGPARAM2 op_4228_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4230_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (xxx).W */ +uae_u32 REGPARAM2 op_4238_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.B (xxx).L */ +uae_u32 REGPARAM2 op_4239_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W Dn */ +uae_u32 REGPARAM2 op_4240_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jnf_CLR_w(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (An) */ +uae_u32 REGPARAM2 op_4250_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (An)+ */ +uae_u32 REGPARAM2 op_4258_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_w(src); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W -(An) */ +uae_u32 REGPARAM2 op_4260_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (d16,An) */ +uae_u32 REGPARAM2 op_4268_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4270_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (xxx).W */ +uae_u32 REGPARAM2 op_4278_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.W (xxx).L */ +uae_u32 REGPARAM2 op_4279_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L Dn */ +uae_u32 REGPARAM2 op_4280_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jnf_CLR_l(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (An) */ +uae_u32 REGPARAM2 op_4290_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (An)+ */ +uae_u32 REGPARAM2 op_4298_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_l(src); + writelong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L -(An) */ +uae_u32 REGPARAM2 op_42a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (d16,An) */ +uae_u32 REGPARAM2 op_42a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_42b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (xxx).W */ +uae_u32 REGPARAM2 op_42b8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CLR.L (xxx).L */ +uae_u32 REGPARAM2 op_42b9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + dont_care_flags(); + jnf_CLR_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_4 + +/* NEG.B Dn */ +uae_u32 REGPARAM2 op_4400_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + jnf_NEG_b(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (An) */ +uae_u32 REGPARAM2 op_4410_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEG_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (An)+ */ +uae_u32 REGPARAM2 op_4418_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEG_b(src); + writebyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B -(An) */ +uae_u32 REGPARAM2 op_4420_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEG_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (d16,An) */ +uae_u32 REGPARAM2 op_4428_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEG_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4430_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEG_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (xxx).W */ +uae_u32 REGPARAM2 op_4438_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEG_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.B (xxx).L */ +uae_u32 REGPARAM2 op_4439_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + jnf_NEG_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W Dn */ +uae_u32 REGPARAM2 op_4440_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + jnf_NEG_w(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (An) */ +uae_u32 REGPARAM2 op_4450_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_NEG_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (An)+ */ +uae_u32 REGPARAM2 op_4458_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_NEG_w(src); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W -(An) */ +uae_u32 REGPARAM2 op_4460_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jnf_NEG_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (d16,An) */ +uae_u32 REGPARAM2 op_4468_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_NEG_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4470_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jnf_NEG_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (xxx).W */ +uae_u32 REGPARAM2 op_4478_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_NEG_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.W (xxx).L */ +uae_u32 REGPARAM2 op_4479_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jnf_NEG_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L Dn */ +uae_u32 REGPARAM2 op_4480_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + jnf_NEG_l(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (An) */ +uae_u32 REGPARAM2 op_4490_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEG_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (An)+ */ +uae_u32 REGPARAM2 op_4498_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEG_l(src); + writelong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L -(An) */ +uae_u32 REGPARAM2 op_44a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEG_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (d16,An) */ +uae_u32 REGPARAM2 op_44a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEG_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_44b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEG_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (xxx).W */ +uae_u32 REGPARAM2 op_44b8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEG_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NEG.L (xxx).L */ +uae_u32 REGPARAM2 op_44b9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + jnf_NEG_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B Dn */ +uae_u32 REGPARAM2 op_4600_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jnf_NOT_b(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (An) */ +uae_u32 REGPARAM2 op_4610_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jnf_NOT_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (An)+ */ +uae_u32 REGPARAM2 op_4618_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jnf_NOT_b(src); + writebyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B -(An) */ +uae_u32 REGPARAM2 op_4620_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jnf_NOT_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (d16,An) */ +uae_u32 REGPARAM2 op_4628_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jnf_NOT_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4630_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jnf_NOT_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (xxx).W */ +uae_u32 REGPARAM2 op_4638_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jnf_NOT_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.B (xxx).L */ +uae_u32 REGPARAM2 op_4639_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + jnf_NOT_b(src); + writebyte(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W Dn */ +uae_u32 REGPARAM2 op_4640_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jnf_NOT_w(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (An) */ +uae_u32 REGPARAM2 op_4650_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jnf_NOT_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (An)+ */ +uae_u32 REGPARAM2 op_4658_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jnf_NOT_w(src); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W -(An) */ +uae_u32 REGPARAM2 op_4660_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jnf_NOT_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (d16,An) */ +uae_u32 REGPARAM2 op_4668_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jnf_NOT_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4670_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jnf_NOT_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (xxx).W */ +uae_u32 REGPARAM2 op_4678_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jnf_NOT_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.W (xxx).L */ +uae_u32 REGPARAM2 op_4679_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + jnf_NOT_w(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L Dn */ +uae_u32 REGPARAM2 op_4680_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jnf_NOT_l(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (An) */ +uae_u32 REGPARAM2 op_4690_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jnf_NOT_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (An)+ */ +uae_u32 REGPARAM2 op_4698_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jnf_NOT_l(src); + writelong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L -(An) */ +uae_u32 REGPARAM2 op_46a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jnf_NOT_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (d16,An) */ +uae_u32 REGPARAM2 op_46a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jnf_NOT_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_46b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jnf_NOT_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (xxx).W */ +uae_u32 REGPARAM2 op_46b8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jnf_NOT_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOT.L (xxx).L */ +uae_u32 REGPARAM2 op_46b9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + jnf_NOT_l(src); + writelong(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LINK.L An,#.L */ +uae_u32 REGPARAM2 op_4808_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + if (srcreg == 7) dodgy = 1; + int src = dodgy ? alloc_scratch() : srcreg + 8; + if (dodgy) + mov_l_rr(src, srcreg + 8); + uae_s32 offs = comp_get_ilong((m68k_pc_offset += 4) - 4); /* absl */ + sub_l_ri(15, 4); + writelong_clobber(15, src); + if (!dodgy) + mov_l_rr(src, 15); + arm_ADD_l_ri(15, offs); + if (srcreg + 8 != src) + mov_l_rr(srcreg + 8, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SWAP.W Dn */ +uae_u32 REGPARAM2 op_4840_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jnf_SWAP(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (An) */ +uae_u32 REGPARAM2 op_4850_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + if (srcreg == 7) dodgy = 1; + int srca = dodgy ? alloc_scratch() : srcreg + 8; + if (dodgy) + mov_l_rr(srca, srcreg + 8); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (d16,An) */ +uae_u32 REGPARAM2 op_4868_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + if (srcreg == 7) dodgy = 1; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4870_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + if (srcreg == 7) dodgy = 1; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (xxx).W */ +uae_u32 REGPARAM2 op_4878_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (xxx).L */ +uae_u32 REGPARAM2 op_4879_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (d16,PC) */ +uae_u32 REGPARAM2 op_487a_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* PEA.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_487b_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + { + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + { + int dsta = dodgy ? alloc_scratch() : 7 + 8; + arm_SUB_l_ri8(7 + 8, 4); + if (dodgy) + mov_l_rr(dsta, 8 + 7); + writelong(dsta, srca); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXT.W Dn */ +uae_u32 REGPARAM2 op_4880_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jnf_EXT_w(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,(An) */ +uae_u32 REGPARAM2 op_4890_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_w(native, i, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writeword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,-(An) */ +uae_u32 REGPARAM2 op_48a0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + offset -= 2; + jnf_MVMLE_w(native, 15 - i, offset); + } + } + lea_l_brr(8 + dstreg, srca, (uae_s32) offset); + } else { + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + arm_SUB_l_ri8(srca, 2); + writeword(srca, 15 - i); + } + } + mov_l_rr(8 + dstreg, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_48a8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_w(native, i, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writeword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_48b0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_w(native, i, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writeword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_48b8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_w(native, i, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writeword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_48b9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_w(native, i, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writeword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXT.L Dn */ +uae_u32 REGPARAM2 op_48c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jnf_EXT_l(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,(An) */ +uae_u32 REGPARAM2 op_48d0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_l(native, i, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writelong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,-(An) */ +uae_u32 REGPARAM2 op_48e0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + offset -= 4; + jnf_MVMLE_l(native, 15 - i, offset); + } + } + lea_l_brr(8 + dstreg, srca, (uae_s32) offset); + } else { + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + arm_SUB_l_ri8(srca, 4); + writelong(srca, 15 - i); + } + } + mov_l_rr(8 + dstreg, srca); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_48e8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_l(native, i, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writelong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_48f0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_l(native, i, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writelong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_48f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_l(native, i, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writelong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMLE.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_48f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMLE_l(native, i, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + writelong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXT.B Dn */ +uae_u32 REGPARAM2 op_49c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + jnf_EXT_b(src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B Dn */ +uae_u32 REGPARAM2 op_4a00_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (An) */ +uae_u32 REGPARAM2 op_4a10_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (An)+ */ +uae_u32 REGPARAM2 op_4a18_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B -(An) */ +uae_u32 REGPARAM2 op_4a20_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (d16,An) */ +uae_u32 REGPARAM2 op_4a28_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4a30_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (xxx).W */ +uae_u32 REGPARAM2 op_4a38_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (xxx).L */ +uae_u32 REGPARAM2 op_4a39_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (d16,PC) */ +uae_u32 REGPARAM2 op_4a3a_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4a3b_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.B #.B */ +uae_u32 REGPARAM2 op_4a3c_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W Dn */ +uae_u32 REGPARAM2 op_4a40_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W An */ +uae_u32 REGPARAM2 op_4a48_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (An) */ +uae_u32 REGPARAM2 op_4a50_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (An)+ */ +uae_u32 REGPARAM2 op_4a58_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W -(An) */ +uae_u32 REGPARAM2 op_4a60_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (d16,An) */ +uae_u32 REGPARAM2 op_4a68_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4a70_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (xxx).W */ +uae_u32 REGPARAM2 op_4a78_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (xxx).L */ +uae_u32 REGPARAM2 op_4a79_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (d16,PC) */ +uae_u32 REGPARAM2 op_4a7a_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4a7b_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.W #.W */ +uae_u32 REGPARAM2 op_4a7c_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L Dn */ +uae_u32 REGPARAM2 op_4a80_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L An */ +uae_u32 REGPARAM2 op_4a88_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (An) */ +uae_u32 REGPARAM2 op_4a90_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (An)+ */ +uae_u32 REGPARAM2 op_4a98_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + arm_ADD_l_ri8(srcreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L -(An) */ +uae_u32 REGPARAM2 op_4aa0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (d16,An) */ +uae_u32 REGPARAM2 op_4aa8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4ab0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (xxx).W */ +uae_u32 REGPARAM2 op_4ab8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (xxx).L */ +uae_u32 REGPARAM2 op_4ab9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (d16,PC) */ +uae_u32 REGPARAM2 op_4aba_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4abb_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* TST.L #.L */ +uae_u32 REGPARAM2 op_4abc_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + dont_care_flags(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,Dn */ +uae_u32 REGPARAM2 op_4c00_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dst = dstreg; + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(An) */ +uae_u32 REGPARAM2 op_4c10_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_4c18_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,-(An) */ +uae_u32 REGPARAM2 op_4c20_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4c28_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4c30_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4c38_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4c39_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4c3a_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(dsta, address + PC16off); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4c3b_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dsta = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + release_scratch(pctmp); + int dst = alloc_scratch(); + readlong(dsta, dst); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULL.L #.W,#.L */ +uae_u32 REGPARAM2 op_4c3c_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + int r2 = (extra >> 12) & 7; + int dst = alloc_scratch(); + mov_l_ri(dst, comp_get_ilong((m68k_pc_offset += 4) - 4)); + if (extra & 0x0400) { + int r3 = (extra & 7); + mov_l_rr(r3, dst); + if (extra & 0x0800) { + jnf_MULS64(r2, r3); + } else { + jnf_MULU64(r2, r3); + } + } else { + if (extra & 0x0800) { + jnf_MULS32(r2, dst); + } else { + jnf_MULU32(r2, dst); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DIVL.L #.W,Dn */ +uae_u32 REGPARAM2 op_4c40_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dst=dstreg; + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(An) */ +uae_u32 REGPARAM2 op_4c50_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=dstreg+8; + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_4c58_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=dstreg+8; + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dstreg+8,4); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,-(An) */ +uae_u32 REGPARAM2 op_4c60_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=dstreg+8; + arm_SUB_l_ri8(dstreg+8,4); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4c68_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4c70_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4c78_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4c79_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4c7a_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta,address+PC16off); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4c7b_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dsta=alloc_scratch(); + int pctmp=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); + release_scratch(pctmp); + int dst=alloc_scratch(); + readlong(dsta,dst); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVL.L #.W,#.L */ +uae_u32 REGPARAM2 op_4c7c_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int r3=extra&7; + int dst=alloc_scratch(); + mov_l_ri(dst,comp_get_ilong((m68k_pc_offset+=4)-4)); + register_possible_exception(); + if (extra & 0x0400) { + FAIL(1); + m68k_pc_offset=m68k_pc_offset_thisinst; + return 0; + } else { + if (extra & 0x0800) { + jnf_DIVLS32(r2,dst,r3); + } else { + jnf_DIVLU32(r2,dst,r3); + } + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* MVMEL.W #.W,(An) */ +uae_u32 REGPARAM2 op_4c90_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_4c98_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + if (srca != i) + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + jnf_ADD_im8(8 + dstreg, srca, offset); + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + mov_l_rr(8 + dstreg, tmp); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4ca8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4cb0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4cb8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4cb9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4cba_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.W #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4cbb_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_w(i, native, offset); + offset += 2; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readword(tmp, i); + arm_ADD_l_ri8(tmp, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(An) */ +uae_u32 REGPARAM2 op_4cd0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_4cd8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = dstreg + 8; + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + if (srca != i) + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + jnf_ADD_im8(8 + dstreg, srca, offset); + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + mov_l_rr(8 + dstreg, tmp); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4ce8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4cf0_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4cf8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4cf9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4cfa_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MVMEL.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4cfb_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u16 mask = comp_get_iword((m68k_pc_offset += 2) - 2); + int i; + signed char offset = 0; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + if (!special_mem) { + int native = alloc_scratch(); + get_n_addr(srca, native); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + jnf_MVMEL_l(i, native, offset); + offset += 4; + } + } + } else { + int tmp = alloc_scratch(); + mov_l_rr(tmp, srca); + for (i = 0; i < 16; i++) { + if ((mask >> i) & 1) { + readlong(tmp, i); + arm_ADD_l_ri8(tmp, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LINK.W An,#.W */ +uae_u32 REGPARAM2 op_4e50_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int dodgy = 0; + if (srcreg == 7) dodgy = 1; + int src = dodgy ? alloc_scratch() : srcreg + 8; + if (dodgy) + mov_l_rr(src, srcreg + 8); + uae_s32 offs = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + sub_l_ri(15, 4); + writelong_clobber(15, src); + if (!dodgy) + mov_l_rr(src, 15); + arm_ADD_l_ri(15, offs); + if (srcreg + 8 != src) + mov_l_rr(srcreg + 8, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* UNLK.L An */ +uae_u32 REGPARAM2 op_4e58_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + if (src == 15) { + readlong(15, src); + } else { + mov_l_rr(15, src); + readlong(15, src); + arm_ADD_l_ri8(15, 4); + } + if (srcreg + 8 != src) + mov_l_rr(srcreg + 8, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* NOP.L */ +uae_u32 REGPARAM2 op_4e71_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RTD.L #.W */ +uae_u32 REGPARAM2 op_4e74_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 offs = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + offs += 4; + { + int newad = alloc_scratch(); + readlong(15, newad); + mov_l_mr((uintptr) ®s.pc, newad); + get_n_addr_jmp(newad, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + arm_ADD_l_ri(15, offs); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RTS.L */ +uae_u32 REGPARAM2 op_4e75_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int newad = alloc_scratch(); + readlong(15, newad); + mov_l_mr((uintptr) ®s.pc, newad); + get_n_addr_jmp(newad, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + arm_ADD_l_ri8(15, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (An) */ +uae_u32 REGPARAM2 op_4e90_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (d16,An) */ +uae_u32 REGPARAM2 op_4ea8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4eb0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (xxx).W */ +uae_u32 REGPARAM2 op_4eb8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (xxx).L */ +uae_u32 REGPARAM2 op_4eb9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (d16,PC) */ +uae_u32 REGPARAM2 op_4eba_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JSR.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4ebb_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (An) */ +uae_u32 REGPARAM2 op_4ed0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (d16,An) */ +uae_u32 REGPARAM2 op_4ee8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4ef0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (xxx).W */ +uae_u32 REGPARAM2 op_4ef8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (xxx).L */ +uae_u32 REGPARAM2 op_4ef9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (d16,PC) */ +uae_u32 REGPARAM2 op_4efa_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* JMP.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4efb_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + mov_l_mr((uintptr) ®s.pc, srca); + get_n_addr_jmp(srca, PC_P); + mov_l_mr((uintptr) ®s.pc_oldp, PC_P); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,Dn */ +uae_u32 REGPARAM2 op_5000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(An) */ +uae_u32 REGPARAM2 op_5010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(An)+ */ +uae_u32 REGPARAM2 op_5018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,-(An) */ +uae_u32 REGPARAM2 op_5020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(d16,An) */ +uae_u32 REGPARAM2 op_5028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(xxx).W */ +uae_u32 REGPARAM2 op_5038_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.B #,(xxx).L */ +uae_u32 REGPARAM2 op_5039_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,Dn */ +uae_u32 REGPARAM2 op_5040_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDAQ.W #,An */ +uae_u32 REGPARAM2 op_5048_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg + 8; + jnf_ADDA_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(An) */ +uae_u32 REGPARAM2 op_5050_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(An)+ */ +uae_u32 REGPARAM2 op_5058_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,-(An) */ +uae_u32 REGPARAM2 op_5060_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(d16,An) */ +uae_u32 REGPARAM2 op_5068_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5070_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(xxx).W */ +uae_u32 REGPARAM2 op_5078_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.W #,(xxx).L */ +uae_u32 REGPARAM2 op_5079_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,Dn */ +uae_u32 REGPARAM2 op_5080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDAQ.L #,An */ +uae_u32 REGPARAM2 op_5088_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg + 8; + jnf_ADDA_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,(An) */ +uae_u32 REGPARAM2 op_5090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_5 + +/* ADDQ.L #,(An)+ */ +uae_u32 REGPARAM2 op_5098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,-(An) */ +uae_u32 REGPARAM2 op_50a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,(d16,An) */ +uae_u32 REGPARAM2 op_50a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_50b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,(xxx).W */ +uae_u32 REGPARAM2 op_50b8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDQ.L #,(xxx).L */ +uae_u32 REGPARAM2 op_50b9_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_50c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + mov_b_ri(srcreg, 0xff); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_50c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_50d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_50d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_50e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_50e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_50f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_50f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_50f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + mov_b_ri(val, 0xff); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,Dn */ +uae_u32 REGPARAM2 op_5100_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(An) */ +uae_u32 REGPARAM2 op_5110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(An)+ */ +uae_u32 REGPARAM2 op_5118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,-(An) */ +uae_u32 REGPARAM2 op_5120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(d16,An) */ +uae_u32 REGPARAM2 op_5128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(xxx).W */ +uae_u32 REGPARAM2 op_5138_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.B #,(xxx).L */ +uae_u32 REGPARAM2 op_5139_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,Dn */ +uae_u32 REGPARAM2 op_5140_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBAQ.W #,An */ +uae_u32 REGPARAM2 op_5148_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg + 8; + jnf_SUBA_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(An) */ +uae_u32 REGPARAM2 op_5150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(An)+ */ +uae_u32 REGPARAM2 op_5158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,-(An) */ +uae_u32 REGPARAM2 op_5160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(d16,An) */ +uae_u32 REGPARAM2 op_5168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(xxx).W */ +uae_u32 REGPARAM2 op_5178_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.W #,(xxx).L */ +uae_u32 REGPARAM2 op_5179_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,Dn */ +uae_u32 REGPARAM2 op_5180_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBAQ.L #,An */ +uae_u32 REGPARAM2 op_5188_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dst = dstreg + 8; + jnf_SUBA_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(An) */ +uae_u32 REGPARAM2 op_5190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(An)+ */ +uae_u32 REGPARAM2 op_5198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,-(An) */ +uae_u32 REGPARAM2 op_51a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(d16,An) */ +uae_u32 REGPARAM2 op_51a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_51b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(xxx).W */ +uae_u32 REGPARAM2 op_51b8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBQ.L #,(xxx).L */ +uae_u32 REGPARAM2 op_51b9_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_51c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + mov_b_ri(srcreg, 0); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_51c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + sub_w_ri(src, 1); + uae_u32 v2; + uae_u32 v1 = get_const(PC_P); + v2 = get_const(offs); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_51d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_51d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_51e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_51e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_51f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_51f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_51f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + mov_b_ri(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_52c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 8); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_52c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 8); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_52d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_52d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_52e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_52e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_52f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_52f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_52f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 8); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_53c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 9); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_53c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 9); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_53d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_53d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_53e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_53e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_53f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_53f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_53f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 9); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_54c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 3); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_54c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 3); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_54d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_54d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_54e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_54e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_54f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_54f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_54f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 3); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_55c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_55c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 2); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_55d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_55d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_55e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_55e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_55f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_55f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_55f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 2); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_56c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 1); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_56c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 1); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_56d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_56d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_56e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_56e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_56f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_56f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_56f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 1); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_57c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 0); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_57c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 0); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_57d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_57d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_57e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_57e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_57f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_57f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_57f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 0); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_58c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 7); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_58c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 7); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_58d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_58d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_58e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_58e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_58f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_58f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_58f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 7); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_59c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 6); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_59c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 6); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_59d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_59d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_59e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_59e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_59f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_59f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_59f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 6); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5ac0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 5); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5ac8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 5); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5ad0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5ad8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ae0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ae8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5af0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5af8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5af9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 5); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5bc0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5bc8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 4); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5bd0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5bd8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5be0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5be8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5bf0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5bf8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5bf9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 4); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5cc0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 10); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5cc8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 10); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5cd0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5cd8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ce0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ce8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5cf0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5cf8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5cf9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 10); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5dc0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 11); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5dc8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 11); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5dd0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5dd8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5de0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5de8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5df0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5df8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5df9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 11); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5ec0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 12); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5ec8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 12); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5ed0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5ed8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ee0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ee8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5ef0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5ef8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5ef9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 12); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5fc0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + make_flags_live(); + jnf_SCC(srcreg, 13); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5fc8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int offs = alloc_scratch(); + mov_l_ri(offs, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(offs, (uintptr) comp_pc_p); + arm_ADD_l_ri(offs, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + make_flags_live(); + uae_u32 v1 = get_const(PC_P); + uae_u32 v2 = get_const(offs); + jff_DBCC(src, 13); + register_branch(v1, v2, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5fd0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5fd8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5fe0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5fe8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5ff0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5ff8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5ff9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int val = alloc_scratch(); + make_flags_live(); + jnf_SCC(val, 13); + writebyte(srca, val); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6000_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + mov_l_rr(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6001_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + mov_l_rr(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_60ff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + mov_l_rr(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSR.W #.W */ +uae_u32 REGPARAM2 op_6100_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + arm_ADD_l_ri(src, m68k_pc_offset_thisinst + 2); + m68k_pc_offset = 0; + arm_ADD_l(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSRQ.B # */ +uae_u32 REGPARAM2 op_6101_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + arm_ADD_l_ri(src, m68k_pc_offset_thisinst + 2); + m68k_pc_offset = 0; + arm_ADD_l(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BSR.L #.L */ +uae_u32 REGPARAM2 op_61ff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + { + uae_u32 retadd = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + int ret = alloc_scratch(); + mov_l_ri(ret, retadd); + sub_l_ri(15, 4); + writelong_clobber(15, ret); + arm_ADD_l_ri(src, m68k_pc_offset_thisinst + 2); + m68k_pc_offset = 0; + arm_ADD_l(PC_P, src); + comp_pc_p = (uae_u8 *) (uintptr) get_const(PC_P); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6200_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 8); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6201_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 8); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_62ff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 8); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_6 + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6300_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 9); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6301_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 9); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_63ff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 9); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6400_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 3); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6401_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 3); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_64ff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 3); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6500_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 2); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6501_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 2); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_65ff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 2); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6600_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 1); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6601_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 1); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_66ff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 1); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6700_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 0); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6701_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 0); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_67ff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 0); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6800_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 7); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6801_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 7); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_68ff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 7); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6900_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 6); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6901_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 6); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_69ff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 6); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6a00_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 5); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6a01_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 5); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6aff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 5); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6b00_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 4); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6b01_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 4); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6bff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 4); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6c00_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 10); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6c01_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 10); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6cff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 10); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6d00_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 11); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6d01_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 11); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6dff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 11); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6e00_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 12); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6e01_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 12); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6eff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 12); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6f00_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 13); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6f01_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 13); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6fff_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_u32 v1, v2; + int src = alloc_scratch(); + mov_l_ri(src, comp_get_ilong((m68k_pc_offset += 4) - 4)); + sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); + arm_ADD_l_ri(src, (uintptr) comp_pc_p); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + arm_ADD_l_ri(src, m68k_pc_offset); + arm_ADD_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + v1 = get_const(PC_P); + v2 = get_const(src); + register_branch(v1, v2, 13); + make_flags_live(); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MOVEQ.L #,Dn */ +uae_u32 REGPARAM2 op_7000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (uae_s32) (uae_s8) (opcode & 255); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = alloc_scratch(); + mov_l_ri(src, srcreg); + int dst = dstreg; + dont_care_flags(); + jnf_MOVE_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,Dn */ +uae_u32 REGPARAM2 op_8000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_OR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (An),Dn */ +uae_u32 REGPARAM2 op_8010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (An)+,Dn */ +uae_u32 REGPARAM2 op_8018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B -(An),Dn */ +uae_u32 REGPARAM2 op_8020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_8028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_8030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_8038_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_8039_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_803a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_803b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B #.B,Dn */ +uae_u32 REGPARAM2 op_803c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_OR_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,Dn */ +uae_u32 REGPARAM2 op_8040_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_OR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (An),Dn */ +uae_u32 REGPARAM2 op_8050_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (An)+,Dn */ +uae_u32 REGPARAM2 op_8058_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W -(An),Dn */ +uae_u32 REGPARAM2 op_8060_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_8068_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_8070_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_8078_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_8079_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_807a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_807b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W #.W,Dn */ +uae_u32 REGPARAM2 op_807c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_OR_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,Dn */ +uae_u32 REGPARAM2 op_8080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_OR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (An),Dn */ +uae_u32 REGPARAM2 op_8090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (An)+,Dn */ +uae_u32 REGPARAM2 op_8098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L -(An),Dn */ +uae_u32 REGPARAM2 op_80a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_80a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_80b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_80b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_80b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_80ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_80bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L #.L,Dn */ +uae_u32 REGPARAM2 op_80bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jnf_OR_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DIVU.W Dn,Dn */ +uae_u32 REGPARAM2 op_80c0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int src=srcreg; + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (An),Dn */ +uae_u32 REGPARAM2 op_80d0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (An)+,Dn */ +uae_u32 REGPARAM2 op_80d8_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + int src=alloc_scratch(); + readword(srca,src); + arm_ADD_l_ri8(srcreg+8,2); + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W -(An),Dn */ +uae_u32 REGPARAM2 op_80e0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + arm_SUB_l_ri8(srcreg+8,2); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_80e8_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_80f0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_80f8_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_80f9_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_80fa_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca,address+PC16off); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_80fb_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + int pctmp=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); + release_scratch(pctmp); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVU.W #.W,Dn */ +uae_u32 REGPARAM2 op_80fc_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int src=alloc_scratch(); + mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int dst=dstreg; + register_possible_exception(); + jnf_DIVU(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* OR.B Dn,(An) */ +uae_u32 REGPARAM2 op_8110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_8118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_8120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_8128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_8138_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_8139_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_OR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(An) */ +uae_u32 REGPARAM2 op_8150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_8158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,-(An) */ +uae_u32 REGPARAM2 op_8160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_8168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_8178_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_8179_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_OR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(An) */ +uae_u32 REGPARAM2 op_8190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_8198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,-(An) */ +uae_u32 REGPARAM2 op_81a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_81a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_81b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_81b8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* OR.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_81b9_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_OR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* DIVS.W Dn,Dn */ +uae_u32 REGPARAM2 op_81c0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int src=srcreg; + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (An),Dn */ +uae_u32 REGPARAM2 op_81d0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (An)+,Dn */ +uae_u32 REGPARAM2 op_81d8_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + int src=alloc_scratch(); + readword(srca,src); + arm_ADD_l_ri8(srcreg+8,2); + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W -(An),Dn */ +uae_u32 REGPARAM2 op_81e0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=srcreg+8; + arm_SUB_l_ri8(srcreg+8,2); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_81e8_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_81f0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_81f8_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_81f9_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_81fa_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca,address+PC16off); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_81fb_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int srca=alloc_scratch(); + int pctmp=alloc_scratch(); + uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); + release_scratch(pctmp); + int src=alloc_scratch(); + readword(srca,src); + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* DIVS.W #.W,Dn */ +uae_u32 REGPARAM2 op_81fc_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + int src=alloc_scratch(); + mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + int dst=dstreg; + register_possible_exception(); + jnf_DIVS(dst,src); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* SUB.B Dn,Dn */ +uae_u32 REGPARAM2 op_9000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (An),Dn */ +uae_u32 REGPARAM2 op_9010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (An)+,Dn */ +uae_u32 REGPARAM2 op_9018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B -(An),Dn */ +uae_u32 REGPARAM2 op_9020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_9028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_9030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_9038_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_9039_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_903a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_903b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B #.B,Dn */ +uae_u32 REGPARAM2 op_903c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,Dn */ +uae_u32 REGPARAM2 op_9040_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W An,Dn */ +uae_u32 REGPARAM2 op_9048_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (An),Dn */ +uae_u32 REGPARAM2 op_9050_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (An)+,Dn */ +uae_u32 REGPARAM2 op_9058_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W -(An),Dn */ +uae_u32 REGPARAM2 op_9060_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_9068_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_9070_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_9078_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_9079_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_907a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_907b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W #.W,Dn */ +uae_u32 REGPARAM2 op_907c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,Dn */ +uae_u32 REGPARAM2 op_9080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L An,Dn */ +uae_u32 REGPARAM2 op_9088_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (An),Dn */ +uae_u32 REGPARAM2 op_9090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (An)+,Dn */ +uae_u32 REGPARAM2 op_9098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L -(An),Dn */ +uae_u32 REGPARAM2 op_90a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_90a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_90b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_90b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_90b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_90ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_90bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L #.L,Dn */ +uae_u32 REGPARAM2 op_90bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jnf_SUB_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W Dn,An */ +uae_u32 REGPARAM2 op_90c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W An,An */ +uae_u32 REGPARAM2 op_90c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (An),An */ +uae_u32 REGPARAM2 op_90d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (An)+,An */ +uae_u32 REGPARAM2 op_90d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W -(An),An */ +uae_u32 REGPARAM2 op_90e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (d16,An),An */ +uae_u32 REGPARAM2 op_90e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_90f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_90f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_90f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_90fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_90fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_SUBA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.W #.W,An */ +uae_u32 REGPARAM2 op_90fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg + 8; + jnf_SUBA_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.B Dn,Dn */ +uae_u32 REGPARAM2 op_9100_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_SUBX_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.B -(An),-(An) */ +uae_u32 REGPARAM2 op_9108_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUBX_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(An) */ +uae_u32 REGPARAM2 op_9110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_9118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,-(An) */ +uae_u32 REGPARAM2 op_9120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_9128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_9130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_9138_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_9139_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_SUB_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.W Dn,Dn */ +uae_u32 REGPARAM2 op_9140_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_SUBX_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.W -(An),-(An) */ +uae_u32 REGPARAM2 op_9148_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUBX_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(An) */ +uae_u32 REGPARAM2 op_9150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_9158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,-(An) */ +uae_u32 REGPARAM2 op_9160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_9168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_9170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_9178_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_9179_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_SUB_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.L Dn,Dn */ +uae_u32 REGPARAM2 op_9180_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_SUBX_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBX.L -(An),-(An) */ +uae_u32 REGPARAM2 op_9188_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUBX_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(An) */ +uae_u32 REGPARAM2 op_9190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_9198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,-(An) */ +uae_u32 REGPARAM2 op_91a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_91a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_91b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_91b8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUB.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_91b9_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_SUB_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L Dn,An */ +uae_u32 REGPARAM2 op_91c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L An,An */ +uae_u32 REGPARAM2 op_91c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (An),An */ +uae_u32 REGPARAM2 op_91d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (An)+,An */ +uae_u32 REGPARAM2 op_91d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L -(An),An */ +uae_u32 REGPARAM2 op_91e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (d16,An),An */ +uae_u32 REGPARAM2 op_91e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_91f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_91f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_91f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_91fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_91fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_SUBA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* SUBA.L #.L,An */ +uae_u32 REGPARAM2 op_91fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg + 8; + jnf_SUBA_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B Dn,Dn */ +uae_u32 REGPARAM2 op_b000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (An),Dn */ +uae_u32 REGPARAM2 op_b010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (An)+,Dn */ +uae_u32 REGPARAM2 op_b018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B -(An),Dn */ +uae_u32 REGPARAM2 op_b020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_b028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b038_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b039_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b03a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b03b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.B #.B,Dn */ +uae_u32 REGPARAM2 op_b03c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W Dn,Dn */ +uae_u32 REGPARAM2 op_b040_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W An,Dn */ +uae_u32 REGPARAM2 op_b048_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (An),Dn */ +uae_u32 REGPARAM2 op_b050_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (An)+,Dn */ +uae_u32 REGPARAM2 op_b058_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W -(An),Dn */ +uae_u32 REGPARAM2 op_b060_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_b068_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b070_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b078_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b079_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b07a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b07b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.W #.W,Dn */ +uae_u32 REGPARAM2 op_b07c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L Dn,Dn */ +uae_u32 REGPARAM2 op_b080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L An,Dn */ +uae_u32 REGPARAM2 op_b088_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (An),Dn */ +uae_u32 REGPARAM2 op_b090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_7 + +/* CMP.L (An)+,Dn */ +uae_u32 REGPARAM2 op_b098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L -(An),Dn */ +uae_u32 REGPARAM2 op_b0a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_b0a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b0b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b0b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b0b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b0ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b0bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMP.L #.L,Dn */ +uae_u32 REGPARAM2 op_b0bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W Dn,An */ +uae_u32 REGPARAM2 op_b0c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W An,An */ +uae_u32 REGPARAM2 op_b0c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (An),An */ +uae_u32 REGPARAM2 op_b0d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (An)+,An */ +uae_u32 REGPARAM2 op_b0d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W -(An),An */ +uae_u32 REGPARAM2 op_b0e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (d16,An),An */ +uae_u32 REGPARAM2 op_b0e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_b0f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_b0f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_b0f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_b0fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_b0fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.W #.W,An */ +uae_u32 REGPARAM2 op_b0fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,Dn */ +uae_u32 REGPARAM2 op_b100_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_EOR_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPM.B (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b108_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(An) */ +uae_u32 REGPARAM2 op_b110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_b118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_b120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b138_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b139_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_EOR_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,Dn */ +uae_u32 REGPARAM2 op_b140_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_EOR_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPM.W (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b148_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(An) */ +uae_u32 REGPARAM2 op_b150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_b158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,-(An) */ +uae_u32 REGPARAM2 op_b160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b178_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b179_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_EOR_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,Dn */ +uae_u32 REGPARAM2 op_b180_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_EOR_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPM.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b188_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(An) */ +uae_u32 REGPARAM2 op_b190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_b198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,-(An) */ +uae_u32 REGPARAM2 op_b1a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b1a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b1b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b1b8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EOR.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b1b9_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_EOR_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L Dn,An */ +uae_u32 REGPARAM2 op_b1c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L An,An */ +uae_u32 REGPARAM2 op_b1c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (An),An */ +uae_u32 REGPARAM2 op_b1d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (An)+,An */ +uae_u32 REGPARAM2 op_b1d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L -(An),An */ +uae_u32 REGPARAM2 op_b1e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (d16,An),An */ +uae_u32 REGPARAM2 op_b1e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_b1f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_b1f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_b1f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_b1fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_b1fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* CMPA.L #.L,An */ +uae_u32 REGPARAM2 op_b1fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg + 8; + dont_care_flags(); +/* Weird --- CMP with noflags ;-) */ + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,Dn */ +uae_u32 REGPARAM2 op_c000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_AND_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (An),Dn */ +uae_u32 REGPARAM2 op_c010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (An)+,Dn */ +uae_u32 REGPARAM2 op_c018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B -(An),Dn */ +uae_u32 REGPARAM2 op_c020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_c028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c038_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c039_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c03a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c03b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B #.B,Dn */ +uae_u32 REGPARAM2 op_c03c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_AND_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,Dn */ +uae_u32 REGPARAM2 op_c040_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_AND_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (An),Dn */ +uae_u32 REGPARAM2 op_c050_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c058_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W -(An),Dn */ +uae_u32 REGPARAM2 op_c060_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c068_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c070_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c078_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c079_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c07a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c07b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W #.W,Dn */ +uae_u32 REGPARAM2 op_c07c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_AND_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,Dn */ +uae_u32 REGPARAM2 op_c080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_AND_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (An),Dn */ +uae_u32 REGPARAM2 op_c090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (An)+,Dn */ +uae_u32 REGPARAM2 op_c098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L -(An),Dn */ +uae_u32 REGPARAM2 op_c0a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_c0a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c0b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c0b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c0b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c0ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c0bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L #.L,Dn */ +uae_u32 REGPARAM2 op_c0bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jnf_AND_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W Dn,Dn */ +uae_u32 REGPARAM2 op_c0c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int src = srcreg; + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (An),Dn */ +uae_u32 REGPARAM2 op_c0d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c0d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W -(An),Dn */ +uae_u32 REGPARAM2 op_c0e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c0e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c0f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c0f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c0f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c0fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c0fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULU.W #.W,Dn */ +uae_u32 REGPARAM2 op_c0fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = dstreg; + jnf_MULU(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(An) */ +uae_u32 REGPARAM2 op_c110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_c118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,-(An) */ +uae_u32 REGPARAM2 op_c120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c138_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c139_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_AND_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXG.L Dn,Dn */ +uae_u32 REGPARAM2 op_c140_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + int tmp = alloc_scratch(); + mov_l_rr(tmp, src); + if (srcreg != dst) + mov_l_rr(srcreg, dst); + if (dstreg != tmp) + mov_l_rr(dstreg, tmp); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXG.L An,An */ +uae_u32 REGPARAM2 op_c148_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + int tmp = alloc_scratch(); + mov_l_rr(tmp, src); + if (srcreg + 8 != dst) + mov_l_rr(srcreg + 8, dst); + if (dstreg + 8 != tmp) + mov_l_rr(dstreg + 8, tmp); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(An) */ +uae_u32 REGPARAM2 op_c150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_c158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,-(An) */ +uae_u32 REGPARAM2 op_c160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c178_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c179_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_AND_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* EXG.L Dn,An */ +uae_u32 REGPARAM2 op_c188_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + int tmp = alloc_scratch(); + mov_l_rr(tmp, src); + if (srcreg != dst) + mov_l_rr(srcreg, dst); + if (dstreg + 8 != tmp) + mov_l_rr(dstreg + 8, tmp); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(An) */ +uae_u32 REGPARAM2 op_c190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_c198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,-(An) */ +uae_u32 REGPARAM2 op_c1a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c1a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c1b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c1b8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* AND.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c1b9_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_AND_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W Dn,Dn */ +uae_u32 REGPARAM2 op_c1c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int src = srcreg; + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (An),Dn */ +uae_u32 REGPARAM2 op_c1d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c1d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W -(An),Dn */ +uae_u32 REGPARAM2 op_c1e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c1e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c1f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c1f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c1f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c1fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c1fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* MULS.W #.W,Dn */ +uae_u32 REGPARAM2 op_c1fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int src = alloc_scratch(); + mov_l_ri(src, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = dstreg; + jnf_MULS(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,Dn */ +uae_u32 REGPARAM2 op_d000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (An),Dn */ +uae_u32 REGPARAM2 op_d010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (An)+,Dn */ +uae_u32 REGPARAM2 op_d018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readbyte(srca, src); + arm_ADD_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B -(An),Dn */ +uae_u32 REGPARAM2 op_d020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_d028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d038_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d039_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d03a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d03b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readbyte(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B #.B,Dn */ +uae_u32 REGPARAM2 op_d03c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s8) comp_get_ibyte((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_b_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,Dn */ +uae_u32 REGPARAM2 op_d040_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W An,Dn */ +uae_u32 REGPARAM2 op_d048_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (An),Dn */ +uae_u32 REGPARAM2 op_d050_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (An)+,Dn */ +uae_u32 REGPARAM2 op_d058_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W -(An),Dn */ +uae_u32 REGPARAM2 op_d060_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_d068_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d070_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d078_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d079_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d07a_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d07b_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W #.W,Dn */ +uae_u32 REGPARAM2 op_d07c_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,Dn */ +uae_u32 REGPARAM2 op_d080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L An,Dn */ +uae_u32 REGPARAM2 op_d088_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (An),Dn */ +uae_u32 REGPARAM2 op_d090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (An)+,Dn */ +uae_u32 REGPARAM2 op_d098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L -(An),Dn */ +uae_u32 REGPARAM2 op_d0a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_d0a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d0b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d0b8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d0b9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d0ba_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d0bb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L #.L,Dn */ +uae_u32 REGPARAM2 op_d0bc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg; + dont_care_flags(); + jnf_ADD_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W Dn,An */ +uae_u32 REGPARAM2 op_d0c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W An,An */ +uae_u32 REGPARAM2 op_d0c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (An),An */ +uae_u32 REGPARAM2 op_d0d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (An)+,An */ +uae_u32 REGPARAM2 op_d0d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W -(An),An */ +uae_u32 REGPARAM2 op_d0e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (d16,An),An */ +uae_u32 REGPARAM2 op_d0e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_d0f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_d0f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_d0f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_d0fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_d0fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readword(srca, src); + int dst = dstreg + 8; + jnf_ADDA_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.W #.W,An */ +uae_u32 REGPARAM2 op_d0fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + int dst = dstreg + 8; + jnf_ADDA_w_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.B Dn,Dn */ +uae_u32 REGPARAM2 op_d100_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_ADDX_b(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.B -(An),-(An) */ +uae_u32 REGPARAM2 op_d108_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, areg_byteinc[srcreg]); + int src = alloc_scratch(); + readbyte(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADDX_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(An) */ +uae_u32 REGPARAM2 op_d110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_d118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b(dst, src); + writebyte(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,-(An) */ +uae_u32 REGPARAM2 op_d120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, areg_byteinc[dstreg]); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d138_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d139_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readbyte(dsta, dst); + dont_care_flags(); + jnf_ADD_b(dst, src); + writebyte(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.W Dn,Dn */ +uae_u32 REGPARAM2 op_d140_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_ADDX_w(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.W -(An),-(An) */ +uae_u32 REGPARAM2 op_d148_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADDX_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(An) */ +uae_u32 REGPARAM2 op_d150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_d158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w(dst, src); + writeword(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,-(An) */ +uae_u32 REGPARAM2 op_d160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 2); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d178_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d179_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readword(dsta, dst); + dont_care_flags(); + jnf_ADD_w(dst, src); + writeword(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.L Dn,Dn */ +uae_u32 REGPARAM2 op_d180_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg; + dont_care_flags(); + jnf_ADDX_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDX.L -(An),-(An) */ +uae_u32 REGPARAM2 op_d188_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADDX_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(An) */ +uae_u32 REGPARAM2 op_d190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_d198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l(dst, src); + writelong(dsta, dst); + arm_ADD_l_ri8(dstreg + 8, 4); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,-(An) */ +uae_u32 REGPARAM2 op_d1a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = dstreg + 8; + arm_SUB_l_ri8(dstreg + 8, 4); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d1a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + lea_l_brr(dsta, 8 + dstreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d1b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), dsta); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d1b8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADD.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d1b9_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dst = alloc_scratch(); + readlong(dsta, dst); + dont_care_flags(); + jnf_ADD_l(dst, src); + writelong(dsta, dst); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L Dn,An */ +uae_u32 REGPARAM2 op_d1c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg; + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L An,An */ +uae_u32 REGPARAM2 op_d1c8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int src = srcreg + 8; + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (An),An */ +uae_u32 REGPARAM2 op_d1d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (An)+,An */ +uae_u32 REGPARAM2 op_d1d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + int src = alloc_scratch(); + readlong(srca, src); + arm_ADD_l_ri8(srcreg + 8, 4); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L -(An),An */ +uae_u32 REGPARAM2 op_d1e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 4); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (d16,An),An */ +uae_u32 REGPARAM2 op_d1e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_d1f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_d1f8_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_d1f9_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_d1fa_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(srca, address + PC16off); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_d1fb_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + int srca = alloc_scratch(); + int pctmp = alloc_scratch(); + uae_u32 address = start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset; + mov_l_ri(pctmp, address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + release_scratch(pctmp); + int src = alloc_scratch(); + readlong(srca, src); + int dst = dstreg + 8; + jnf_ADDA_l(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ADDA.L #.L,An */ +uae_u32 REGPARAM2 op_d1fc_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + uae_s32 src = comp_get_ilong((m68k_pc_offset += 4) - 4); + int dst = dstreg + 8; + jnf_ADDA_l_imm(dst, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRQ.B #,Dn */ +uae_u32 REGPARAM2 op_e000_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_ASR_b_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRQ.B #,Dn */ +uae_u32 REGPARAM2 op_e008_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSR_b_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXRQ.B #,Dn */ +uae_u32 REGPARAM2 op_e010_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROXR_b(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORQ.B #,Dn */ +uae_u32 REGPARAM2 op_e018_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROR_b(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e020_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_ASR_b_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e028_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSR_b_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +#endif + +#ifdef PART_8 + +/* ROXR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e030_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROXR_b(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e038_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROR_b(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRQ.W #,Dn */ +uae_u32 REGPARAM2 op_e040_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_ASR_w_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRQ.W #,Dn */ +uae_u32 REGPARAM2 op_e048_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSR_w_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXRQ.W #,Dn */ +uae_u32 REGPARAM2 op_e050_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROXR_w(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORQ.W #,Dn */ +uae_u32 REGPARAM2 op_e058_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROR_w(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e060_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_ASR_w_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e068_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSR_w_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e070_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROXR_w(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e078_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROR_w(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRQ.L #,Dn */ +uae_u32 REGPARAM2 op_e080_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_ASR_l_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRQ.L #,Dn */ +uae_u32 REGPARAM2 op_e088_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSR_l_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXRQ.L #,Dn */ +uae_u32 REGPARAM2 op_e090_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROXR_l(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORQ.L #,Dn */ +uae_u32 REGPARAM2 op_e098_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROR_l(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_ASR_l_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSR_l_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROXR_l(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0b8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROR_l(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (An) */ +uae_u32 REGPARAM2 op_e0d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_ASRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (An)+ */ +uae_u32 REGPARAM2 op_e0d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_ASRW(src); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W -(An) */ +uae_u32 REGPARAM2 op_e0e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jnf_ASRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (d16,An) */ +uae_u32 REGPARAM2 op_e0e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_ASRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e0f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jnf_ASRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (xxx).W */ +uae_u32 REGPARAM2 op_e0f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_ASRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASRW.W (xxx).L */ +uae_u32 REGPARAM2 op_e0f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jnf_ASRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e100_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_b_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e108_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_b_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e110_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROXL_b(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e118_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROL_b(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e120_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_b_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e128_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_b_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e130_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROXL_b(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e138_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROL_b(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e140_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_w_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e148_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_w_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e150_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROXL_w(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e158_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROL_w(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e160_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_w_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e168_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_w_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e170_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROXL_w(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e178_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROL_w(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e180_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_l_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e188_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_l_imm(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e190_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROXL_l(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e198_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = alloc_scratch(); + mov_l_ri(cnt, srcreg); + int data = dstreg; + jnf_ROL_l(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1a0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_l_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1a8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int data = dstreg; + jnf_LSL_l_reg(data, srcreg); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROXL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1b0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROXL_l(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1b8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = ((opcode >> 9) & 7); + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int cnt = srcreg; + int data = dstreg; + jnf_ROL_l(data, cnt); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (An) */ +uae_u32 REGPARAM2 op_e1d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_ASLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (An)+ */ +uae_u32 REGPARAM2 op_e1d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_ASLW(src); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W -(An) */ +uae_u32 REGPARAM2 op_e1e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jnf_ASLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (d16,An) */ +uae_u32 REGPARAM2 op_e1e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_ASLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e1f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jnf_ASLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (xxx).W */ +uae_u32 REGPARAM2 op_e1f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_ASLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ASLW.W (xxx).L */ +uae_u32 REGPARAM2 op_e1f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jnf_ASLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (An) */ +uae_u32 REGPARAM2 op_e2d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_LSRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (An)+ */ +uae_u32 REGPARAM2 op_e2d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_LSRW(src); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W -(An) */ +uae_u32 REGPARAM2 op_e2e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jnf_LSRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (d16,An) */ +uae_u32 REGPARAM2 op_e2e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_LSRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e2f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jnf_LSRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (xxx).W */ +uae_u32 REGPARAM2 op_e2f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_LSRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSRW.W (xxx).L */ +uae_u32 REGPARAM2 op_e2f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jnf_LSRW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (An) */ +uae_u32 REGPARAM2 op_e3d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_LSLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (An)+ */ +uae_u32 REGPARAM2 op_e3d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_LSLW(src); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W -(An) */ +uae_u32 REGPARAM2 op_e3e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jnf_LSLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (d16,An) */ +uae_u32 REGPARAM2 op_e3e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_LSLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e3f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jnf_LSLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (xxx).W */ +uae_u32 REGPARAM2 op_e3f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_LSLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* LSLW.W (xxx).L */ +uae_u32 REGPARAM2 op_e3f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jnf_LSLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (An) */ +uae_u32 REGPARAM2 op_e6d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_RORW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (An)+ */ +uae_u32 REGPARAM2 op_e6d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_RORW(src); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W -(An) */ +uae_u32 REGPARAM2 op_e6e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jnf_RORW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (d16,An) */ +uae_u32 REGPARAM2 op_e6e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_RORW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e6f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jnf_RORW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (xxx).W */ +uae_u32 REGPARAM2 op_e6f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_RORW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* RORW.W (xxx).L */ +uae_u32 REGPARAM2 op_e6f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jnf_RORW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (An) */ +uae_u32 REGPARAM2 op_e7d0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_ROLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (An)+ */ +uae_u32 REGPARAM2 op_e7d8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + int src = alloc_scratch(); + readword(srca, src); + jnf_ROLW(src); + writeword(srca, src); + arm_ADD_l_ri8(srcreg + 8, 2); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W -(An) */ +uae_u32 REGPARAM2 op_e7e0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = srcreg + 8; + arm_SUB_l_ri8(srcreg + 8, 2); + int src = alloc_scratch(); + readword(srca, src); + jnf_ROLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (d16,An) */ +uae_u32 REGPARAM2 op_e7e8_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + lea_l_brr(srca, 8 + srcreg, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_ROLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_e7f0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset += 2) - 2), srca); + int src = alloc_scratch(); + readword(srca, src); + jnf_ROLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (xxx).W */ +uae_u32 REGPARAM2 op_e7f8_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2)); + int src = alloc_scratch(); + readword(srca, src); + jnf_ROLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* ROLW.W (xxx).L */ +uae_u32 REGPARAM2 op_e7f9_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + dont_care_flags(); + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int src = alloc_scratch(); + readword(srca, src); + jnf_ROLW(src); + writeword(srca, src); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + return 0; +} + +/* BFINS.L #.W,Dn */ +uae_u32 REGPARAM2 op_efc0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dst=dstreg; + if ((extra & 0x0820) == 0x0000) { + jnf_BFINS_ii(dst, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0800) { + jnf_BFINS_di(dst, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jnf_BFINS_id(dst, srcreg, offs, width); + } else { + jnf_BFINS_dd(dst, srcreg, offs, width); + } + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* BFINS.L #.W,(An) */ +uae_u32 REGPARAM2 op_efd0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dsta=alloc_scratch(); + mov_l_rr(dsta,dstreg+8); + if ((extra & 0x0800) == 0x0800) { + arm_ADD_ldiv8(dsta,offs); + } + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dsta, 4); + int dst2=alloc_scratch(); + readlong(dsta,dst2); + if ((extra & 0x0820) == 0x0000) { + if(32 - offs - width >= 0) { + jnf_BFINS_ii(dst, srcreg, offs, width); + } else { + jnf_BFINS2_ii(dst, dst2, srcreg, offs, width); + } + } else if ((extra & 0x0820) == 0x0800) { + jnf_BFINS2_di(dst, dst2, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jnf_BFINS2_id(dst, dst2, srcreg, offs, width); + } else { + jnf_BFINS2_dd(dst, dst2, srcreg, offs, width); + } + writelong(dsta,dst2); + arm_SUB_l_ri8(dsta, 4); + writelong(dsta,dst); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* BFINS.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_efe8_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dsta=alloc_scratch(); + lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if ((extra & 0x0800) == 0x0800) { + arm_ADD_ldiv8(dsta,offs); + } + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dsta, 4); + int dst2=alloc_scratch(); + readlong(dsta,dst2); + if ((extra & 0x0820) == 0x0000) { + if(32 - offs - width >= 0) { + jnf_BFINS_ii(dst, srcreg, offs, width); + } else { + jnf_BFINS2_ii(dst, dst2, srcreg, offs, width); + } + } else if ((extra & 0x0820) == 0x0800) { + jnf_BFINS2_di(dst, dst2, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jnf_BFINS2_id(dst, dst2, srcreg, offs, width); + } else { + jnf_BFINS2_dd(dst, dst2, srcreg, offs, width); + } + writelong(dsta,dst2); + arm_SUB_l_ri8(dsta, 4); + writelong(dsta,dst); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* BFINS.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_eff0_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dsta=alloc_scratch(); + calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); + if ((extra & 0x0800) == 0x0800) { + arm_ADD_ldiv8(dsta,offs); + } + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dsta, 4); + int dst2=alloc_scratch(); + readlong(dsta,dst2); + if ((extra & 0x0820) == 0x0000) { + if(32 - offs - width >= 0) { + jnf_BFINS_ii(dst, srcreg, offs, width); + } else { + jnf_BFINS2_ii(dst, dst2, srcreg, offs, width); + } + } else if ((extra & 0x0820) == 0x0800) { + jnf_BFINS2_di(dst, dst2, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jnf_BFINS2_id(dst, dst2, srcreg, offs, width); + } else { + jnf_BFINS2_dd(dst, dst2, srcreg, offs, width); + } + writelong(dsta,dst2); + arm_SUB_l_ri8(dsta, 4); + writelong(dsta,dst); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* BFINS.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_eff8_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dsta=alloc_scratch(); + mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if ((extra & 0x0800) == 0x0800) { + arm_ADD_ldiv8(dsta,offs); + } + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dsta, 4); + int dst2=alloc_scratch(); + readlong(dsta,dst2); + if ((extra & 0x0820) == 0x0000) { + if(32 - offs - width >= 0) { + jnf_BFINS_ii(dst, srcreg, offs, width); + } else { + jnf_BFINS2_ii(dst, dst2, srcreg, offs, width); + } + } else if ((extra & 0x0820) == 0x0800) { + jnf_BFINS2_di(dst, dst2, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jnf_BFINS2_id(dst, dst2, srcreg, offs, width); + } else { + jnf_BFINS2_dd(dst, dst2, srcreg, offs, width); + } + writelong(dsta,dst2); + arm_SUB_l_ri8(dsta, 4); + writelong(dsta,dst); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* BFINS.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_eff9_0_comp_nf(uae_u32 opcode) { +#if !defined(ARMV6T2) && !defined(CPU_AARCH64) + FAIL(1); + return 0; +#else + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + dont_care_flags(); + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int srcreg = (extra >> 12) & 7; + int offs, width; + if ((extra & 0x0800) == 0x0000) + offs = (extra >> 6) & 0x1f; + else + offs = (extra >> 6) & 0x07; + if ((extra & 0x0020) == 0x0000) + width = ((extra - 1) & 0x1f) + 1; + else + width = (extra & 0x07); + int dsta=alloc_scratch(); + mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + if ((extra & 0x0800) == 0x0800) { + arm_ADD_ldiv8(dsta,offs); + } + int dst=alloc_scratch(); + readlong(dsta,dst); + arm_ADD_l_ri8(dsta, 4); + int dst2=alloc_scratch(); + readlong(dsta,dst2); + if ((extra & 0x0820) == 0x0000) { + if(32 - offs - width >= 0) { + jnf_BFINS_ii(dst, srcreg, offs, width); + } else { + jnf_BFINS2_ii(dst, dst2, srcreg, offs, width); + } + } else if ((extra & 0x0820) == 0x0800) { + jnf_BFINS2_di(dst, dst2, srcreg, offs, width); + } else if ((extra & 0x0820) == 0x0020) { + jnf_BFINS2_id(dst, dst2, srcreg, offs, width); + } else { + jnf_BFINS2_dd(dst, dst2, srcreg, offs, width); + } + writelong(dsta,dst2); + arm_SUB_l_ri8(dsta, 4); + writelong(dsta,dst); + if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); +return 0; +#endif +} + +/* FPP.L #.W,Dn */ +uae_u32 REGPARAM2 op_f200_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,An */ +uae_u32 REGPARAM2 op_f208_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(An) */ +uae_u32 REGPARAM2 op_f210_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_f218_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,-(An) */ +uae_u32 REGPARAM2 op_f220_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_f228_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_f230_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_f238_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_f239_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_f23a_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 2; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_f23b_0_comp_nf(uae_u32 opcode) { + uae_s32 dstreg = 3; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FPP.L #.W,#.L */ +uae_u32 REGPARAM2 op_f23c_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fpp_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,Dn */ +uae_u32 REGPARAM2 op_f240_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(An) */ +uae_u32 REGPARAM2 op_f250_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_f258_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,-(An) */ +uae_u32 REGPARAM2 op_f260_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_f268_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_f270_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_f278_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FScc.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_f279_0_comp_nf(uae_u32 opcode) { + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + uae_u16 extra = comp_get_iword((m68k_pc_offset += 2) - 2); + comp_fscc_opp(opcode, extra); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FBccQ.L #,#.W */ +uae_u32 REGPARAM2 op_f280_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 63); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + comp_fbcc_opp(opcode); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* FBccQ.L #,#.L */ +uae_u32 REGPARAM2 op_f2c0_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 63); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; +#ifdef USE_JIT_FPU + comp_fbcc_opp(opcode); +#else + failure = 1; +#endif + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* MOVE16.L (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_f600_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (special_mem) { + FAIL(1); + return 0; + } + int srca = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + jnf_ADD_im8(srcreg + 8, srcreg + 8, 16); + jnf_MOVE16(dsta, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* MOVE16.L (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_f608_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (special_mem) { + FAIL(1); + return 0; + } + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dsta = dstreg + 8; + jnf_ADD_im8(dstreg + 8, dstreg + 8, 16); + jnf_MOVE16(dsta, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* MOVE16.L (An),(xxx).L */ +uae_u32 REGPARAM2 op_f610_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (special_mem) { + FAIL(1); + return 0; + } + int srca = srcreg + 8; + int dsta = alloc_scratch(); + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + jnf_MOVE16(dsta, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* MOVE16.L (xxx).L,(An) */ +uae_u32 REGPARAM2 op_f618_0_comp_nf(uae_u32 opcode) { + uae_u32 dstreg = opcode & 7; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (special_mem) { + FAIL(1); + return 0; + } + int srca = alloc_scratch(); + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset += 4) - 4)); /* absl */ + int dsta = dstreg + 8; + jnf_MOVE16(dsta, srca); + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +/* MOVE16.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_f620_0_comp_nf(uae_u32 opcode) { + uae_s32 srcreg = (opcode & 7); + uae_s32 dstreg = 0; + uae_u32 m68k_pc_offset_thisinst = m68k_pc_offset; + m68k_pc_offset += 2; + if (special_mem) { + FAIL(1); + return 0; + } + { + uae_u16 dstreg = ((comp_get_iword((m68k_pc_offset += 2) - 2)) >> 12) & 0x07; + int srca = srcreg + 8; + int dsta = dstreg + 8; + jnf_MOVE16(dsta, srca); + if (srcreg != dstreg) + jnf_ADD_im8(srcreg + 8, srcreg + 8, 16); + jnf_ADD_im8(dstreg + 8, dstreg + 8, 16); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) sync_m68k_pc(); + if (failure) m68k_pc_offset = m68k_pc_offset_thisinst; + return 0; +} + +#endif + +#endif diff --git a/src/jit/arm/compemu_arm.h b/src/jit/arm/compemu_arm.h new file mode 100644 index 000000000..c7d782b8d --- /dev/null +++ b/src/jit/arm/compemu_arm.h @@ -0,0 +1,407 @@ +/* + * compiler/compemu.h - Public interface and definitions + * + * Copyright (c) 2001-2004 Milan Jurik of ARAnyM dev team (see AUTHORS) + * + * Inspired by Christian Bauer's Basilisk II + * + * This file is part of the ARAnyM project which builds a new and powerful + * TOS/FreeMiNT compatible virtual machine running on almost any hardware. + * + * JIT compiler m68k -> IA-32 and AMD64 + * + * Original 68040 JIT compiler for UAE, copyright 2000-2002 Bernd Meyer + * Adaptation for Basilisk II and improvements, copyright 2000-2004 Gwenole Beauchesne + * Portions related to CPU detection come from linux/arch/i386/kernel/setup.c + * + * ARAnyM is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * ARAnyM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ARAnyM; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef COMPEMU_H +#define COMPEMU_H + +#include "sysconfig.h" +#include "newcpu.h" + +#ifdef UAE +#ifdef CPU_64_BIT +typedef uae_u64 uintptr; +typedef uae_s64 intptr; +#else +typedef uae_u32 uintptr; +#endif +/* FIXME: cpummu.cpp also checks for USE_JIT, possibly others */ +#define USE_JIT +#endif + +#define JITPTR (uae_u32)(uintptr) + +/* Now that we do block chaining, and also have linked lists on each tag, + TAGMASK can be much smaller and still do its job. Saves several megs + of memory! */ +#define TAGMASK 0x0000ffff +#define TAGSIZE (TAGMASK+1) +#define MAXRUN 1024 +#define cacheline(x) (((uintptr)x)&TAGMASK) + +extern uae_u8* start_pc_p; +extern uae_u32 start_pc; + +struct blockinfo_t; + +typedef struct { + uae_u16* location; + uae_u8 specmem; +} cpu_history; + +typedef union { + cpuop_func* handler; + struct blockinfo_t* bi; +} cacheline; + +#define USE_F_ALIAS 1 +#define USE_OFFSET 1 +#define COMP_DEBUG 1 + +#if COMP_DEBUG +#define Dif(x) if (x) +#else +#define Dif(x) if (0) +#endif + +#define SCALE 2 +#define MAXCYCLES (1000 * CYCLE_UNIT) + +#define BYTES_PER_INST 10240 /* paranoid ;-) */ +#if defined(CPU_arm) +#define LONGEST_68K_INST 256 /* The number of bytes the longest possible + 68k instruction takes */ +#else +#define LONGEST_68K_INST 16 /* The number of bytes the longest possible + 68k instruction takes */ +#endif +#define MAX_CHECKSUM_LEN 2048 /* The maximum size we calculate checksums + for. Anything larger will be flushed + unconditionally even with SOFT_FLUSH */ +#define MAX_HOLD_BI 3 /* One for the current block, and up to two + for jump targets */ + +#if 1 +// gb-- my format from readcpu.cpp is not the same +#define FLAG_X 0x0010 +#define FLAG_N 0x0008 +#define FLAG_Z 0x0004 +#define FLAG_V 0x0002 +#define FLAG_C 0x0001 +#else +#define FLAG_C 0x0010 +#define FLAG_V 0x0008 +#define FLAG_Z 0x0004 +#define FLAG_N 0x0002 +#define FLAG_X 0x0001 +#endif +#define FLAG_CZNV (FLAG_C | FLAG_Z | FLAG_N | FLAG_V) +#define FLAG_ALL (FLAG_C | FLAG_Z | FLAG_N | FLAG_V | FLAG_X) +#define FLAG_ZNV (FLAG_Z | FLAG_N | FLAG_V) + +#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) +#define USE_DATA_BUFFER +#elif defined(CPU_AARCH64) +#define N_REGS 18 /* really 32, but 29 to 31 are FP, LR, SP; 18 has special meaning; 27 holds memstart and 28 holds regs-struct */ +#else +#define N_REGS 11 /* really 16, but 13 to 15 are SP, LR, PC; 11 holds memstart and 12 is scratch register */ +#endif + +#define N_FREGS 16 // We use 10 regs: 6 - FP_RESULT, 7 - SCRATCH, 8-15 - Amiga regs FP0-FP7 + +/* Functions exposed to newcpu, or to what was moved from newcpu.c to + * compemu_support.c */ +extern void compiler_init(void); +extern void compiler_exit(void); +extern void build_comp(void); +extern void set_cache_state(int enabled); +#ifdef JIT +extern void (*flush_icache)(int); +#endif +extern void alloc_cache(void); +extern void compile_block(cpu_history* pc_hist, int blocklen, int totcyles); +extern int check_for_cache_miss(void); + +#define scaled_cycles(x) (currprefs.m68k_speed<0?(((x)/SCALE)?(((x)/SCALE (uintptr_t)0xffffffff) { + jit_abort("JIT: 64-bit pointer (0x%llx) at %s:%d (fatal)", + (unsigned long long)address, file, line); + } + return (uae_u32)address; +} +#define uae_p32(x) (check_uae_p32((uintptr)(x), __FILE__, __LINE__)) +#else +#define uae_p32(x) ((uae_u32)(x)) +#endif + +#endif /* COMPEMU_H */ diff --git a/src/jit/arm/compemu_fpp_arm.cpp b/src/jit/arm/compemu_fpp_arm.cpp new file mode 100644 index 000000000..78651d71c --- /dev/null +++ b/src/jit/arm/compemu_fpp_arm.cpp @@ -0,0 +1,965 @@ +/* + * UAE - The Un*x Amiga Emulator + * + * MC68881 emulation + * + * Copyright 1996 Herman ten Brugge + * Adapted for JIT compilation (c) Bernd Meyer, 2000 + * Modified 2005 Peter Keunecke + */ + +#include + +#include "sysdeps.h" + +#include "options.h" +#include "memory.h" +#include "newcpu.h" +#include "compemu_arm.h" +#include "flags_arm.h" + +#if defined(USE_JIT_FPU) + +extern void fp_to_exten(fpdata *fpd, uae_u32 wrd1, uae_u32 wrd2, uae_u32 wrd3); + +static const int sz1[8] = { 4, 4, 12, 12, 2, 8, 1, 0 }; +static const int sz2[8] = { 4, 4, 12, 12, 2, 8, 2, 0 }; + +/* return the required floating point precision or -1 for failure, 0=E, 1=S, 2=D */ +STATIC_INLINE int comp_fp_get (uae_u32 opcode, uae_u16 extra, int treg) +{ + int reg = opcode & 7; + int mode = (opcode >> 3) & 7; + int size = (extra >> 10) & 7; + + if (size == 3 || size == 7) /* 3 = packed decimal, 7 is not defined */ + return -1; + switch (mode) { + case 0: /* Dn */ + switch (size) { + case 0: /* Long */ + fmov_l_rr (treg, reg); + return 2; + case 1: /* Single */ + fmov_s_rr (treg, reg); + return 1; + case 4: /* Word */ + fmov_w_rr (treg, reg); + return 1; + case 6: /* Byte */ + fmov_b_rr (treg, reg); + return 1; + default: + return -1; + } + case 1: /* An, invalid mode */ + return -1; + case 2: /* (An) */ + mov_l_rr (S1, reg + 8); + break; + case 3: /* (An)+ */ + mov_l_rr (S1, reg + 8); + arm_ADD_l_ri8(reg + 8, (reg == 7 ? sz2[size] : sz1[size])); + break; + case 4: /* -(An) */ + arm_SUB_l_ri8(reg + 8, (reg == 7 ? sz2[size] : sz1[size])); + mov_l_rr (S1, reg + 8); + break; + case 5: /* (d16,An) */ + { + uae_u32 off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); + mov_l_rr (S1, reg + 8); + lea_l_brr (S1, S1, off); + break; + } + case 6: /* (d8,An,Xn) or (bd,An,Xn) or ([bd,An,Xn],od) or ([bd,An],Xn,od) */ + { + uae_u32 dp = comp_get_iword ((m68k_pc_offset += 2) - 2); + calc_disp_ea_020 (reg + 8, dp, S1); + break; + } + case 7: + switch (reg) { + case 0: /* (xxx).W */ + { + uae_u32 off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); + mov_l_ri (S1, off); + break; + } + case 1: /* (xxx).L */ + { + uae_u32 off = comp_get_ilong ((m68k_pc_offset += 4) - 4); + mov_l_ri (S1, off); + break; + } + case 2: /* (d16,PC) */ + { + uae_u32 address = start_pc + ((uae_char*) comp_pc_p - (uae_char*) start_pc_p) + m68k_pc_offset; + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); + mov_l_ri (S1, address + PC16off); + break; + } + case 3: /* (d8,PC,Xn) or (bd,PC,Xn) or ([bd,PC,Xn],od) or ([bd,PC],Xn,od) */ + return -1; /* rarely used, fallback to non-JIT */ + case 4: /* # < data >; Constants should be converted just once by the JIT */ + m68k_pc_offset += sz2[size]; + switch (size) { + case 0: + { + uae_s32 li = comp_get_ilong(m68k_pc_offset - 4); + float si = (float)li; + + if (li == (int)si) { + //write_log ("converted immediate LONG constant to SINGLE\n"); + fmov_s_ri(treg, *(uae_u32 *)&si); + return 1; + } + //write_log ("immediate LONG constant\n"); + fmov_l_ri(treg, *(uae_u32 *)&li); + return 2; + } + case 1: + //write_log (_T("immediate SINGLE constant\n")); + fmov_s_ri(treg, comp_get_ilong(m68k_pc_offset - 4)); + return 1; + case 2: + { + //write_log (_T("immediate LONG DOUBLE constant\n")); + uae_u32 wrd1, wrd2, wrd3; + fpdata tmp; + wrd3 = comp_get_ilong(m68k_pc_offset - 4); + wrd2 = comp_get_ilong(m68k_pc_offset - 8); + wrd1 = comp_get_iword(m68k_pc_offset - 12) << 16; + fp_to_exten(&tmp, wrd1, wrd2, wrd3); + mov_l_ri(S1, ((uae_u32*)&tmp)[0]); + mov_l_ri(S2, ((uae_u32*)&tmp)[1]); + fmov_d_rrr (treg, S1, S2); + return 0; + } + case 4: + { + float si = (float)(uae_s16)comp_get_iword(m68k_pc_offset-2); + + //write_log (_T("converted immediate WORD constant %f to SINGLE\n"), si); + fmov_s_ri(treg, *(uae_u32 *)&si); + return 1; + } + case 5: + { + //write_log (_T("immediate DOUBLE constant\n")); + mov_l_ri(S1, comp_get_ilong(m68k_pc_offset - 4)); + mov_l_ri(S2, comp_get_ilong(m68k_pc_offset - 8)); + fmov_d_rrr (treg, S1, S2); + return 2; + } + case 6: + { + float si = (float)(uae_s8)comp_get_ibyte(m68k_pc_offset - 2); + + //write_log (_T("converted immediate BYTE constant to SINGLE\n")); + fmov_s_ri(treg, *(uae_u32 *)&si); + return 1; + } + default: /* never reached */ + return -1; + } + default: /* never reached */ + return -1; + } + } + + switch (size) { + case 0: /* Long */ + readlong (S1, S2); + fmov_l_rr (treg, S2); + return 2; + case 1: /* Single */ + readlong (S1, S2); + fmov_s_rr (treg, S2); + return 1; + case 2: /* Long Double */ + fp_to_exten_rm (treg, S1); + return 0; + case 4: /* Word */ + readword (S1, S2); + fmov_w_rr (treg, S2); + return 1; + case 5: /* Double */ + fp_to_double_rm (treg, S1); + return 2; + case 6: /* Byte */ + readbyte (S1, S2); + fmov_b_rr (treg, S2); + return 1; + default: + return -1; + } + return -1; +} + +/* return of -1 means failure, >=0 means OK */ +STATIC_INLINE int comp_fp_put (uae_u32 opcode, uae_u16 extra) +{ + int reg = opcode & 7; + int sreg = (extra >> 7) & 7; + int mode = (opcode >> 3) & 7; + int size = (extra >> 10) & 7; + + if (size == 3 || size == 7) /* 3 = packed decimal, 7 is not defined */ + return -1; + switch (mode) { + case 0: /* Dn */ + switch (size) { + case 0: /* FMOVE.L FPx, Dn */ + fmov_to_l_rr(reg, sreg); + return 0; + case 1: /* FMOVE.S FPx, Dn */ + fmov_to_s_rr(reg, sreg); + return 0; + case 4: /* FMOVE.W FPx, Dn */ + fmov_to_w_rr(reg, sreg); + return 0; + case 6: /* FMOVE.B FPx, Dn */ + fmov_to_b_rr(reg, sreg); + return 0; + default: + return -1; + } + case 1: /* An, invalid mode */ + return -1; + case 2: /* (An) */ + mov_l_rr (S1, reg + 8); + break; + case 3: /* (An)+ */ + mov_l_rr (S1, reg + 8); + arm_ADD_l_ri8(reg + 8, (reg == 7 ? sz2[size] : sz1[size])); + break; + case 4: /* -(An) */ + arm_SUB_l_ri8(reg + 8, (reg == 7 ? sz2[size] : sz1[size])); + mov_l_rr (S1, reg + 8); + break; + case 5: /* (d16,An) */ + { + uae_u32 off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); + mov_l_rr (S1, reg + 8); + arm_ADD_l_ri (S1, off); + break; + } + case 6: /* (d8,An,Xn) or (bd,An,Xn) or ([bd,An,Xn],od) or ([bd,An],Xn,od) */ + { + uae_u32 dp = comp_get_iword ((m68k_pc_offset += 2) - 2); + calc_disp_ea_020 (reg + 8, dp, S1); + break; + } + case 7: + switch (reg) { + case 0: /* (xxx).W */ + { + uae_u32 off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); + mov_l_ri (S1, off); + break; + } + case 1: /* (xxx).L */ + { + uae_u32 off = comp_get_ilong ((m68k_pc_offset += 4) - 4); + mov_l_ri (S1, off); + break; + } + default: /* All other modes are not allowed for FPx to */ + write_log (_T ("JIT FMOVE FPx, Mode is not allowed %04x %04x\n"), opcode, extra); + return -1; + } + } + switch (size) { + case 0: /* Long */ + fmov_to_l_rr(S2, sreg); + writelong_clobber (S1, S2); + return 0; + case 1: /* Single */ + fmov_to_s_rr(S2, sreg); + writelong_clobber (S1, S2); + return 0; + case 2:/* Long Double */ + fp_from_exten_mr (S1, sreg); + return 0; + case 4: /* Word */ + fmov_to_w_rr(S2, sreg); + writeword_clobber (S1, S2); + return 0; + case 5: /* Double */ + fp_from_double_mr(S1, sreg); + return 0; + case 6: /* Byte */ + fmov_to_b_rr(S2, sreg); + writebyte (S1, S2); + return 0; + default: + return -1; + } + return -1; +} + +/* return -1 for failure, or register number for success */ +STATIC_INLINE int comp_fp_adr (uae_u32 opcode) +{ + uae_s32 off; + int mode = (opcode >> 3) & 7; + int reg = opcode & 7; + + switch (mode) { + case 2: + case 3: + case 4: + mov_l_rr (S1, 8 + reg); + return S1; + case 5: + off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); + mov_l_rr (S1, 8 + reg); + arm_ADD_l_ri (S1, off); + return S1; + case 7: + switch (reg) { + case 0: + off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); + mov_l_ri (S1, off); + return S1; + case 1: + off = comp_get_ilong ((m68k_pc_offset += 4) - 4); + mov_l_ri (S1, off); + return S1; + } + default: + return -1; + } +} + +void comp_fscc_opp (uae_u32 opcode, uae_u16 extra) +{ + int reg; + + if (!currprefs.compfpu) { + FAIL (1); + return; + } + + if (extra & 0x20) { /* only cc from 00 to 1f are defined */ + FAIL (1); + return; + } + if ((opcode & 0x38) != 0) { /* We can only do to integer register */ + FAIL (1); + return; + } + + fflags_into_flags (); + reg = (opcode & 7); + + if (!(opcode & 0x38)) { + switch (extra & 0x0f) { /* according to fpp.c, the 0x10 bit is ignored */ + case 0: fp_fscc_ri(reg, NATIVE_CC_F_NEVER); break; + case 1: fp_fscc_ri(reg, NATIVE_CC_EQ); break; + case 2: fp_fscc_ri(reg, NATIVE_CC_F_OGT); break; + case 3: fp_fscc_ri(reg, NATIVE_CC_F_OGE); break; + case 4: fp_fscc_ri(reg, NATIVE_CC_F_OLT); break; + case 5: fp_fscc_ri(reg, NATIVE_CC_F_OLE); break; + case 6: fp_fscc_ri(reg, NATIVE_CC_F_OGL); break; + case 7: fp_fscc_ri(reg, NATIVE_CC_F_OR); break; + case 8: fp_fscc_ri(reg, NATIVE_CC_F_UN); break; + case 9: fp_fscc_ri(reg, NATIVE_CC_F_UEQ); break; + case 10: fp_fscc_ri(reg, NATIVE_CC_F_UGT); break; + case 11: fp_fscc_ri(reg, NATIVE_CC_F_UGE); break; + case 12: fp_fscc_ri(reg, NATIVE_CC_F_ULT); break; + case 13: fp_fscc_ri(reg, NATIVE_CC_F_ULE); break; + case 14: fp_fscc_ri(reg, NATIVE_CC_NE); break; + case 15: fp_fscc_ri(reg, NATIVE_CC_AL); break; + } + } +} + +void comp_fbcc_opp (uae_u32 opcode) +{ + uae_u32 start_68k_offset = m68k_pc_offset; + uae_u32 off, v1, v2; + int cc; + + if (!currprefs.compfpu) { + FAIL (1); + return; + } + + if (opcode & 0x20) { /* only cc from 00 to 1f are defined */ + FAIL (1); + return; + } + if (!(opcode & 0x40)) { + off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); + } + else { + off = comp_get_ilong ((m68k_pc_offset += 4) - 4); + } + + /* according to fpp.c, the 0x10 bit is ignored + (it handles exception handling, which we don't + do, anyway ;-) */ + cc = opcode & 0x0f; + if(cc == 0) + return; /* jump never */ + + /* Note, "off" will sometimes be (unsigned) "negative", so the following + * uintptr can be > 0xffffffff, but the result will be correct due to + * wraparound when truncated to 32 bit in the call to mov_l_ri. */ + mov_l_ri(S1, (uintptr) + (comp_pc_p + off - (m68k_pc_offset - start_68k_offset))); + mov_l_ri(PC_P, (uintptr) comp_pc_p); + + /* Now they are both constant. Might as well fold in m68k_pc_offset */ + arm_ADD_l_ri (S1, m68k_pc_offset); + arm_ADD_l_ri (PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + + v1 = get_const (PC_P); + v2 = get_const (S1); + fflags_into_flags (); + + switch (cc) { + case 1: register_branch (v1, v2, NATIVE_CC_EQ); break; + case 2: register_branch (v1, v2, NATIVE_CC_F_OGT); break; + case 3: register_branch (v1, v2, NATIVE_CC_F_OGE); break; + case 4: register_branch (v1, v2, NATIVE_CC_F_OLT); break; + case 5: register_branch (v1, v2, NATIVE_CC_F_OLE); break; + case 6: register_branch (v1, v2, NATIVE_CC_F_OGL); break; + case 7: register_branch (v1, v2, NATIVE_CC_F_OR); break; + case 8: register_branch (v1, v2, NATIVE_CC_F_UN); break; + case 9: register_branch (v1, v2, NATIVE_CC_F_UEQ); break; + case 10: register_branch (v1, v2, NATIVE_CC_F_UGT); break; + case 11: register_branch (v1, v2, NATIVE_CC_F_UGE); break; + case 12: register_branch (v1, v2, NATIVE_CC_F_ULT); break; + case 13: register_branch (v1, v2, NATIVE_CC_F_ULE); break; + case 14: register_branch (v1, v2, NATIVE_CC_NE); break; + case 15: register_branch (v2, v2, NATIVE_CC_AL); break; + } +} + +static uae_u32 dhex_pi[] ={0x54442D18, 0x400921FB}; +static uae_u32 dhex_exp_1[] ={0x8B145769, 0x4005BF0A}; +static uae_u32 dhex_l2_e[] ={0x652B82FE, 0x3FF71547}; +static uae_u32 dhex_ln_2[] ={0xFEFA39EF, 0x3FE62E42}; +static uae_u32 dhex_ln_10[] ={0xBBB55516, 0x40026BB1}; +static uae_u32 dhex_l10_2[] ={0x509F79FF, 0x3FD34413}; +static uae_u32 dhex_l10_e[] ={0x1526E50E, 0x3FDBCB7B}; +static uae_u32 dhex_1e16[] ={0x37E08000, 0x4341C379}; +static uae_u32 dhex_1e32[] ={0xB5056E17, 0x4693B8B5}; +static uae_u32 dhex_1e64[] ={0xE93FF9F5, 0x4D384F03}; +static uae_u32 dhex_1e128[] ={0xF9301D32, 0x5A827748}; +static uae_u32 dhex_1e256[] ={0x7F73BF3C, 0x75154FDD}; +static double fp_1e8; + +void comp_fpp_opp (uae_u32 opcode, uae_u16 extra) +{ + int reg; + int sreg, prec = 0; + int dreg = (extra >> 7) & 7; + int source = (extra >> 13) & 7; + int opmode = extra & 0x7f; + + if (special_mem) { + FAIL(1); + return; + } + + if (!currprefs.compfpu) { + FAIL (1); + return; + } + switch (source) { + case 3: /* FMOVE FPx, */ + if (comp_fp_put (opcode, extra) < 0) + FAIL (1); + return; + case 4: /* FMOVE.L , ControlReg */ + if ((opcode & 0x38) == 0) { + // Dn + // Only single selected control register is allowed + // All control register bits unset = FPIAR + uae_u16 bits = extra & (0x1000 | 0x0800 | 0x0400); + if (bits && bits != 0x1000 && bits != 0x0800 && bits != 0x400) { + FAIL(1); + return; + } + if (extra & 0x1000) { /* FPCR */ + FAIL (1); + } + if (extra & 0x0800) { /* FPSR */ + FAIL (1); + } + if ((extra & 0x0400) || !bits) /* FPIAR */ + mov_l_mr ((uintptr)®s.fpiar, opcode & 15); + return; + } else if ((opcode & 0x38) == 0x08) { + // An + // Only FPIAR can be moved to/from address register + // All bits unset = FPIAR + uae_u16 bits = extra & (0x1000 | 0x0800 | 0x0400); + if (bits && bits != 0x0400) { + FAIL(1); + return; + } + mov_l_mr ((uintptr)®s.fpiar, opcode & 15); + return; + } + else if ((opcode & 0x3f) == 0x3c) { + if (extra & 0x1000) { /* FPCR */ + FAIL(1); + return; + } + if (extra & 0x0800) { /* FPSR */ + FAIL (1); + return; + } + if (extra & 0x0400) { /* FPIAR */ + uae_u32 val = comp_get_ilong ((m68k_pc_offset += 4) - 4); + mov_l_mi ((uintptr)®s.fpiar, val); + return; + } + } + FAIL (1); + return; + case 5: /* FMOVE.L ControlReg, */ + if ((opcode & 0x38) == 0) { + // Dn + // Only single selected control register is allowed + // All control register bits unset = FPIAR + uae_u16 bits = extra & (0x1000 | 0x0800 | 0x0400); + if (bits && bits != 0x1000 && bits != 0x0800 && bits != 0x400) { + FAIL(1); + return; + } + if (extra & 0x1000) /* FPCR */ + mov_l_rm (opcode & 15, (uintptr)®s.fpcr); + if (extra & 0x0800) { /* FPSR */ + FAIL (1); + } + if ((extra & 0x0400) || !bits) /* FPIAR */ + mov_l_rm (opcode & 15, (uintptr)®s.fpiar); + return; + } else if ((opcode & 0x38) == 0x08) { + // An + // Only FPIAR can be moved to/from address register + // All bits unset = FPIAR + uae_u16 bits = extra & (0x1000 | 0x0800 | 0x0400); + if (bits && bits != 0x0400) { + FAIL(1); + return; + } + mov_l_rm (opcode & 15, (uintptr)®s.fpiar); + return; + } + FAIL (1); + return; + case 6: + case 7: + { + uae_u32 list = 0; + int incr = 0; + if (extra & 0x2000) { + int ad; + + /* FMOVEM FPP->memory */ + switch ((extra >> 11) & 3) { /* Get out early if failure */ + case 0: + case 2: + break; + case 1: + case 3: + default: + FAIL (1); + return; + } + ad = comp_fp_adr (opcode); + if (ad < 0) { + m68k_setpc (m68k_getpc () - 4); + op_illg (opcode); + return; + } + switch ((extra >> 11) & 3) { + case 0: /* static pred */ + list = extra & 0xff; + incr = -1; + break; + case 2: /* static postinc */ + list = extra & 0xff; + incr = 1; + break; + case 1: /* dynamic pred */ + case 3: /* dynamic postinc */ + abort (); + } + if (incr < 0) { /* Predecrement */ + for (reg = 7; reg >= 0; reg--) { + if (list & 0x80) { + sub_l_ri (ad, 12); + fp_from_exten_mr (ad, reg); + } + list <<= 1; + } + } else { /* Postincrement */ + for (reg = 0; reg <= 7; reg++) { + if (list & 0x80) { + fp_from_exten_mr (ad, reg); + arm_ADD_l_ri (ad, 12); + } + list <<= 1; + } + } + if ((opcode & 0x38) == 0x18) + mov_l_rr ((opcode & 7) + 8, ad); + if ((opcode & 0x38) == 0x20) + mov_l_rr ((opcode & 7) + 8, ad); + } else { + /* FMOVEM memory->FPP */ + int ad; + switch ((extra >> 11) & 3) { /* Get out early if failure */ + case 0: + case 2: + break; + case 1: + case 3: + default: + FAIL (1); + return; + } + ad = comp_fp_adr (opcode); + if (ad < 0) { + m68k_setpc (m68k_getpc () - 4); + op_illg (opcode); + return; + } + switch ((extra >> 11) & 3) { + case 0: /* static pred */ + list = extra & 0xff; + incr = -1; + break; + case 2: /* static postinc */ + list = extra & 0xff; + incr = 1; + break; + case 1: /* dynamic pred */ + case 3: /* dynamic postinc */ + abort (); + } + + if (incr < 0) { + // not reached + for (reg = 7; reg >= 0; reg--) { + if (list & 0x80) { + sub_l_ri (ad, 12); + fp_to_exten_rm(reg, ad); + } + list <<= 1; + } + } else { + for (reg = 0; reg <= 7; reg++) { + if (list & 0x80) { + fp_to_exten_rm(reg, ad); + arm_ADD_l_ri (ad, 12); + } + list <<= 1; + } + } + if ((opcode & 0x38) == 0x18) + mov_l_rr ((opcode & 7) + 8, ad); + if ((opcode & 0x38) == 0x20) + mov_l_rr ((opcode & 7) + 8, ad); + } + } + return; + case 2: /* from to FPx */ + dont_care_fflags (); + if ((extra & 0xfc00) == 0x5c00) { /* FMOVECR */ + //write_log (_T("JIT FMOVECR %x\n"), opmode); + switch (opmode) { + case 0x00: + fmov_d_rm (dreg, (uintptr)&dhex_pi); + break; + case 0x0b: + fmov_d_rm (dreg, (uintptr)&dhex_l10_2); + break; + case 0x0c: + fmov_d_rm (dreg, (uintptr)&dhex_exp_1); + break; + case 0x0d: + fmov_d_rm (dreg, (uintptr)&dhex_l2_e); + break; + case 0x0e: + fmov_d_rm (dreg, (uintptr)&dhex_l10_e); + break; + case 0x0f: + fmov_d_ri_0 (dreg); + break; + case 0x30: + fmov_d_rm (dreg, (uintptr)&dhex_ln_2); + break; + case 0x31: + fmov_d_rm (dreg, (uintptr)&dhex_ln_10); + break; + case 0x32: + fmov_d_ri_1 (dreg); + break; + case 0x33: + fmov_d_ri_10 (dreg); + break; + case 0x34: + fmov_d_ri_100 (dreg); + break; + case 0x35: + fmov_l_ri (dreg, 10000); + break; + case 0x36: + fmov_rm (dreg, (uintptr)&fp_1e8); + break; + case 0x37: + fmov_d_rm (dreg, (uintptr)&dhex_1e16); + break; + case 0x38: + fmov_d_rm (dreg, (uintptr)&dhex_1e32); + break; + case 0x39: + fmov_d_rm (dreg, (uintptr)&dhex_1e64); + break; + case 0x3a: + fmov_d_rm (dreg, (uintptr)&dhex_1e128); + break; + case 0x3b: + fmov_d_rm (dreg, (uintptr)&dhex_1e256); + break; + default: + FAIL (1); + return; + } + fmov_rr (FP_RESULT, dreg); + return; + } + if (opmode & 0x20) /* two operands, so we need a scratch reg */ + sreg = FS1; + else /* one operand only, thus we can load the argument into dreg */ + sreg = dreg; + if(opmode >= 0x30 && opmode <= 0x37) { + // get out early for unsupported ops + FAIL (1); + return; + } + if ((prec = comp_fp_get (opcode, extra, sreg)) < 0) { + FAIL (1); + return; + } + if (!opmode) { /* FMOVE ,FPx */ + fmov_rr (FP_RESULT, dreg); + return; + } + /* no break here for to dreg */ + case 0: /* directly from sreg to dreg */ + if (!source) { /* no */ + dont_care_fflags (); + sreg = (extra >> 10) & 7; + } + switch (opmode) { + case 0x00: /* FMOVE */ + fmov_rr (dreg, sreg); + break; + case 0x01: /* FINT */ + frndint_rr (dreg, sreg); + break; + case 0x02: /* FSINH */ + ffunc_rr (sinh, dreg, sreg); + break; + case 0x03: /* FINTRZ */ + frndintz_rr (dreg, sreg); + break; + case 0x04: /* FSQRT */ + fsqrt_rr (dreg, sreg); + break; + case 0x06: /* FLOGNP1 */ + ffunc_rr (log1p, dreg, sreg); + break; + case 0x08: /* FETOXM1 */ + ffunc_rr (expm1, dreg, sreg); + break; + case 0x09: /* FTANH */ + ffunc_rr (tanh, dreg, sreg); + break; + case 0x0a: /* FATAN */ + ffunc_rr (atan, dreg, sreg); + break; + case 0x0c: /* FASIN */ + ffunc_rr (asin, dreg, sreg); + break; + case 0x0d: /* FATANH */ + ffunc_rr (atanh, dreg, sreg); + break; + case 0x0e: /* FSIN */ + ffunc_rr (sin, dreg, sreg); + break; + case 0x0f: /* FTAN */ + ffunc_rr (tan, dreg, sreg); + break; + case 0x10: /* FETOX */ + ffunc_rr (exp, dreg, sreg); + break; + case 0x11: /* FTWOTOX */ + fpowx_rr (2, dreg, sreg); + break; + case 0x12: /* FTENTOX */ + fpowx_rr (10, dreg, sreg); + break; + case 0x14: /* FLOGN */ + ffunc_rr (log, dreg, sreg); + break; + case 0x15: /* FLOG10 */ + ffunc_rr (log10, dreg, sreg); + break; + case 0x16: /* FLOG2 */ + ffunc_rr (log2, dreg, sreg); + break; + case 0x18: /* FABS */ + fabs_rr (dreg, sreg); + break; + case 0x19: /* FCOSH */ + ffunc_rr (cosh, dreg, sreg); + break; + case 0x1a: /* FNEG */ + fneg_rr (dreg, sreg); + break; + case 0x1c: /* FACOS */ + ffunc_rr (acos, dreg, sreg); + break; + case 0x1d: /* FCOS */ + ffunc_rr (cos, dreg, sreg); + break; + case 0x20: /* FDIV */ + fdiv_rr (dreg, sreg); + break; + case 0x21: /* FMOD */ + fmod_rr (dreg, sreg); + break; + case 0x22: /* FADD */ + fadd_rr (dreg, sreg); + break; + case 0x23: /* FMUL */ + fmul_rr (dreg, sreg); + break; + case 0x24: /* FSGLDIV */ + fsgldiv_rr (dreg, sreg); + break; + case 0x60: /* FSDIV */ + fdiv_rr (dreg, sreg); + if (!currprefs.fpu_strict) /* faster, but less strict rounding */ + break; + fcuts_r (dreg); + break; + case 0x25: /* FREM */ + frem1_rr (dreg, sreg); + break; + case 0x27: /* FSGLMUL */ + fsglmul_rr (dreg, sreg); + break; + case 0x63: /* FSMUL */ + fmul_rr (dreg, sreg); + if (!currprefs.fpu_strict) /* faster, but less strict rounding */ + break; + fcuts_r (dreg); + break; + case 0x28: /* FSUB */ + fsub_rr (dreg, sreg); + break; + case 0x30: /* FSINCOS */ + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + FAIL (1); + return; + case 0x38: /* FCMP */ + fmov_rr (FP_RESULT, dreg); + fsub_rr (FP_RESULT, sreg); + return; + case 0x3a: /* FTST */ + fmov_rr (FP_RESULT, sreg); + return; + case 0x40: /* FSMOVE */ + if (prec == 1 || !currprefs.fpu_strict) { + if (sreg != dreg) /* no */ + fmov_rr (dreg, sreg); + } + else { + fmovs_rr (dreg, sreg); + } + break; + case 0x44: /* FDMOVE */ + if (sreg != dreg) /* no */ + fmov_rr (dreg, sreg); + break; + case 0x41: /* FSSQRT */ + fsqrt_rr (dreg, sreg); + if (!currprefs.fpu_strict) /* faster, but less strict rounding */ + break; + fcuts_r (dreg); + break; + case 0x45: /* FDSQRT */ + fsqrt_rr (dreg, sreg); + break; + case 0x58: /* FSABS */ + fabs_rr (dreg, sreg); + if (prec != 1 && currprefs.fpu_strict) + fcuts_r (dreg); + break; + case 0x5a: /* FSNEG */ + fneg_rr (dreg, sreg); + if (prec != 1 && currprefs.fpu_strict) + fcuts_r (dreg); + break; + case 0x5c: /* FDABS */ + fabs_rr (dreg, sreg); + break; + case 0x5e: /* FDNEG */ + fneg_rr (dreg, sreg); + break; + case 0x62: /* FSADD */ + fadd_rr (dreg, sreg); + if (!currprefs.fpu_strict) /* faster, but less strict rounding */ + break; + fcuts_r (dreg); + break; + case 0x64: /* FDDIV */ + fdiv_rr (dreg, sreg); + break; + case 0x66: /* FDADD */ + fadd_rr (dreg, sreg); + break; + case 0x67: /* FDMUL */ + fmul_rr (dreg, sreg); + break; + case 0x68: /* FSSUB */ + fsub_rr (dreg, sreg); + if (!currprefs.fpu_strict) /* faster, but less strict rounding */ + break; + fcuts_r (dreg); + break; + case 0x6c: /* FDSUB */ + fsub_rr (dreg, sreg); + break; + default: + FAIL (1); + return; + } + fmov_rr (FP_RESULT, dreg); + return; + default: + write_log (_T ("Unsupported JIT-FPU instruction: 0x%04x %04x\n"), opcode, extra); + FAIL (1); + return; + } +} +#endif diff --git a/src/jit/compemu_midfunc_arm.cpp b/src/jit/arm/compemu_midfunc_arm.cpp similarity index 100% rename from src/jit/compemu_midfunc_arm.cpp rename to src/jit/arm/compemu_midfunc_arm.cpp diff --git a/src/jit/compemu_midfunc_arm.h b/src/jit/arm/compemu_midfunc_arm.h similarity index 100% rename from src/jit/compemu_midfunc_arm.h rename to src/jit/arm/compemu_midfunc_arm.h diff --git a/src/jit/compemu_midfunc_arm2.cpp b/src/jit/arm/compemu_midfunc_arm2.cpp similarity index 100% rename from src/jit/compemu_midfunc_arm2.cpp rename to src/jit/arm/compemu_midfunc_arm2.cpp diff --git a/src/jit/compemu_midfunc_arm2.h b/src/jit/arm/compemu_midfunc_arm2.h similarity index 100% rename from src/jit/compemu_midfunc_arm2.h rename to src/jit/arm/compemu_midfunc_arm2.h diff --git a/src/jit/compemu_midfunc_armA64.cpp b/src/jit/arm/compemu_midfunc_arm64.cpp similarity index 79% rename from src/jit/compemu_midfunc_armA64.cpp rename to src/jit/arm/compemu_midfunc_arm64.cpp index 2cbe10826..83671ff5c 100644 --- a/src/jit/compemu_midfunc_armA64.cpp +++ b/src/jit/arm/compemu_midfunc_arm64.cpp @@ -140,7 +140,7 @@ unlock2(d); \ if(!s_is_d) \ unlock2(s); - + MIDFUNC(0,live_flags,(void)) { @@ -164,13 +164,13 @@ MENDFUNC(0,make_flags_live,(void)) MIDFUNC(2,mov_l_mi,(IMPTR d, IM32 s)) { - /* d points always to memory in regs struct */ - LOAD_U32(REG_WORK2, s); - uintptr idx = d - (uintptr) ®s; - if(d == (uintptr) &(regs.pc_p) || d == (uintptr) &(regs.pc_oldp)) - STR_xXi(REG_WORK2, R_REGSTRUCT, idx); - else - STR_wXi(REG_WORK2, R_REGSTRUCT, idx); + /* d points always to memory in regs struct */ + LOAD_U32(REG_WORK2, s); + uintptr idx = d - (uintptr) ®s; + if(d == (uintptr) &(regs.pc_p) || d == (uintptr) &(regs.pc_oldp)) + STR_xXi(REG_WORK2, R_REGSTRUCT, idx); + else + STR_wXi(REG_WORK2, R_REGSTRUCT, idx); } MENDFUNC(2,mov_l_mi,(IMPTR d, IM32 s)) @@ -186,14 +186,14 @@ MIDFUNC(4,disp_ea20_target_add,(RW4 target, RR4 reg, IM8 shift, IM8 extend)) reg = readreg(reg); target = rmw(target); - + if(extend) { SIGNED16_REG_2_REG(REG_WORK1, reg); ADD_wwwLSLi(target, target, REG_WORK1, shift & 0x1f); } else { ADD_wwwLSLi(target, target, reg, shift & 0x1f); } - + unlock2(target); unlock2(reg); } @@ -211,14 +211,14 @@ MIDFUNC(4,disp_ea20_target_mov,(W4 target, RR4 reg, IM8 shift, IM8 extend)) reg = readreg(reg); target = writereg(target); - + if(extend) { SIGNED16_REG_2_REG(REG_WORK1, reg); LSL_wwi(target, REG_WORK1, shift & 0x1f); } else { LSL_wwi(target, reg, shift & 0x1f); } - + unlock2(target); unlock2(reg); } @@ -226,7 +226,7 @@ MENDFUNC(4,disp_ea20_target_mov,(W4 target, RR4 reg, IM8 shift, IM8 extend)) MIDFUNC(2,sign_extend_16_rr,(W4 d, RR2 s)) { - // Only used in calc_disp_ea_020() -> flags not relevant and never modified + // Only used in calc_disp_ea_020() -> flags not relevant and never modified if (isconst(s)) { set_const(d, (uae_s32)(uae_s16)live.state[s].val); return; @@ -260,15 +260,15 @@ MIDFUNC(3,lea_l_brr,(W4 d, RR4 s, IM32 offset)) s = readreg(s); d = writereg(d); } - - if(offset >= 0 && offset <= 0xfff) { - ADD_wwi(d, s, offset); - } else if(offset >= -0xfff && offset < 0) { - SUB_wwi(d, s, -offset); - } else { - LOAD_U32(REG_WORK1, offset); - ADD_www(d, s, REG_WORK1); - } + + if(offset >= 0 && offset <= 0xfff) { + ADD_wwi(d, s, offset); + } else if(offset >= -0xfff && offset < 0) { + SUB_wwi(d, s, -offset); + } else { + LOAD_U32(REG_WORK1, offset); + ADD_www(d, s, REG_WORK1); + } EXIT_REGS(d,s); } @@ -281,37 +281,37 @@ MIDFUNC(5,lea_l_brr_indexed,(W4 d, RR4 s, RR4 index, IM8 factor, IM8 offset)) return; } if (isconst(s) && isconst(index)) { - set_const(d, live.state[s].val + (uae_s32)(uae_s8)offset + live.state[index].val * factor); - return; + set_const(d, live.state[s].val + (uae_s32)(uae_s8)offset + live.state[index].val * factor); + return; } - + s = readreg(s); if(d == index) { - d = index = rmw(d); + d = index = rmw(d); } else { - index = readreg(index); - d = writereg(d); - } + index = readreg(index); + d = writereg(d); + } int shft; switch(factor) { - case 1: shft=0; break; - case 2: shft=1; break; - case 4: shft=2; break; - case 8: shft=3; break; - default: abort(); + case 1: shft=0; break; + case 2: shft=1; break; + case 4: shft=2; break; + case 8: shft=3; break; + default: abort(); } - if(offset >= 0 && offset <= 127) { - ADD_wwi(REG_WORK1, s, offset); - } else { - SUB_wwi(REG_WORK1, s, -offset); - } - ADD_wwwLSLi(d, REG_WORK1, index, shft); + if(offset >= 0 && offset <= 127) { + ADD_wwi(REG_WORK1, s, offset); + } else { + SUB_wwi(REG_WORK1, s, -offset); + } + ADD_wwwLSLi(d, REG_WORK1, index, shft); unlock2(d); - if(d != index) - unlock2(index); + if(d != index) + unlock2(index); unlock2(s); } MENDFUNC(5,lea_l_brr_indexed,(W4 d, RR4 s, RR4 index, IM8 factor, IM8 offset)) @@ -319,32 +319,32 @@ MENDFUNC(5,lea_l_brr_indexed,(W4 d, RR4 s, RR4 index, IM8 factor, IM8 offset)) MIDFUNC(4,lea_l_rr_indexed,(W4 d, RR4 s, RR4 index, IM8 factor)) { if (isconst(s) && isconst(index)) { - set_const(d, live.state[s].val + live.state[index].val * factor); - return; + set_const(d, live.state[s].val + live.state[index].val * factor); + return; } s = readreg(s); if(d == index) { - d = index = rmw(d); + d = index = rmw(d); } else { - index = readreg(index); - d = writereg(d); - } + index = readreg(index); + d = writereg(d); + } int shft; switch(factor) { - case 1: shft=0; break; - case 2: shft=1; break; - case 4: shft=2; break; - case 8: shft=3; break; - default: abort(); + case 1: shft=0; break; + case 2: shft=1; break; + case 4: shft=2; break; + case 8: shft=3; break; + default: abort(); } ADD_wwwLSLi(d, s, index, shft); unlock2(d); - if(d != index) - unlock2(index); + if(d != index) + unlock2(index); unlock2(s); } MENDFUNC(4,lea_l_rr_indexed,(W4 d, RR4 s, RR4 index, IM8 factor)) @@ -376,19 +376,19 @@ MENDFUNC(2,mov_l_rr,(W4 d, RR4 s)) MIDFUNC(2,mov_l_mr,(IMPTR d, RR4 s)) { - /* d points always to memory in regs struct */ + /* d points always to memory in regs struct */ if (isconst(s)) { COMPCALL(mov_l_mi)(d, live.state[s].val); return; } - + s = readreg(s); - uintptr idx = d - (uintptr) ®s; - if(d == (uintptr)®s.pc_oldp || d == (uintptr)®s.pc_p) - STR_xXi(s, R_REGSTRUCT, idx); - else - STR_wXi(s, R_REGSTRUCT, idx); + uintptr idx = d - (uintptr) ®s; + if(d == (uintptr)®s.pc_oldp || d == (uintptr)®s.pc_p) + STR_xXi(s, R_REGSTRUCT, idx); + else + STR_wXi(s, R_REGSTRUCT, idx); unlock2(s); } @@ -396,11 +396,11 @@ MENDFUNC(2,mov_l_mr,(IMPTR d, RR4 s)) MIDFUNC(2,mov_l_rm,(W4 d, IMPTR s)) { - /* s points always to memory in regs struct */ + /* s points always to memory in regs struct */ d = writereg(d); - uintptr idx = s - (uintptr) ®s; - LDR_wXi(d, R_REGSTRUCT, idx); + uintptr idx = s - (uintptr) ®s; + LDR_wXi(d, R_REGSTRUCT, idx); unlock2(d); } @@ -414,27 +414,27 @@ MENDFUNC(2,mov_l_ri,(W4 d, IM32 s)) MIDFUNC(2,mov_b_ri,(W1 d, IM8 s)) { - if(d < 16) { - if (isconst(d)) { - set_const(d, (live.state[d].val & 0xffffff00) | (s & 0x000000ff)); - return; - } - d = rmw(d); + if(d < 16) { + if (isconst(d)) { + set_const(d, (live.state[d].val & 0xffffff00) | (s & 0x000000ff)); + return; + } + d = rmw(d); MOV_xi(REG_WORK1, (s & 0xff)); BFI_xxii(d, REG_WORK1, 0, 8); - - unlock2(d); - } else { - set_const(d, s & 0xff); - } + + unlock2(d); + } else { + set_const(d, s & 0xff); + } } MENDFUNC(2,mov_b_ri,(W1 d, IM8 s)) MIDFUNC(2,sub_l_ri,(RW4 d, IM8 i)) { if (!i) - return; + return; if (isconst(d)) { live.state[d].val -= i; return; @@ -442,7 +442,7 @@ MIDFUNC(2,sub_l_ri,(RW4 d, IM8 i)) d = rmw(d); - SUB_xxi(d, d, i); + SUB_xxi(d, d, i); unlock2(d); } @@ -450,7 +450,7 @@ MENDFUNC(2,sub_l_ri,(RW4 d, IM8 i)) MIDFUNC(2,sub_w_ri,(RW2 d, IM8 i)) { - // This function is only called with i = 1 + // This function is only called with i = 1 // Caller needs flags... clobber_flags(); @@ -469,7 +469,7 @@ MENDFUNC(2,sub_w_ri,(RW2 d, IM8 i)) MIDFUNC(1,forget_about,(W4 r)) { if (isinreg(r)) - disassociate(r); + disassociate(r); live.state[r].val = 0; set_status(r, UNDEF); } @@ -509,8 +509,8 @@ MENDFUNC(2,arm_ADD_ldiv8,(RW4 d, RR4 s)) MIDFUNC(2,arm_ADD_l_ri,(RW4 d, IM32 i)) { - if (!i) - return; + if (!i) + return; if (isconst(d)) { live.state[d].val += i; return; @@ -518,26 +518,26 @@ MIDFUNC(2,arm_ADD_l_ri,(RW4 d, IM32 i)) d = rmw(d); - if(i >= 0 && i <= 0xfff) { + if(i >= 0 && i <= 0xfff) { ADD_xxi(d, d, i); - } else { - if(i > -0x7fff && i < 0x7fff) { - SIGNED16_IMM_2_REG(REG_WORK1, i); - } else { - LOAD_U32(REG_WORK1, i); - SXTW_xw(REG_WORK1, REG_WORK1); - } + } else { + if(i > -0x7fff && i < 0x7fff) { + SIGNED16_IMM_2_REG(REG_WORK1, i); + } else { + LOAD_U32(REG_WORK1, i); + SXTW_xw(REG_WORK1, REG_WORK1); + } ADD_xxx(d, d, REG_WORK1); - } - + } + unlock2(d); } MENDFUNC(2,arm_ADD_l_ri,(RW4 d, IM32 i)) MIDFUNC(2,arm_ADD_l_ri8,(RW4 d, IM8 i)) { - if (!i) - return; + if (!i) + return; if (isconst(d)) { live.state[d].val += i; return; @@ -551,8 +551,8 @@ MENDFUNC(2,arm_ADD_l_ri8,(RW4 d, IM8 i)) MIDFUNC(2,arm_SUB_l_ri8,(RW4 d, IM8 i)) { - if (!i) - return; + if (!i) + return; if (isconst(d)) { live.state[d].val -= i; return; @@ -584,7 +584,7 @@ void disam_range(void *start, void *stop) STATIC_INLINE void flush_cpu_icache(void *start, void *stop) { #ifdef JIT_DEBUG - if((uae_u64)stop - (uae_u64)start > 4) { + if((uae_u64)stop - (uae_u64)start > 4) { if(disasm_this) { char disbuf[256]; uint64_t disptr = (uint64_t)start; @@ -598,35 +598,38 @@ STATIC_INLINE void flush_cpu_icache(void *start, void *stop) } #endif - //__builtin___clear_cache(start, stop); - __clear_cache(start, stop); + //__builtin___clear_cache(start, stop); + __clear_cache(start, stop); } -STATIC_INLINE void write_jmp_target(uae_u32* jmpaddr, uintptr a) +STATIC_INLINE void write_jmp_target(uae_u32* jmpaddr, uintptr a) { uintptr off = (a - (uintptr)jmpaddr) >> 2; - if((*(jmpaddr) & 0xfc000000) == 0x14000000) { - /* branch always */ - off = off & 0x3ffffff; - *(jmpaddr) = (*(jmpaddr) & 0xfc000000) | off; - } else if((*(jmpaddr) & 0x7c000000) == 0x34000000) { - /* TBZ/TBNZ/CBZ/CBNZ */ - if((a > (uintptr)jmpaddr && off > 0x1fff) || (a < (uintptr)jmpaddr && (~off) > 0x1fff)) - write_log("JIT: TBZ/TBNZ branch to target too long.\n"); - off = off & 0x3fff; - *(jmpaddr) = (*(jmpaddr) & 0xfffc001f) | (off << 5); - } else { - /* conditional branch */ - if((a > (uintptr)jmpaddr && off > 0x3ffff) || (a < (uintptr)jmpaddr && (~off) > 0x3ffff)) - write_log("JIT: Branch to target too long.\n"); - off = off & 0x7ffff; - *(jmpaddr) = (*(jmpaddr) & 0xff00001f) | (off << 5); - } + if((*(jmpaddr) & 0xfc000000) == 0x14000000) { + /* branch always */ + off = off & 0x3ffffff; + *(jmpaddr) = (*(jmpaddr) & 0xfc000000) | off; + } else if((*(jmpaddr) & 0x7c000000) == 0x34000000) { + /* TBZ/TBNZ/CBZ/CBNZ */ + if((a > (uintptr)jmpaddr && off > 0x1fff) || (a < (uintptr)jmpaddr && (~off) > 0x1fff)) + write_log("JIT: TBZ/TBNZ branch to target too long.\n"); + off = off & 0x3fff; + *(jmpaddr) = (*(jmpaddr) & 0xfffc001f) | (off << 5); + } else { + /* conditional branch */ + if((a > (uintptr)jmpaddr && off > 0x3ffff) || (a < (uintptr)jmpaddr && (~off) > 0x3ffff)) + write_log("JIT: Branch to target too long.\n"); + off = off & 0x7ffff; + *(jmpaddr) = (*(jmpaddr) & 0xff00001f) | (off << 5); + } - flush_cpu_icache((void *)jmpaddr, (void *)&jmpaddr[1]); + flush_cpu_icache((void *)jmpaddr, (void *)&jmpaddr[1]); } +static inline void emit_jmp_target(uae_u32 a) { + emit_long(a - (JITPTR target + 4)); +} /************************************************************************* * FPU stuff * @@ -664,40 +667,40 @@ MENDFUNC(2,fmov_rr,(FW d, FR s)) MIDFUNC(2,fmov_l_rr,(FW d, RR4 s)) { s = readreg(s); - d = f_writereg(d); - raw_fmov_l_rr(d, s); + d = f_writereg(d); + raw_fmov_l_rr(d, s); f_unlock(d); - unlock2(s); + unlock2(s); } MENDFUNC(2,fmov_l_rr,(FW d, RR4 s)) MIDFUNC(2,fmov_s_rr,(FW d, RR4 s)) { s = readreg(s); - d = f_writereg(d); - raw_fmov_s_rr(d, s); + d = f_writereg(d); + raw_fmov_s_rr(d, s); f_unlock(d); - unlock2(s); + unlock2(s); } MENDFUNC(2,fmov_s_rr,(FW d, RR4 s)) MIDFUNC(2,fmov_w_rr,(FW d, RR2 s)) { s = readreg(s); - d = f_writereg(d); - raw_fmov_w_rr(d, s); + d = f_writereg(d); + raw_fmov_w_rr(d, s); f_unlock(d); - unlock2(s); + unlock2(s); } MENDFUNC(2,fmov_w_rr,(FW d, RR2 s)) MIDFUNC(2,fmov_b_rr,(FW d, RR1 s)) { s = readreg(s); - d = f_writereg(d); - raw_fmov_b_rr(d, s); + d = f_writereg(d); + raw_fmov_b_rr(d, s); f_unlock(d); - unlock2(s); + unlock2(s); } MENDFUNC(2,fmov_b_rr,(FW d, RR1 s)) @@ -705,11 +708,11 @@ MIDFUNC(3,fmov_d_rrr,(FW d, RR4 s1, RR4 s2)) { s1 = readreg(s1); s2 = readreg(s2); - d = f_writereg(d); - raw_fmov_d_rrr(d, s1, s2); + d = f_writereg(d); + raw_fmov_d_rrr(d, s1, s2); f_unlock(d); - unlock2(s2); - unlock2(s1); + unlock2(s2); + unlock2(s1); } MENDFUNC(3,fmov_d_rrr,(FW d, RR4 s1, RR4 s2)) @@ -729,19 +732,19 @@ MIDFUNC(2,fmov_l_ri,(FW d, IM32 i)) fmov_d_ri_100(d); break; default: - d = f_writereg(d); - compemu_raw_mov_l_ri(REG_WORK1, i); - raw_fmov_l_rr(d, REG_WORK1); + d = f_writereg(d); + compemu_raw_mov_l_ri(REG_WORK1, i); + raw_fmov_l_rr(d, REG_WORK1); f_unlock(d); - } + } } MENDFUNC(2,fmov_l_ri,(FW d, IM32 i)) MIDFUNC(2,fmov_s_ri,(FW d, IM32 i)) { - d = f_writereg(d); - compemu_raw_mov_l_ri(REG_WORK1, i); - raw_fmov_s_rr(d, REG_WORK1); + d = f_writereg(d); + compemu_raw_mov_l_ri(REG_WORK1, i); + raw_fmov_s_rr(d, REG_WORK1); f_unlock(d); } MENDFUNC(2,fmov_s_ri,(FW d, IM32 i)) @@ -749,20 +752,20 @@ MENDFUNC(2,fmov_s_ri,(FW d, IM32 i)) MIDFUNC(2,fmov_to_l_rr,(W4 d, FR s)) { s = f_readreg(s); - d = writereg(d); - raw_fmov_to_l_rr(d, s); + d = writereg(d); + raw_fmov_to_l_rr(d, s); unlock2(d); - f_unlock(s); + f_unlock(s); } MENDFUNC(2,fmov_to_l_rr,(W4 d, FR s)) MIDFUNC(2,fmov_to_s_rr,(W4 d, FR s)) { s = f_readreg(s); - d = writereg(d); - raw_fmov_to_s_rr(d, s); + d = writereg(d); + raw_fmov_to_s_rr(d, s); unlock2(d); - f_unlock(s); + f_unlock(s); } MENDFUNC(2,fmov_to_s_rr,(W4 d, FR s)) @@ -771,9 +774,9 @@ MIDFUNC(2,fmov_to_w_rr,(W4 d, FR s)) s = f_readreg(s); INIT_WREG_w(d); - raw_fmov_to_w_rr(d, s, targetIsReg); + raw_fmov_to_w_rr(d, s, targetIsReg); unlock2(d); - f_unlock(s); + f_unlock(s); } MENDFUNC(2,fmov_to_w_rr,(W4 d, FR s)) @@ -782,9 +785,9 @@ MIDFUNC(2,fmov_to_b_rr,(W4 d, FR s)) s = f_readreg(s); INIT_WREG_b(d); - raw_fmov_to_b_rr(d, s, targetIsReg); + raw_fmov_to_b_rr(d, s, targetIsReg); unlock2(d); - f_unlock(s); + f_unlock(s); } MENDFUNC(2,fmov_to_b_rr,(W4 d, FR s)) @@ -847,12 +850,12 @@ MENDFUNC(2,fmov_rm,(FW r, MEMR m)) MIDFUNC(3,fmov_to_d_rrr,(W4 d1, W4 d2, FR s)) { s = f_readreg(s); - d1 = writereg(d1); - d2 = writereg(d2); - raw_fmov_to_d_rrr(d1, d2, s); + d1 = writereg(d1); + d2 = writereg(d2); + raw_fmov_to_d_rrr(d1, d2, s); unlock2(d2); unlock2(d1); - f_unlock(s); + f_unlock(s); } MENDFUNC(3,fmov_to_d_rrr,(W4 d1, W4 d2, FR s)) @@ -1006,49 +1009,49 @@ MENDFUNC(2,fmovs_rr,(FW d, FR s)) MIDFUNC(3,ffunc_rr,(double (*func)(double), FW d, FR s)) { - clobber_flags(); + clobber_flags(); s = f_readreg(s); int reald = f_writereg(d); - prepare_for_call_1(); + prepare_for_call_1(); f_unlock(s); f_unlock(reald); - prepare_for_call_2(); + prepare_for_call_2(); raw_ffunc_rr(func, reald, s); - live.fat[reald].holds = d; - live.fat[reald].nholds = 1; + live.fat[reald].holds = d; + live.fat[reald].nholds = 1; - live.fate[d].realreg = reald; - live.fate[d].status = DIRTY; + live.fate[d].realreg = reald; + live.fate[d].status = DIRTY; } MENDFUNC(3,ffunc_rr,(double (*func)(double), FW d, FR s)) MIDFUNC(3,fpowx_rr,(uae_u32 x, FW d, FR s)) { - clobber_flags(); + clobber_flags(); s = f_readreg(s); int reald = f_writereg(d); - prepare_for_call_1(); + prepare_for_call_1(); f_unlock(s); f_unlock(reald); - prepare_for_call_2(); + prepare_for_call_2(); raw_fpowx_rr(x, reald, s); - live.fat[reald].holds = d; - live.fat[reald].nholds = 1; + live.fat[reald].holds = d; + live.fat[reald].nholds = 1; - live.fate[d].realreg = reald; - live.fate[d].status = DIRTY; + live.fate[d].realreg = reald; + live.fate[d].status = DIRTY; } MENDFUNC(3,fpowx_rr,(uae_u32 x, FW d, FR s)) @@ -1061,11 +1064,11 @@ MENDFUNC(1,fflags_into_flags,()) MIDFUNC(2,fp_from_exten_mr,(RR4 adr, FR s)) { - clobber_flags(); + clobber_flags(); adr = readreg(adr); s = f_readreg(s); - raw_fp_from_exten_mr(adr, s); + raw_fp_from_exten_mr(adr, s); f_unlock(s); unlock2(adr); } @@ -1073,11 +1076,11 @@ MENDFUNC(2,fp_from_exten_mr,(RR4 adr, FR s)) MIDFUNC(2,fp_to_exten_rm,(FW d, RR4 adr)) { - clobber_flags(); + clobber_flags(); adr = readreg(adr); d = f_writereg(d); - raw_fp_to_exten_rm(d, adr); + raw_fp_to_exten_rm(d, adr); unlock2(adr); f_unlock(d); } @@ -1087,7 +1090,7 @@ MIDFUNC(2,fp_from_double_mr,(RR4 adr, FR s)) { adr = readreg(adr); s = f_readreg(s); - raw_fp_from_double_mr(adr, s); + raw_fp_from_double_mr(adr, s); f_unlock(s); unlock2(adr); } @@ -1097,7 +1100,7 @@ MIDFUNC(2,fp_to_double_rm,(FW d, RR4 adr)) { adr = readreg(adr); d = f_writereg(d); - raw_fp_to_double_rm(d, adr); + raw_fp_to_double_rm(d, adr); unlock2(adr); f_unlock(d); } diff --git a/src/jit/compemu_midfunc_armA64_2.cpp b/src/jit/arm/compemu_midfunc_arm64_2.cpp similarity index 62% rename from src/jit/compemu_midfunc_armA64_2.cpp rename to src/jit/arm/compemu_midfunc_arm64_2.cpp index 520d86f16..a6309e1da 100644 --- a/src/jit/compemu_midfunc_armA64_2.cpp +++ b/src/jit/arm/compemu_midfunc_arm64_2.cpp @@ -32,20 +32,20 @@ */ const uae_u32 ARM_CCR_MAP[] = { 0, ARM_C_FLAG, // 1 C - ARM_V_FLAG, // 2 V - ARM_C_FLAG | ARM_V_FLAG, // 3 VC - ARM_Z_FLAG, // 4 Z - ARM_Z_FLAG | ARM_C_FLAG, // 5 ZC - ARM_Z_FLAG | ARM_V_FLAG, // 6 ZV - ARM_Z_FLAG | ARM_C_FLAG | ARM_V_FLAG, // 7 ZVC - ARM_N_FLAG, // 8 N - ARM_N_FLAG | ARM_C_FLAG, // 9 NC - ARM_N_FLAG | ARM_V_FLAG, // 10 NV - ARM_N_FLAG | ARM_C_FLAG | ARM_V_FLAG, // 11 NVC - ARM_N_FLAG | ARM_Z_FLAG, // 12 NZ - ARM_N_FLAG | ARM_Z_FLAG | ARM_C_FLAG, // 13 NZC - ARM_N_FLAG | ARM_Z_FLAG | ARM_V_FLAG, // 14 NZV - ARM_N_FLAG | ARM_Z_FLAG | ARM_C_FLAG | ARM_V_FLAG, // 15 NZVC + ARM_V_FLAG, // 2 V + ARM_C_FLAG | ARM_V_FLAG, // 3 VC + ARM_Z_FLAG, // 4 Z + ARM_Z_FLAG | ARM_C_FLAG, // 5 ZC + ARM_Z_FLAG | ARM_V_FLAG, // 6 ZV + ARM_Z_FLAG | ARM_C_FLAG | ARM_V_FLAG, // 7 ZVC + ARM_N_FLAG, // 8 N + ARM_N_FLAG | ARM_C_FLAG, // 9 NC + ARM_N_FLAG | ARM_V_FLAG, // 10 NV + ARM_N_FLAG | ARM_C_FLAG | ARM_V_FLAG, // 11 NVC + ARM_N_FLAG | ARM_Z_FLAG, // 12 NZ + ARM_N_FLAG | ARM_Z_FLAG | ARM_C_FLAG, // 13 NZC + ARM_N_FLAG | ARM_Z_FLAG | ARM_V_FLAG, // 14 NZV + ARM_N_FLAG | ARM_Z_FLAG | ARM_C_FLAG | ARM_V_FLAG, // 15 NZVC }; @@ -82,7 +82,7 @@ MIDFUNC(3,jnf_ADD_im8,(W4 d, RR4 s, IM8 v)) s = readreg(s); d = writereg(d); } - + ADD_wwi(d, s, v & 0xff); EXIT_REGS(d, s); @@ -92,17 +92,17 @@ MENDFUNC(3,jnf_ADD_im8,(W4 d, RR4 s, IM8 v)) MIDFUNC(2,jnf_ADD_b_imm,(RW1 d, IM8 v)) { if (isconst(d)) { - live.state[d].val = (live.state[d].val & 0xffffff00) | ((live.state[d].val + v) & 0x000000ff); - return; - } + live.state[d].val = (live.state[d].val & 0xffffff00) | ((live.state[d].val + v) & 0x000000ff); + return; + } INIT_REG_b(d); - + if(targetIsReg) { - ADD_wwi(REG_WORK1, d, v & 0xff); - BFI_xxii(d, REG_WORK1, 0, 8); + ADD_wwi(REG_WORK1, d, v & 0xff); + BFI_xxii(d, REG_WORK1, 0, 8); } else { - ADD_wwi(d, d, v & 0xff); + ADD_wwi(d, d, v & 0xff); } unlock2(d); @@ -117,10 +117,10 @@ MIDFUNC(2,jnf_ADD_b,(RW1 d, RR1 s)) } INIT_REGS_b(d, s); - + if(targetIsReg) { ADD_www(REG_WORK1, d, s); - BFI_xxii(d, REG_WORK1, 0, 8); + BFI_xxii(d, REG_WORK1, 0, 8); } else { ADD_www(d, d, s); } @@ -134,22 +134,22 @@ MIDFUNC(2,jnf_ADD_w_imm,(RW2 d, IM16 v)) INIT_REG_w(d); if(targetIsReg) { - if(v >= 0 && v <= 0xfff) { - ADD_wwi(REG_WORK1, d, v); - } else { - MOV_xi(REG_WORK1, v & 0xffff); - ADD_www(REG_WORK1, d, REG_WORK1); - } - BFI_xxii(d, REG_WORK1, 0, 16); + if(v >= 0 && v <= 0xfff) { + ADD_wwi(REG_WORK1, d, v); + } else { + MOV_xi(REG_WORK1, v & 0xffff); + ADD_www(REG_WORK1, d, REG_WORK1); + } + BFI_xxii(d, REG_WORK1, 0, 16); } else{ - if(v >= 0 && v <= 0xfff) { - ADD_wwi(d, d, v); - } else { - MOV_xi(REG_WORK1, v & 0xffff); - ADD_www(d, d, REG_WORK1); - } + if(v >= 0 && v <= 0xfff) { + ADD_wwi(d, d, v); + } else { + MOV_xi(REG_WORK1, v & 0xffff); + ADD_www(d, d, REG_WORK1); + } } - + unlock2(d); } MENDFUNC(2,jnf_ADD_w_imm,(RW2 d, IM16 v)) @@ -165,11 +165,11 @@ MIDFUNC(2,jnf_ADD_w,(RW2 d, RR2 s)) if(targetIsReg) { ADD_www(REG_WORK1, d, s); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); } else { ADD_www(d, d, s); } - + EXIT_REGS(d, s); } MENDFUNC(2,jnf_ADD_w,(RW2 d, RR2 s)) @@ -183,13 +183,13 @@ MIDFUNC(2,jnf_ADD_l_imm,(RW4 d, IM32 v)) d = rmw(d); - if(v >= 0 && v <= 0xfff) { - ADD_wwi(d, d, v); - } else { - // never reached... - LOAD_U32(REG_WORK1, v); - ADD_www(d, d, REG_WORK1); - } + if(v >= 0 && v <= 0xfff) { + ADD_wwi(d, d, v); + } else { + // never reached... + LOAD_U32(REG_WORK1, v); + ADD_www(d, d, REG_WORK1); + } unlock2(d); } @@ -217,13 +217,13 @@ MENDFUNC(2,jnf_ADD_l,(RW4 d, RR4 s)) MIDFUNC(2,jff_ADD_b_imm,(RW1 d, IM8 v)) { INIT_REG_b(d); - + MOV_xish(REG_WORK2, (v & 0xff) << 8, 16); - ADDS_wwwLSLi(REG_WORK1, REG_WORK2, d, 24); - BFXIL_xxii(d, REG_WORK1, 24, 8); - - flags_carry_inverted = false; - DUPLICACTE_CARRY + ADDS_wwwLSLi(REG_WORK1, REG_WORK2, d, 24); + BFXIL_xxii(d, REG_WORK1, 24, 8); + + flags_carry_inverted = false; + DUPLICACTE_CARRY unlock2(d); } @@ -239,11 +239,11 @@ MIDFUNC(2,jff_ADD_b,(RW1 d, RR1 s)) INIT_REGS_b(d, s); LSL_wwi(REG_WORK2, s, 24); - ADDS_wwwLSLi(REG_WORK1, REG_WORK2, d, 24); - BFXIL_xxii(d, REG_WORK1, 24, 8); - - flags_carry_inverted = false; - DUPLICACTE_CARRY + ADDS_wwwLSLi(REG_WORK1, REG_WORK2, d, 24); + BFXIL_xxii(d, REG_WORK1, 24, 8); + + flags_carry_inverted = false; + DUPLICACTE_CARRY EXIT_REGS(d, s); } @@ -254,11 +254,11 @@ MIDFUNC(2,jff_ADD_w_imm,(RW2 d, IM16 v)) INIT_REG_w(d); MOV_xish(REG_WORK1, v & 0xffff, 16); - ADDS_wwwLSLi(REG_WORK1, REG_WORK1, d, 16); - BFXIL_xxii(d, REG_WORK1, 16, 16); - - flags_carry_inverted = false; - DUPLICACTE_CARRY + ADDS_wwwLSLi(REG_WORK1, REG_WORK1, d, 16); + BFXIL_xxii(d, REG_WORK1, 16, 16); + + flags_carry_inverted = false; + DUPLICACTE_CARRY unlock2(d); } @@ -274,11 +274,11 @@ MIDFUNC(2,jff_ADD_w,(RW2 d, RR2 s)) INIT_REGS_w(d, s); LSL_wwi(REG_WORK1, s, 16); - ADDS_wwwLSLi(REG_WORK1, REG_WORK1, d, 16); - BFXIL_xxii(d, REG_WORK1, 16, 16); + ADDS_wwwLSLi(REG_WORK1, REG_WORK1, d, 16); + BFXIL_xxii(d, REG_WORK1, 16, 16); - flags_carry_inverted = false; - DUPLICACTE_CARRY + flags_carry_inverted = false; + DUPLICACTE_CARRY EXIT_REGS(d, s); } @@ -288,16 +288,16 @@ MIDFUNC(2,jff_ADD_l_imm,(RW4 d, IM32 v)) { d = rmw(d); - if(v >= 0 && v <= 0xfff) { - ADDS_wwi(d, d, v); - } else { - // never reached... - LOAD_U32(REG_WORK2, v); - ADDS_www(d, d, REG_WORK2); - } + if(v >= 0 && v <= 0xfff) { + ADDS_wwi(d, d, v); + } else { + // never reached... + LOAD_U32(REG_WORK2, v); + ADDS_www(d, d, REG_WORK2); + } - flags_carry_inverted = false; - DUPLICACTE_CARRY + flags_carry_inverted = false; + DUPLICACTE_CARRY unlock2(d); } @@ -314,8 +314,8 @@ MIDFUNC(2,jff_ADD_l,(RW4 d, RR4 s)) ADDS_www(d, d, s); - flags_carry_inverted = false; - DUPLICACTE_CARRY + flags_carry_inverted = false; + DUPLICACTE_CARRY EXIT_REGS(d, s); } @@ -337,15 +337,15 @@ MIDFUNC(2,jnf_ADDA_w_imm,(RW4 d, IM16 v)) return; } - uae_s16 tmp = (uae_s16)v; + uae_s16 tmp = (uae_s16)v; d = rmw(d); if(tmp >= 0 && tmp <= 0xfff) { - ADD_wwi(d, d, tmp); - } else if (tmp >= -0xfff && tmp < 0) { - SUB_wwi(d, d, -tmp); + ADD_wwi(d, d, tmp); + } else if (tmp >= -0xfff && tmp < 0) { + SUB_wwi(d, d, -tmp); } else { - SIGNED16_IMM_2_REG(REG_WORK1, tmp); - ADD_www(d, d, REG_WORK1); + SIGNED16_IMM_2_REG(REG_WORK1, tmp); + ADD_www(d, d, REG_WORK1); } unlock2(d); } @@ -376,13 +376,13 @@ MIDFUNC(2,jnf_ADDA_l_imm,(RW4 d, IM32 v)) d = rmw(d); if(v >= 0 && v <= 0xfff) { - ADD_wwi(d, d, v); - } else if (v >= -0xfff && v < 0) { - SUB_wwi(d, d, -v); + ADD_wwi(d, d, v); + } else if (v >= -0xfff && v < 0) { + SUB_wwi(d, d, -v); } else { - LOAD_U32(REG_WORK1, v); - ADD_www(d, d, REG_WORK1); - } + LOAD_U32(REG_WORK1, v); + ADD_www(d, d, REG_WORK1); + } unlock2(d); } @@ -421,7 +421,7 @@ MENDFUNC(2,jnf_ADDA_l,(RW4 d, RR4 s)) */ MIDFUNC(2,jnf_ADDX_b,(RW1 d, RR1 s)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_b(d, s); @@ -429,9 +429,9 @@ MIDFUNC(2,jnf_ADDX_b,(RW1 d, RR1 s)) ADD_wwwLSLi(REG_WORK1, x, d, 1); } else { ADD_www(REG_WORK1, d, s); - ADD_www(REG_WORK1, REG_WORK1, x); + ADD_www(REG_WORK1, REG_WORK1, x); } - BFI_xxii(d, REG_WORK1, 0, 8); + BFI_xxii(d, REG_WORK1, 0, 8); EXIT_REGS(d, s); unlock2(x); @@ -440,7 +440,7 @@ MENDFUNC(2,jnf_ADDX_b,(RW1 d, RR1 s)) MIDFUNC(2,jnf_ADDX_w,(RW2 d, RR2 s)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_w(d, s); @@ -448,9 +448,9 @@ MIDFUNC(2,jnf_ADDX_w,(RW2 d, RR2 s)) ADD_wwwLSLi(REG_WORK1, x, d, 1); } else { ADD_www(REG_WORK1, d, s); - ADD_www(REG_WORK1, REG_WORK1, x); + ADD_www(REG_WORK1, REG_WORK1, x); } - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); EXIT_REGS(d, s); unlock2(x); @@ -459,24 +459,24 @@ MENDFUNC(2,jnf_ADDX_w,(RW2 d, RR2 s)) MIDFUNC(2,jnf_ADDX_l,(RW4 d, RR4 s)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); - if(s != d && isconst(s) && live.state[s].val >= 0 && live.state[s].val <= 0xfff) { - d = rmw(d); - ADD_wwi(d, d, live.state[s].val); - ADD_www(d, d, x); - unlock2(d); - unlock2(x); - return; - } + if(s != d && isconst(s) && live.state[s].val >= 0 && live.state[s].val <= 0xfff) { + d = rmw(d); + ADD_wwi(d, d, live.state[s].val); + ADD_www(d, d, x); + unlock2(d); + unlock2(x); + return; + } INIT_REGS_l(d, s); if(s_is_d) { - ADD_wwwLSLi(d, x, d, 1); + ADD_wwwLSLi(d, x, d, 1); } else { - ADD_www(d, d, s); - ADD_www(d, d, x); + ADD_www(d, d, s); + ADD_www(d, d, x); } EXIT_REGS(d, s); @@ -487,7 +487,7 @@ MENDFUNC(2,jnf_ADDX_l,(RW4 d, RR4 s)) MIDFUNC(2,jff_ADDX_b,(RW1 d, RR1 s)) { INIT_REGS_b(d, s); - int x = rmw(FLAGX); + int x = rmw(FLAGX); MOVN_xi(REG_WORK1, 0); MOVN_xish(REG_WORK2, 0x4000, 16); // inverse Z flag @@ -498,16 +498,16 @@ MIDFUNC(2,jff_ADDX_b,(RW1 d, RR1 s)) BFI_xxii(REG_WORK1, s, 24, 8); LSL_wwi(REG_WORK3, d, 24); - ADCS_www(REG_WORK1, REG_WORK1, REG_WORK3); - BFXIL_xxii(d, REG_WORK1, 24, 8); + ADCS_www(REG_WORK1, REG_WORK1, REG_WORK3); + BFXIL_xxii(d, REG_WORK1, 24, 8); MRS_NZCV_x(REG_WORK1); AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - if (needed_flags & FLAG_X) - UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry + if (needed_flags & FLAG_X) + UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(x); EXIT_REGS(d, s); } @@ -516,7 +516,7 @@ MENDFUNC(2,jff_ADDX_b,(RW1 d, RR1 s)) MIDFUNC(2,jff_ADDX_w,(RW2 d, RR2 s)) { INIT_REGS_w(d, s); - int x = rmw(FLAGX); + int x = rmw(FLAGX); MOVN_xi(REG_WORK1, 0); MOVN_xish(REG_WORK2, 0x4000, 16); // inverse Z flag @@ -527,16 +527,16 @@ MIDFUNC(2,jff_ADDX_w,(RW2 d, RR2 s)) BFI_xxii(REG_WORK1, s, 16, 16); LSL_wwi(REG_WORK3, d, 16); - ADCS_www(REG_WORK1, REG_WORK1, REG_WORK3); - BFXIL_xxii(d, REG_WORK1, 16, 16); + ADCS_www(REG_WORK1, REG_WORK1, REG_WORK3); + BFXIL_xxii(d, REG_WORK1, 16, 16); MRS_NZCV_x(REG_WORK1); AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); if (needed_flags & FLAG_X) - UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry + UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(x); EXIT_REGS(d, s); } @@ -545,7 +545,7 @@ MENDFUNC(2,jff_ADDX_w,(RW2 d, RR2 s)) MIDFUNC(2,jff_ADDX_l,(W4 d, RR4 s)) { INIT_REGS_l(d, s); - int x = rmw(FLAGX); + int x = rmw(FLAGX); MOVN_xi(REG_WORK1, 0); MOVN_xish(REG_WORK2, 0x4000, 16); // inverse Z flag @@ -559,10 +559,10 @@ MIDFUNC(2,jff_ADDX_l,(W4 d, RR4 s)) MRS_NZCV_x(REG_WORK1); AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); if (needed_flags & FLAG_X) - UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry + UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(x); EXIT_REGS(d, s); } @@ -584,10 +584,10 @@ MENDFUNC(2,jff_ADDX_l,(W4 d, RR4 s)) MIDFUNC(2,jff_ANDSR,(IM32 s, IM8 x)) { MRS_NZCV_x(REG_WORK1); - if(flags_carry_inverted) { - EOR_xxCflag(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; - } + if(flags_carry_inverted) { + EOR_xxCflag(REG_WORK1, REG_WORK1); + flags_carry_inverted = false; + } MOV_xish(REG_WORK2, (s >> 16), 16); AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); MSR_NZCV_x(REG_WORK1); @@ -653,14 +653,14 @@ MENDFUNC(2,jnf_AND_b,(RW1 d, RR1 s)) MIDFUNC(2,jnf_AND_w_imm,(RW2 d, IM16 v)) { if (isconst(d)) { - live.state[d].val = (live.state[d].val & 0xffff0000) | ((live.state[d].val & v) & 0x0000ffff); - return; - } + live.state[d].val = (live.state[d].val & 0xffff0000) | ((live.state[d].val & v) & 0x0000ffff); + return; + } INIT_REG_w(d); - MOVN_xi(REG_WORK1, (~v)); - AND_www(d, d, REG_WORK1); + MOVN_xi(REG_WORK1, (~v)); + AND_www(d, d, REG_WORK1); unlock2(d); } @@ -677,7 +677,7 @@ MIDFUNC(2,jnf_AND_w,(RW2 d, RR2 s)) if(targetIsReg) { AND_www(REG_WORK1, d, s); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); } else { AND_www(d, d, s); } @@ -688,14 +688,14 @@ MENDFUNC(2,jnf_AND_w,(RW2 d, RR2 s)) MIDFUNC(2,jnf_AND_l_imm,(RW4 d, IM32 v)) { - if(isconst(d)) { - live.state[d].val = live.state[d].val & v; - return; - } - + if(isconst(d)) { + live.state[d].val = live.state[d].val & v; + return; + } + d = rmw(d); - LOAD_U32(REG_WORK1, v); + LOAD_U32(REG_WORK1, v); AND_www(d, d, REG_WORK1); unlock2(d); @@ -730,7 +730,7 @@ MIDFUNC(2,jff_AND_b_imm,(RW1 d, IM8 v)) ANDS_www(d, REG_WORK1, REG_WORK2); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_AND_b_imm,(RW1 d, IM8 v)) @@ -753,7 +753,7 @@ MIDFUNC(2,jff_AND_b,(RW1 d, RR1 s)) ANDS_www(d, REG_WORK1, REG_WORK2); } - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_AND_b,(RW1 d, RR1 s)) @@ -771,7 +771,7 @@ MIDFUNC(2,jff_AND_w_imm,(RW2 d, IM16 v)) ANDS_www(d, REG_WORK1, REG_WORK2); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_AND_w_imm,(RW2 d, IM16 v)) @@ -794,7 +794,7 @@ MIDFUNC(2,jff_AND_w,(RW2 d, RR2 s)) ANDS_www(d, REG_WORK1, REG_WORK2); } - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_AND_w,(RW2 d, RR2 s)) @@ -803,10 +803,10 @@ MIDFUNC(2,jff_AND_l_imm,(RW4 d, IM32 v)) { d = rmw(d); - LOAD_U32(REG_WORK1, v); + LOAD_U32(REG_WORK1, v); ANDS_www(d, d, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_AND_l_imm,(RW4 d, IM32 v)) @@ -822,7 +822,7 @@ MIDFUNC(2,jff_AND_l,(RW4 d, RR4 s)) ANDS_www(d, d, s); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_AND_l,(RW4 d, RR4 s)) @@ -850,39 +850,39 @@ MIDFUNC(2,jff_ASL_b_imm,(RW1 d, IM8 i)) d = rmw(d); else d = readreg(d); - + LSL_wwi(REG_WORK3, d, 24); if (i) { - LSL_xxi(REG_WORK2, REG_WORK3, i); - BFXIL_xxii(d, REG_WORK2, 24, 8); // result is ready - TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared - - if (needed_flags & FLAG_V) { - // Calculate C Flag - MRS_NZCV_x(REG_WORK4); - TBZ_xii(REG_WORK2, 32, 2); - SET_xxCflag(REG_WORK4, REG_WORK4); - - // Calculate V Flag - CLS_ww(REG_WORK1, REG_WORK3); - CMP_wi(REG_WORK1, i); - BGE_i(2); - SET_xxVflag(REG_WORK4, REG_WORK4); - - MSR_NZCV_x(REG_WORK4); - } else { - // Calculate C Flag - TBZ_xii(REG_WORK2, 32, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - - flags_carry_inverted = false; + LSL_xxi(REG_WORK2, REG_WORK3, i); + BFXIL_xxii(d, REG_WORK2, 24, 8); // result is ready + TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared + + if (needed_flags & FLAG_V) { + // Calculate C Flag + MRS_NZCV_x(REG_WORK4); + TBZ_xii(REG_WORK2, 32, 2); + SET_xxCflag(REG_WORK4, REG_WORK4); + + // Calculate V Flag + CLS_ww(REG_WORK1, REG_WORK3); + CMP_wi(REG_WORK1, i); + BGE_i(2); + SET_xxVflag(REG_WORK4, REG_WORK4); + + MSR_NZCV_x(REG_WORK4); + } else { + // Calculate C Flag + TBZ_xii(REG_WORK2, 32, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + + flags_carry_inverted = false; DUPLICACTE_CARRY } else { TST_ww(REG_WORK3, REG_WORK3); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -895,39 +895,39 @@ MIDFUNC(2,jff_ASL_w_imm,(RW2 d, IM8 i)) d = rmw(d); else d = readreg(d); - + LSL_wwi(REG_WORK3, d, 16); if (i) { - LSL_xxi(REG_WORK2, REG_WORK3, i); - BFXIL_xxii(d, REG_WORK2, 16, 16); // result is ready - TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared - - if (needed_flags & FLAG_V) { - // Calculate C Flag - MRS_NZCV_x(REG_WORK4); - TBZ_xii(REG_WORK2, 32, 2); - SET_xxCflag(REG_WORK4, REG_WORK4); - - // Calculate V Flag - CLS_ww(REG_WORK1, REG_WORK3); - CMP_wi(REG_WORK1, i); - BGE_i(2); - SET_xxVflag(REG_WORK4, REG_WORK4); - - MSR_NZCV_x(REG_WORK4); - } else { - // Calculate C Flag - TBZ_xii(REG_WORK2, 32, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - - flags_carry_inverted = false; + LSL_xxi(REG_WORK2, REG_WORK3, i); + BFXIL_xxii(d, REG_WORK2, 16, 16); // result is ready + TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared + + if (needed_flags & FLAG_V) { + // Calculate C Flag + MRS_NZCV_x(REG_WORK4); + TBZ_xii(REG_WORK2, 32, 2); + SET_xxCflag(REG_WORK4, REG_WORK4); + + // Calculate V Flag + CLS_ww(REG_WORK1, REG_WORK3); + CMP_wi(REG_WORK1, i); + BGE_i(2); + SET_xxVflag(REG_WORK4, REG_WORK4); + + MSR_NZCV_x(REG_WORK4); + } else { + // Calculate C Flag + TBZ_xii(REG_WORK2, 32, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + + flags_carry_inverted = false; DUPLICACTE_CARRY } else { TST_ww(REG_WORK3, REG_WORK3); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -942,37 +942,37 @@ MIDFUNC(2,jff_ASL_l_imm,(RW4 d, IM8 i)) d = readreg(d); if (i) { - if (needed_flags & FLAG_V) - MOV_ww(REG_WORK3, d); - LSL_xxi(d, d, i); - TST_ww(d, d); // NZ correct, VC cleared - - if (needed_flags & FLAG_V) { - // Calculate C Flag - MRS_NZCV_x(REG_WORK4); - TBZ_xii(d, 32, 2); - SET_xxCflag(REG_WORK4, REG_WORK4); - - // Calculate V Flag - CLS_ww(REG_WORK1, REG_WORK3); - CMP_wi(REG_WORK1, i); - BGE_i(2); - SET_xxVflag(REG_WORK4, REG_WORK4); - - MSR_NZCV_x(REG_WORK4); - } else { - // Calculate C Flag - TBZ_xii(d, 32, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - - flags_carry_inverted = false; + if (needed_flags & FLAG_V) + MOV_ww(REG_WORK3, d); + LSL_xxi(d, d, i); + TST_ww(d, d); // NZ correct, VC cleared + + if (needed_flags & FLAG_V) { + // Calculate C Flag + MRS_NZCV_x(REG_WORK4); + TBZ_xii(d, 32, 2); + SET_xxCflag(REG_WORK4, REG_WORK4); + + // Calculate V Flag + CLS_ww(REG_WORK1, REG_WORK3); + CMP_wi(REG_WORK1, i); + BGE_i(2); + SET_xxVflag(REG_WORK4, REG_WORK4); + + MSR_NZCV_x(REG_WORK4); + } else { + // Calculate C Flag + TBZ_xii(d, 32, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + + flags_carry_inverted = false; DUPLICACTE_CARRY } else { TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -983,50 +983,50 @@ MIDFUNC(2,jff_ASL_b_reg,(RW1 d, RR4 i)) { i = readreg(i); d = rmw(d); - int x = writereg(FLAGX); - + int x = writereg(FLAGX); + LSL_wwi(REG_WORK3, d, 24); ANDS_ww3f(REG_WORK1, i); - BNE_i(3); - - // shift count is 0 - TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // - - // shift count > 0 - LSL_xxx(REG_WORK2, REG_WORK3, REG_WORK1); - BFXIL_xxii(d, REG_WORK2, 24, 8); // result is ready - TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared - - if (needed_flags & FLAG_V) { - // Calculate C Flag - MRS_NZCV_x(REG_WORK4); - TBZ_xii(REG_WORK2, 32, 2); - SET_xxCflag(REG_WORK4, REG_WORK4); - - // Calculate V Flag - CLS_ww(REG_WORK2, REG_WORK3); - CMP_ww(REG_WORK2, REG_WORK1); - BGE_i(2); - SET_xxVflag(REG_WORK4, REG_WORK4); - - MSR_NZCV_x(REG_WORK4); - } else { - // Calculate C Flag - TBZ_xii(REG_WORK2, 32, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - - flags_carry_inverted = false; + BNE_i(3); + + // shift count is 0 + TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // + + // shift count > 0 + LSL_xxx(REG_WORK2, REG_WORK3, REG_WORK1); + BFXIL_xxii(d, REG_WORK2, 24, 8); // result is ready + TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared + + if (needed_flags & FLAG_V) { + // Calculate C Flag + MRS_NZCV_x(REG_WORK4); + TBZ_xii(REG_WORK2, 32, 2); + SET_xxCflag(REG_WORK4, REG_WORK4); + + // Calculate V Flag + CLS_ww(REG_WORK2, REG_WORK3); + CMP_ww(REG_WORK2, REG_WORK1); + BGE_i(2); + SET_xxVflag(REG_WORK4, REG_WORK4); + + MSR_NZCV_x(REG_WORK4); + } else { + // Calculate C Flag + TBZ_xii(REG_WORK2, 32, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + + flags_carry_inverted = false; DUPLICACTE_CARRY - - // - write_jmp_target(branchadd, (uintptr)get_target()); - - unlock2(x); + + // + write_jmp_target(branchadd, (uintptr)get_target()); + + unlock2(x); unlock2(d); unlock2(i); } @@ -1034,57 +1034,57 @@ MENDFUNC(2,jff_ASL_b_reg,(RW1 d, RR4 i)) MIDFUNC(2,jff_ASL_w_reg,(RW2 d, RR4 i)) { - if(isconst(i)) { - COMPCALL(jff_ASL_w_imm)(d, live.state[i].val & 0x3f); - return; - } - + if(isconst(i)) { + COMPCALL(jff_ASL_w_imm)(d, live.state[i].val & 0x3f); + return; + } + i = readreg(i); d = rmw(d); - int x = writereg(FLAGX); + int x = writereg(FLAGX); LSL_wwi(REG_WORK3, d, 16); ANDS_ww3f(REG_WORK1, i); - BNE_i(3); - - // shift count is 0 - TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // - - // shift count > 0 - LSL_xxx(REG_WORK2, REG_WORK3, REG_WORK1); - BFXIL_xxii(d, REG_WORK2, 16, 16); // result is ready - TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared - - if (needed_flags & FLAG_V) { - // Calculate C Flag - MRS_NZCV_x(REG_WORK4); - TBZ_xii(REG_WORK2, 32, 2); - SET_xxCflag(REG_WORK4, REG_WORK4); - - // Calculate V Flag - CLS_ww(REG_WORK2, REG_WORK3); - CMP_ww(REG_WORK2, REG_WORK1); - BGE_i(2); - SET_xxVflag(REG_WORK4, REG_WORK4); - - MSR_NZCV_x(REG_WORK4); - } else { - // Calculate C Flag - TBZ_xii(REG_WORK2, 32, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - - flags_carry_inverted = false; + BNE_i(3); + + // shift count is 0 + TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // + + // shift count > 0 + LSL_xxx(REG_WORK2, REG_WORK3, REG_WORK1); + BFXIL_xxii(d, REG_WORK2, 16, 16); // result is ready + TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared + + if (needed_flags & FLAG_V) { + // Calculate C Flag + MRS_NZCV_x(REG_WORK4); + TBZ_xii(REG_WORK2, 32, 2); + SET_xxCflag(REG_WORK4, REG_WORK4); + + // Calculate V Flag + CLS_ww(REG_WORK2, REG_WORK3); + CMP_ww(REG_WORK2, REG_WORK1); + BGE_i(2); + SET_xxVflag(REG_WORK4, REG_WORK4); + + MSR_NZCV_x(REG_WORK4); + } else { + // Calculate C Flag + TBZ_xii(REG_WORK2, 32, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + + flags_carry_inverted = false; DUPLICACTE_CARRY - - // - write_jmp_target(branchadd, (uintptr)get_target()); - unlock2(x); + // + write_jmp_target(branchadd, (uintptr)get_target()); + + unlock2(x); unlock2(d); unlock2(i); } @@ -1092,57 +1092,57 @@ MENDFUNC(2,jff_ASL_w_reg,(RW4 d, RR4 i)) MIDFUNC(2,jff_ASL_l_reg,(RW4 d, RR4 i)) { - if(isconst(i)) { - COMPCALL(jff_ASL_l_imm)(d, live.state[i].val & 0x3f); - return; - } - + if(isconst(i)) { + COMPCALL(jff_ASL_l_imm)(d, live.state[i].val & 0x3f); + return; + } + i = readreg(i); d = rmw(d); - int x = writereg(FLAGX); + int x = writereg(FLAGX); ANDS_ww3f(REG_WORK1, i); - BNE_i(3); - - // shift count is 0 - TST_ww(d, d); // NZ correct, VC cleared - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // - - // shift count > 0 - if (needed_flags & FLAG_V) - MOV_ww(REG_WORK3, d); - LSL_xxx(d, d, REG_WORK1); - TST_ww(d, d); // NZ correct, VC cleared - - if (needed_flags & FLAG_V) { - // Calculate C Flag - MRS_NZCV_x(REG_WORK4); - TBZ_xii(d, 32, 2); - SET_xxCflag(REG_WORK4, REG_WORK4); - - // Calculate V Flag - CLS_ww(REG_WORK2, REG_WORK3); - CMP_ww(REG_WORK2, REG_WORK1); - BGE_i(2); - SET_xxVflag(REG_WORK4, REG_WORK4); - - MSR_NZCV_x(REG_WORK4); - } else { - // Calculate C Flag - TBZ_xii(d, 32, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - - flags_carry_inverted = false; + BNE_i(3); + + // shift count is 0 + TST_ww(d, d); // NZ correct, VC cleared + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // + + // shift count > 0 + if (needed_flags & FLAG_V) + MOV_ww(REG_WORK3, d); + LSL_xxx(d, d, REG_WORK1); + TST_ww(d, d); // NZ correct, VC cleared + + if (needed_flags & FLAG_V) { + // Calculate C Flag + MRS_NZCV_x(REG_WORK4); + TBZ_xii(d, 32, 2); + SET_xxCflag(REG_WORK4, REG_WORK4); + + // Calculate V Flag + CLS_ww(REG_WORK2, REG_WORK3); + CMP_ww(REG_WORK2, REG_WORK1); + BGE_i(2); + SET_xxVflag(REG_WORK4, REG_WORK4); + + MSR_NZCV_x(REG_WORK4); + } else { + // Calculate C Flag + TBZ_xii(d, 32, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + + flags_carry_inverted = false; DUPLICACTE_CARRY - - // - write_jmp_target(branchadd, (uintptr)get_target()); - unlock2(x); + // + write_jmp_target(branchadd, (uintptr)get_target()); + + unlock2(x); unlock2(d); unlock2(i); } @@ -1176,31 +1176,31 @@ MIDFUNC(1,jff_ASLW,(RW2 d)) { d = rmw(d); - LSL_wwi(REG_WORK1, d, 17); - TST_ww(REG_WORK1, REG_WORK1); - - if (needed_flags & FLAG_V) { - // Calculate C flag - MRS_NZCV_x(REG_WORK4); - TBZ_wii(d, 15, 2); - SET_xxCflag(REG_WORK4, REG_WORK4); - - // Calculate V flag - EOR_wwwLSLi(REG_WORK1, d, d, 1); // eor bit15 and bit14 of source - TBZ_wii(REG_WORK1, 15, 2); - SET_xxVflag(REG_WORK4, REG_WORK4); - - MSR_NZCV_x(REG_WORK4); - } else { - // Calculate C flag - TBZ_wii(d, 15, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - LSL_wwi(d, d, 1); + LSL_wwi(REG_WORK1, d, 17); + TST_ww(REG_WORK1, REG_WORK1); + + if (needed_flags & FLAG_V) { + // Calculate C flag + MRS_NZCV_x(REG_WORK4); + TBZ_wii(d, 15, 2); + SET_xxCflag(REG_WORK4, REG_WORK4); - flags_carry_inverted = false; + // Calculate V flag + EOR_wwwLSLi(REG_WORK1, d, d, 1); // eor bit15 and bit14 of source + TBZ_wii(REG_WORK1, 15, 2); + SET_xxVflag(REG_WORK4, REG_WORK4); + + MSR_NZCV_x(REG_WORK4); + } else { + // Calculate C flag + TBZ_wii(d, 15, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + LSL_wwi(d, d, 1); + + flags_carry_inverted = false; DUPLICACTE_CARRY unlock2(d); @@ -1228,10 +1228,10 @@ MIDFUNC(2,jnf_ASR_b_imm,(RW1 d, IM8 i)) d = rmw(d); SIGNED8_REG_2_REG(REG_WORK1, d); - if(i > 31) - i = 31; - ASR_wwi(REG_WORK1, REG_WORK1, i); - BFI_xxii(d, REG_WORK1, 0, 8); + if(i > 31) + i = 31; + ASR_wwi(REG_WORK1, REG_WORK1, i); + BFI_xxii(d, REG_WORK1, 0, 8); unlock2(d); } @@ -1244,10 +1244,10 @@ MIDFUNC(2,jnf_ASR_w_imm,(RW2 d, IM8 i)) d = rmw(d); SIGNED16_REG_2_REG(REG_WORK1, d); - if(i > 31) - i = 31; - ASR_wwi(REG_WORK1, REG_WORK1, i); - BFI_xxii(d, REG_WORK1, 0, 16); + if(i > 31) + i = 31; + ASR_wwi(REG_WORK1, REG_WORK1, i); + BFI_xxii(d, REG_WORK1, 0, 16); unlock2(d); } @@ -1259,9 +1259,9 @@ MIDFUNC(2,jnf_ASR_l_imm,(RW4 d, IM8 i)) if(i) { d = rmw(d); - if(i > 31) - i = 31; - ASR_wwi(d, d, i); + if(i > 31) + i = 31; + ASR_wwi(d, d, i); unlock2(d); } @@ -1277,23 +1277,23 @@ MIDFUNC(2,jff_ASR_b_imm,(RW1 d, IM8 i)) SIGNED8_REG_2_REG(REG_WORK1, d); if (i) { - if(i > 31) - i = 31; + if(i > 31) + i = 31; ASR_wwi(REG_WORK2, REG_WORK1, i); - BFI_wwii(d, REG_WORK2, 0, 8); - TST_ww(REG_WORK2, REG_WORK2); - - // Calculate C flag - TBZ_wii(REG_WORK1, i-1, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - - flags_carry_inverted = false; + BFI_wwii(d, REG_WORK2, 0, 8); + TST_ww(REG_WORK2, REG_WORK2); + + // Calculate C flag + TBZ_wii(REG_WORK1, i-1, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + + flags_carry_inverted = false; DUPLICACTE_CARRY } else { TST_ww(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -1309,23 +1309,23 @@ MIDFUNC(2,jff_ASR_w_imm,(RW2 d, IM8 i)) SIGNED16_REG_2_REG(REG_WORK1, d); if (i) { - if(i > 31) - i = 31; + if(i > 31) + i = 31; ASR_wwi(REG_WORK2, REG_WORK1, i); - BFI_wwii(d, REG_WORK2, 0, 16); - TST_ww(REG_WORK2, REG_WORK2); - - // Calculate C flag - TBZ_wii(REG_WORK1, i-1, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - - flags_carry_inverted = false; + BFI_wwii(d, REG_WORK2, 0, 16); + TST_ww(REG_WORK2, REG_WORK2); + + // Calculate C flag + TBZ_wii(REG_WORK1, i-1, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + + flags_carry_inverted = false; DUPLICACTE_CARRY } else { TST_ww(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -1342,32 +1342,32 @@ MIDFUNC(2,jff_ASR_l_imm,(RW4 d, IM8 i)) if (i) { SXTW_xw(REG_WORK1, d); if(i > 32) - i = 32; + i = 32; ASR_xxi(d, REG_WORK1, i); TST_ww(d, d); - - // Calculate C flag - TBZ_wii(REG_WORK1, i-1, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - - flags_carry_inverted = false; + + // Calculate C flag + TBZ_wii(REG_WORK1, i-1, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + + flags_carry_inverted = false; DUPLICACTE_CARRY } else { TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); } MENDFUNC(2,jff_ASR_l_imm,(RW4 d, IM8 i)) -MIDFUNC(2,jnf_ASR_b_reg,(RW1 d, RR4 i)) +MIDFUNC(2,jnf_ASR_b_reg,(RW1 d, RR4 i)) { if (isconst(i)) { - COMPCALL(jnf_ASR_b_imm)(d, live.state[i].val & 0x3f); - return; + COMPCALL(jnf_ASR_b_imm)(d, live.state[i].val & 0x3f); + return; } i = readreg(i); @@ -1376,7 +1376,7 @@ MIDFUNC(2,jnf_ASR_b_reg,(RW1 d, RR4 i)) SIGNED8_REG_2_REG(REG_WORK1, d); AND_ww3f(REG_WORK2, i); ASR_www(REG_WORK1, REG_WORK1, REG_WORK2); - BFI_wwii(d, REG_WORK1, 0, 8); + BFI_wwii(d, REG_WORK1, 0, 8); unlock2(d); unlock2(i); @@ -1386,8 +1386,8 @@ MENDFUNC(2,jnf_ASR_b_reg,(RW1 d, RR4 i)) MIDFUNC(2,jnf_ASR_w_reg,(RW2 d, RR4 i)) { if (isconst(i)) { - COMPCALL(jnf_ASR_w_imm)(d, live.state[i].val & 0x3f); - return; + COMPCALL(jnf_ASR_w_imm)(d, live.state[i].val & 0x3f); + return; } i = readreg(i); @@ -1396,7 +1396,7 @@ MIDFUNC(2,jnf_ASR_w_reg,(RW2 d, RR4 i)) SIGNED16_REG_2_REG(REG_WORK1, d); AND_ww3f(REG_WORK2, i); ASR_www(REG_WORK1, REG_WORK1, REG_WORK2); - BFI_wwii(d, REG_WORK1, 0, 16); + BFI_wwii(d, REG_WORK1, 0, 16); unlock2(d); unlock2(i); @@ -1406,8 +1406,8 @@ MENDFUNC(2,jnf_ASR_w_reg,(RW2 d, RR4 i)) MIDFUNC(2,jnf_ASR_l_reg,(RW4 d, RR4 i)) { if (isconst(i)) { - COMPCALL(jnf_ASR_l_imm)(d, live.state[i].val & 0x3f); - return; + COMPCALL(jnf_ASR_l_imm)(d, live.state[i].val & 0x3f); + return; } i = readreg(i); @@ -1424,8 +1424,8 @@ MENDFUNC(2,jnf_ASR_l_reg,(RW4 d, RR4 i)) MIDFUNC(2,jff_ASR_b_reg,(RW1 d, RR4 i)) { if (isconst(i)) { - COMPCALL(jff_ASR_b_imm)(d, live.state[i].val & 0x3f); - return; + COMPCALL(jff_ASR_b_imm)(d, live.state[i].val & 0x3f); + return; } i = readreg(i); @@ -1435,40 +1435,40 @@ MIDFUNC(2,jff_ASR_b_reg,(RW1 d, RR4 i)) ANDS_ww3f(REG_WORK1, i); BNE_i(3); // No shift -> X flag unchanged - // shift count is 0 - TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // - - // shift count > 0 + // shift count is 0 + TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // + + // shift count > 0 ASR_www(REG_WORK2, REG_WORK3, REG_WORK1); - BFI_wwii(d, REG_WORK2, 0, 8); - TST_ww(REG_WORK2, REG_WORK2); - + BFI_wwii(d, REG_WORK2, 0, 8); + TST_ww(REG_WORK2, REG_WORK2); + // Calculate C Flag SUB_wwi(REG_WORK2, REG_WORK1, 1); ASR_www(REG_WORK2, REG_WORK3, REG_WORK2); - TBZ_wii(REG_WORK2, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + TBZ_wii(REG_WORK2, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; DUPLICACTE_CARRY - - // - write_jmp_target(branchadd, (uintptr)get_target()); + + // + write_jmp_target(branchadd, (uintptr)get_target()); unlock2(d); unlock2(i); } MENDFUNC(2,jff_ASR_b_reg,(RW1 d, RR4 i)) -MIDFUNC(2,jff_ASR_w_reg,(RW2 d, RR4 i)) +MIDFUNC(2,jff_ASR_w_reg,(RW2 d, RR4 i)) { if (isconst(i)) { - COMPCALL(jff_ASR_w_imm)(d, live.state[i].val & 0x3f); - return; + COMPCALL(jff_ASR_w_imm)(d, live.state[i].val & 0x3f); + return; } i = readreg(i); @@ -1478,29 +1478,29 @@ MIDFUNC(2,jff_ASR_w_reg,(RW2 d, RR4 i)) ANDS_ww3f(REG_WORK1, i); BNE_i(3); // No shift -> X flag unchanged - // shift count is 0 - TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // - - // shift count > 0 + // shift count is 0 + TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // + + // shift count > 0 ASR_www(REG_WORK2, REG_WORK3, REG_WORK1); - BFI_wwii(d, REG_WORK2, 0, 16); - TST_ww(REG_WORK2, REG_WORK2); - + BFI_wwii(d, REG_WORK2, 0, 16); + TST_ww(REG_WORK2, REG_WORK2); + // Calculate C Flag SUB_wwi(REG_WORK2, REG_WORK1, 1); ASR_www(REG_WORK2, REG_WORK3, REG_WORK2); - TBZ_wii(REG_WORK2, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + TBZ_wii(REG_WORK2, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; DUPLICACTE_CARRY - - // - write_jmp_target(branchadd, (uintptr)get_target()); + + // + write_jmp_target(branchadd, (uintptr)get_target()); unlock2(d); unlock2(i); @@ -1510,8 +1510,8 @@ MENDFUNC(2,jff_ASR_w_reg,(RW2 d, RR4 i)) MIDFUNC(2,jff_ASR_l_reg,(RW4 d, RR4 i)) { if (isconst(i)) { - COMPCALL(jff_ASR_l_imm)(d, live.state[i].val & 0x3f); - return; + COMPCALL(jff_ASR_l_imm)(d, live.state[i].val & 0x3f); + return; } i = readreg(i); @@ -1520,29 +1520,29 @@ MIDFUNC(2,jff_ASR_l_reg,(RW4 d, RR4 i)) ANDS_ww3f(REG_WORK1, i); BNE_i(3); // No shift -> X flag unchanged - // shift count is 0 - TST_ww(d, d); // NZ correct, VC cleared - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // - - // shift count > 0 + // shift count is 0 + TST_ww(d, d); // NZ correct, VC cleared + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // + + // shift count > 0 MOV_ww(REG_WORK3, d); ASR_www(d, d, REG_WORK1); - TST_ww(d, d); - + TST_ww(d, d); + // Calculate C Flag SUB_wwi(REG_WORK2, REG_WORK1, 1); ASR_www(REG_WORK2, REG_WORK3, REG_WORK2); - TBZ_wii(REG_WORK2, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + TBZ_wii(REG_WORK2, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; DUPLICACTE_CARRY - - // - write_jmp_target(branchadd, (uintptr)get_target()); + + // + write_jmp_target(branchadd, (uintptr)get_target()); unlock2(d); unlock2(i); @@ -1576,19 +1576,19 @@ MENDFUNC(1,jnf_ASRW,(RW2 d)) MIDFUNC(1,jff_ASRW,(RW2 d)) { - d = rmw(d); + d = rmw(d); - SIGNED16_REG_2_REG(REG_WORK1, d); + SIGNED16_REG_2_REG(REG_WORK1, d); ASR_wwi(d, REG_WORK1, 1); - TST_ww(d, d); + TST_ww(d, d); - // Calculate C flag - TBZ_wii(REG_WORK1, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + // Calculate C flag + TBZ_wii(REG_WORK1, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; DUPLICACTE_CARRY unlock2(d); @@ -1673,10 +1673,10 @@ MIDFUNC(2,jff_BCHG_b_imm,(RW1 d, IM8 s)) MRS_NZCV_x(REG_WORK1); EOR_xxbit(d, d, s & 0x7); - UBFX_xxii(REG_WORK2, d, s & 0x7, 1); - BFI_xxii(REG_WORK1, REG_WORK2, 30, 1); - MSR_NZCV_x(REG_WORK1); - + UBFX_xxii(REG_WORK2, d, s & 0x7, 1); + BFI_xxii(REG_WORK1, REG_WORK2, 30, 1); + MSR_NZCV_x(REG_WORK1); + unlock2(d); } MENDFUNC(2,jff_BCHG_b_imm,(RW1 d, IM8 s)) @@ -1687,9 +1687,9 @@ MIDFUNC(2,jff_BCHG_l_imm,(RW4 d, IM8 s)) MRS_NZCV_x(REG_WORK1); EOR_xxbit(d, d, s & 0x1f); - UBFX_xxii(REG_WORK2, d, s & 0x1f, 1); - BFI_xxii(REG_WORK1, REG_WORK2, 30, 1); - MSR_NZCV_x(REG_WORK1); + UBFX_xxii(REG_WORK2, d, s & 0x1f, 1); + BFI_xxii(REG_WORK1, REG_WORK2, 30, 1); + MSR_NZCV_x(REG_WORK1); unlock2(d); } @@ -1711,11 +1711,11 @@ MIDFUNC(2,jff_BCHG_b,(RW1 d, RR4 s)) MRS_NZCV_x(REG_WORK1); TST_ww(d, REG_WORK2); - CSET_xc(REG_WORK3, NATIVE_CC_EQ); - BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); - MSR_NZCV_x(REG_WORK1); + CSET_xc(REG_WORK3, NATIVE_CC_EQ); + BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); + MSR_NZCV_x(REG_WORK1); EOR_www(d, d, REG_WORK2); - + unlock2(d); unlock2(s); } @@ -1736,9 +1736,9 @@ MIDFUNC(2,jff_BCHG_l,(RW4 d, RR4 s)) MRS_NZCV_x(REG_WORK1); TST_ww(d, REG_WORK2); - CSET_xc(REG_WORK3, NATIVE_CC_EQ); - BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); - MSR_NZCV_x(REG_WORK1); + CSET_xc(REG_WORK3, NATIVE_CC_EQ); + BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); + MSR_NZCV_x(REG_WORK1); EOR_www(d, d, REG_WORK2); EXIT_REGS(d,s); @@ -1825,10 +1825,10 @@ MIDFUNC(2,jff_BCLR_b_imm,(RW1 d, IM8 s)) d = rmw(d); MRS_NZCV_x(REG_WORK1); - CLEAR_xxZflag(REG_WORK1, REG_WORK1); + CLEAR_xxZflag(REG_WORK1, REG_WORK1); TBNZ_wii(d, s & 0x7, 2); - SET_xxZflag(REG_WORK1, REG_WORK1); - MSR_NZCV_x(REG_WORK1); + SET_xxZflag(REG_WORK1, REG_WORK1); + MSR_NZCV_x(REG_WORK1); CLEAR_xxbit(d, d, s & 0x7); unlock2(d); @@ -1840,10 +1840,10 @@ MIDFUNC(2,jff_BCLR_l_imm,(RW4 d, IM8 s)) d = rmw(d); MRS_NZCV_x(REG_WORK1); - CLEAR_xxZflag(REG_WORK1, REG_WORK1); + CLEAR_xxZflag(REG_WORK1, REG_WORK1); TBNZ_wii(d, s & 0x1f, 2); - SET_xxZflag(REG_WORK1, REG_WORK1); - MSR_NZCV_x(REG_WORK1); + SET_xxZflag(REG_WORK1, REG_WORK1); + MSR_NZCV_x(REG_WORK1); CLEAR_xxbit(d, d, s & 0x1f); unlock2(d); @@ -1866,8 +1866,8 @@ MIDFUNC(2,jff_BCLR_b,(RW1 d, RR4 s)) MRS_NZCV_x(REG_WORK1); TST_ww(d,REG_WORK2); - CSET_xc(REG_WORK3, NATIVE_CC_EQ); - BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); + CSET_xc(REG_WORK3, NATIVE_CC_EQ); + BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); MSR_NZCV_x(REG_WORK1); BIC_www(d, d, REG_WORK2); @@ -1891,8 +1891,8 @@ MIDFUNC(2,jff_BCLR_l,(RW4 d, RR4 s)) MRS_NZCV_x(REG_WORK1); TST_ww(d,REG_WORK2); - CSET_xc(REG_WORK3, NATIVE_CC_EQ); - BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); + CSET_xc(REG_WORK3, NATIVE_CC_EQ); + BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); MSR_NZCV_x(REG_WORK1); BIC_www(d, d, REG_WORK2); @@ -1917,10 +1917,10 @@ MIDFUNC(4,jnf_BFINS_ii,(RW4 d, RR4 s, IM8 offs, IM8 width)) { INIT_REGS_l(d,s); - BFI_wwii(d, s, (32 - offs - width), width); - if(32 - offs - width < 0) - BFI_xxii(d, s, (64 - offs - width), width); - + BFI_wwii(d, s, (32 - offs - width), width); + if(32 - offs - width < 0) + BFI_xxii(d, s, (64 - offs - width), width); + EXIT_REGS(d,s); } MENDFUNC(4,jnf_BFINS_ii,(RW4 d, RR4 s, IM8 offs, IM8 width)) @@ -1929,46 +1929,46 @@ MIDFUNC(4,jff_BFINS_ii,(RW4 d, RR4 s, IM8 offs, IM8 width)) { INIT_REGS_l(d,s); - SBFX_wwii(REG_WORK1, s, 0, width); - BFI_wwii(d, REG_WORK1, (32 - offs - width), width); - if(32 - offs - width < 0) - BFI_xxii(d, REG_WORK1, (64 - offs - width), width); - TST_ww(REG_WORK1, REG_WORK1); + SBFX_wwii(REG_WORK1, s, 0, width); + BFI_wwii(d, REG_WORK1, (32 - offs - width), width); + if(32 - offs - width < 0) + BFI_xxii(d, REG_WORK1, (64 - offs - width), width); + TST_ww(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d,s); } MENDFUNC(4,jff_BFINS_ii,(RW4 d, RR4 s, IM8 offs, IM8 width)) MIDFUNC(5,jnf_BFINS2_ii,(RW4 d, RW4 d2, RR4 s, IM8 offs, IM8 width)) { - d2 = rmw(d2); + d2 = rmw(d2); INIT_REGS_l(d,s); - SBFX_wwii(REG_WORK1, s, 0, width); - BFI_xxii(d2, d, 32, 32); - BFI_xxii(d2, REG_WORK1, (64 - offs - width), width); - LSR_xxi(d, d2, 32); + SBFX_wwii(REG_WORK1, s, 0, width); + BFI_xxii(d2, d, 32, 32); + BFI_xxii(d2, REG_WORK1, (64 - offs - width), width); + LSR_xxi(d, d2, 32); EXIT_REGS(d,s); - unlock2(d2); + unlock2(d2); } MENDFUNC(5,jnf_BFINS2_ii,(RW4 d, RW4 d2, RR4 s, IM8 offs, IM8 width)) MIDFUNC(5,jff_BFINS2_ii,(RW4 d, RW4 d2, RR4 s, IM8 offs, IM8 width)) { - d2 = rmw(d2); + d2 = rmw(d2); INIT_REGS_l(d,s); - - SBFX_wwii(REG_WORK1, s, 0, width); - BFI_xxii(d2, d, 32, 32); - BFI_xxii(d2, REG_WORK1, (64 - offs - width), width); - LSR_xxi(d, d2, 32); - TST_ww(REG_WORK1, REG_WORK1); - - flags_carry_inverted = false; + + SBFX_wwii(REG_WORK1, s, 0, width); + BFI_xxii(d2, d, 32, 32); + BFI_xxii(d2, REG_WORK1, (64 - offs - width), width); + LSR_xxi(d, d2, 32); + TST_ww(REG_WORK1, REG_WORK1); + + flags_carry_inverted = false; EXIT_REGS(d,s); - unlock2(d2); + unlock2(d2); } MENDFUNC(5,jff_BFINS2_ii,(RW4 d, RW4 d2, RR4 s, IM8 offs, IM8 width)) @@ -1976,29 +1976,29 @@ MENDFUNC(5,jff_BFINS2_ii,(RW4 d, RW4 d2, RR4 s, IM8 offs, IM8 width)) MIDFUNC(4,jnf_BFINS_di,(RW4 d, RR4 s, RR4 offs, IM8 width)) { INIT_REGS_l(d,s); - offs = readreg(offs); - - AND_xx1f(REG_WORK3, offs); - MOV_xi(REG_WORK4, width); - - BFI_xxii(d, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); - BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d, d, REG_WORK2); - - ROR_www(REG_WORK1, s, REG_WORK4); - BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d, d, REG_WORK1); - ROR_xxi(d, d, 32); - - unlock2(offs); + offs = readreg(offs); + + AND_xx1f(REG_WORK3, offs); + MOV_xi(REG_WORK4, width); + + BFI_xxii(d, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); + BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d, d, REG_WORK2); + + ROR_www(REG_WORK1, s, REG_WORK4); + BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d, d, REG_WORK1); + ROR_xxi(d, d, 32); + + unlock2(offs); EXIT_REGS(d,s); } MENDFUNC(4,jnf_BFINS_di,(RW4 d, RR4 s, RR4 offs, IM8 width)) @@ -2006,67 +2006,67 @@ MENDFUNC(4,jnf_BFINS_di,(RW4 d, RR4 s, RR4 offs, IM8 width)) MIDFUNC(4,jff_BFINS_di,(RW4 d, RR4 s, RR4 offs, IM8 width)) { INIT_REGS_l(d,s); - offs = readreg(offs); - - AND_xx1f(REG_WORK3, offs); - MOV_xi(REG_WORK4, width); - - BFI_xxii(d, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); - BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d, d, REG_WORK2); - - ROR_www(REG_WORK1, s, REG_WORK4); - BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d, d, REG_WORK1); - ROR_xxi(d, d, 32); - - LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - TST_xx(REG_WORK1, REG_WORK1); - - flags_carry_inverted = false; - unlock2(offs); + offs = readreg(offs); + + AND_xx1f(REG_WORK3, offs); + MOV_xi(REG_WORK4, width); + + BFI_xxii(d, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); + BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d, d, REG_WORK2); + + ROR_www(REG_WORK1, s, REG_WORK4); + BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d, d, REG_WORK1); + ROR_xxi(d, d, 32); + + LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + TST_xx(REG_WORK1, REG_WORK1); + + flags_carry_inverted = false; + unlock2(offs); EXIT_REGS(d,s); } MENDFUNC(4,jff_BFINS_di,(RW4 d, RR4 s, RR4 offs, IM8 width)) MIDFUNC(4,jnf_BFINS_id,(RW4 d, RR4 s, IM8 offs, RR4 width)) { - clobber_flags(); + clobber_flags(); INIT_REGS_l(d,s); - width = readreg(width); - - MOV_xi(REG_WORK3, offs); - ANDS_xx1f(REG_WORK4, width); - BNE_i(2); - MOV_xi(REG_WORK4, 0x20); - - BFI_xxii(d, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); - BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d, d, REG_WORK2); - - ROR_www(REG_WORK1, s, REG_WORK4); - BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d, d, REG_WORK1); - ROR_xxi(d, d, 32); - - unlock2(width); + width = readreg(width); + + MOV_xi(REG_WORK3, offs); + ANDS_xx1f(REG_WORK4, width); + BNE_i(2); + MOV_xi(REG_WORK4, 0x20); + + BFI_xxii(d, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); + BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d, d, REG_WORK2); + + ROR_www(REG_WORK1, s, REG_WORK4); + BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d, d, REG_WORK1); + ROR_xxi(d, d, 32); + + unlock2(width); EXIT_REGS(d,s); } MENDFUNC(4,jnf_BFINS_id,(RW4 d, RR4 s, IM8 offs, RR4 width)) @@ -2074,71 +2074,71 @@ MENDFUNC(4,jnf_BFINS_id,(RW4 d, RR4 s, IM8 offs, RR4 width)) MIDFUNC(4,jff_BFINS_id,(RW4 d, RR4 s, IM8 offs, RR4 width)) { INIT_REGS_l(d,s); - width = readreg(width); - - MOV_xi(REG_WORK3, offs); - ANDS_xx1f(REG_WORK4, width); - BNE_i(2); - MOV_xi(REG_WORK4, 0x20); - - BFI_xxii(d, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); - BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d, d, REG_WORK2); - - ROR_www(REG_WORK1, s, REG_WORK4); - BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d, d, REG_WORK1); - ROR_xxi(d, d, 32); - - LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - TST_xx(REG_WORK1, REG_WORK1); - - flags_carry_inverted = false; - unlock2(width); + width = readreg(width); + + MOV_xi(REG_WORK3, offs); + ANDS_xx1f(REG_WORK4, width); + BNE_i(2); + MOV_xi(REG_WORK4, 0x20); + + BFI_xxii(d, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); + BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d, d, REG_WORK2); + + ROR_www(REG_WORK1, s, REG_WORK4); + BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d, d, REG_WORK1); + ROR_xxi(d, d, 32); + + LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + TST_xx(REG_WORK1, REG_WORK1); + + flags_carry_inverted = false; + unlock2(width); EXIT_REGS(d,s); } MENDFUNC(4,jff_BFINS_id,(RW4 d, RR4 s, IM8 offs, RR4 width)) MIDFUNC(4,jnf_BFINS_dd,(RW4 d, RR4 s, RR4 offs, RR4 width)) { - clobber_flags(); + clobber_flags(); INIT_REGS_l(d,s); - offs = readreg(offs); - width = readreg(width); - - AND_xx1f(REG_WORK3, offs); - ANDS_xx1f(REG_WORK4, width); - BNE_i(2); - MOV_xi(REG_WORK4, 0x20); - - BFI_xxii(d, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); - BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d, d, REG_WORK2); - - ROR_www(REG_WORK1, s, REG_WORK4); - BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d, d, REG_WORK1); - ROR_xxi(d, d, 32); - - unlock2(width); - unlock2(offs); + offs = readreg(offs); + width = readreg(width); + + AND_xx1f(REG_WORK3, offs); + ANDS_xx1f(REG_WORK4, width); + BNE_i(2); + MOV_xi(REG_WORK4, 0x20); + + BFI_xxii(d, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); + BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d, d, REG_WORK2); + + ROR_www(REG_WORK1, s, REG_WORK4); + BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d, d, REG_WORK1); + ROR_xxi(d, d, 32); + + unlock2(width); + unlock2(offs); EXIT_REGS(d,s); } MENDFUNC(4,jnf_BFINS_dd,(RW4 d, RR4 s, RR4 offs, RR4 width)) @@ -2146,37 +2146,37 @@ MENDFUNC(4,jnf_BFINS_dd,(RW4 d, RR4 s, RR4 offs, RR4 width)) MIDFUNC(4,jff_BFINS_dd,(RW4 d, RR4 s, RR4 offs, RR4 width)) { INIT_REGS_l(d,s); - offs = readreg(offs); - width = readreg(width); - - AND_xx1f(REG_WORK3, offs); - ANDS_xx1f(REG_WORK4, width); - BNE_i(2); - MOV_xi(REG_WORK4, 0x20); - - BFI_xxii(d, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); - BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d, d, REG_WORK2); - - ROR_www(REG_WORK1, s, REG_WORK4); - BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d, d, REG_WORK1); - ROR_xxi(d, d, 32); - - LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - TST_xx(REG_WORK1, REG_WORK1); - - flags_carry_inverted = false; - unlock2(width); - unlock2(offs); + offs = readreg(offs); + width = readreg(width); + + AND_xx1f(REG_WORK3, offs); + ANDS_xx1f(REG_WORK4, width); + BNE_i(2); + MOV_xi(REG_WORK4, 0x20); + + BFI_xxii(d, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_www(REG_WORK2, REG_WORK2, REG_WORK4); + BFI_xxii(REG_WORK2, REG_WORK2, 32, 32); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d, d, REG_WORK2); + + ROR_www(REG_WORK1, s, REG_WORK4); + BFI_xxii(REG_WORK1, REG_WORK1, 32, 32); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d, d, REG_WORK1); + ROR_xxi(d, d, 32); + + LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + TST_xx(REG_WORK1, REG_WORK1); + + flags_carry_inverted = false; + unlock2(width); + unlock2(offs); EXIT_REGS(d,s); } MENDFUNC(4,jff_BFINS_dd,(RW4 d, RR4 s, RR4 offs, RR4 width)) @@ -2185,209 +2185,209 @@ MENDFUNC(4,jff_BFINS_dd,(RW4 d, RR4 s, RR4 offs, RR4 width)) // Next called when dest is MIDFUNC(5,jnf_BFINS2_di,(RW4 d, RW4 d2, RR4 s, RR4 offs, IM8 width)) { - d2 = rmw(d2); + d2 = rmw(d2); INIT_REGS_l(d,s); - offs = readreg(offs); - - AND_xx1f(REG_WORK3, offs); - MOV_xi(REG_WORK4, width); - - BFI_xxii(d2, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d2, d2, REG_WORK2); - - ROR_xxx(REG_WORK1, s, REG_WORK4); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d2, d2, REG_WORK1); - LSR_xxi(d, d2, 32); - - unlock2(offs); - EXIT_REGS(d,s); - unlock2(d2); -} -MENDFUNC(5,jnf_BFINS2_di,(RW4 d, RW4 d2, RR4 s, RR4 offs, IM8 width)) + offs = readreg(offs); -MIDFUNC(5,jff_BFINS2_di,(RW4 d, RW4 d2, RR4 s, RR4 offs, IM8 width)) -{ - d2 = rmw(d2); - INIT_REGS_l(d,s); - offs = readreg(offs); - - AND_xx1f(REG_WORK3, offs); - MOV_xi(REG_WORK4, width); - - BFI_xxii(d2, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d2, d2, REG_WORK2); - - ROR_xxx(REG_WORK1, s, REG_WORK4); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d2, d2, REG_WORK1); - LSR_xxi(d, d2, 32); - - LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - TST_xx(REG_WORK1, REG_WORK1); - - flags_carry_inverted = false; - unlock2(offs); + AND_xx1f(REG_WORK3, offs); + MOV_xi(REG_WORK4, width); + + BFI_xxii(d2, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d2, d2, REG_WORK2); + + ROR_xxx(REG_WORK1, s, REG_WORK4); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d2, d2, REG_WORK1); + LSR_xxi(d, d2, 32); + + unlock2(offs); + EXIT_REGS(d,s); + unlock2(d2); +} +MENDFUNC(5,jnf_BFINS2_di,(RW4 d, RW4 d2, RR4 s, RR4 offs, IM8 width)) + +MIDFUNC(5,jff_BFINS2_di,(RW4 d, RW4 d2, RR4 s, RR4 offs, IM8 width)) +{ + d2 = rmw(d2); + INIT_REGS_l(d,s); + offs = readreg(offs); + + AND_xx1f(REG_WORK3, offs); + MOV_xi(REG_WORK4, width); + + BFI_xxii(d2, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d2, d2, REG_WORK2); + + ROR_xxx(REG_WORK1, s, REG_WORK4); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d2, d2, REG_WORK1); + LSR_xxi(d, d2, 32); + + LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + TST_xx(REG_WORK1, REG_WORK1); + + flags_carry_inverted = false; + unlock2(offs); EXIT_REGS(d,s); - unlock2(d2); + unlock2(d2); } MENDFUNC(5,jff_BFINS2_di,(RW4 d, RW4 d2, RR4 s, RR4 offs, IM8 width)) MIDFUNC(5,jnf_BFINS2_id,(RW4 d, RW4 d2, RR4 s, IM8 offs, RR4 width)) { - clobber_flags(); + clobber_flags(); - d2 = rmw(d2); + d2 = rmw(d2); INIT_REGS_l(d,s); - width = readreg(width); - - MOV_xi(REG_WORK3, offs); - ANDS_xx1f(REG_WORK4, width); - BNE_i(2); - MOV_xi(REG_WORK4, 0x20); - - BFI_xxii(d2, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d2, d2, REG_WORK2); - - ROR_xxx(REG_WORK1, s, REG_WORK4); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d2, d2, REG_WORK1); - LSR_xxi(d, d2, 32); - - unlock2(width); + width = readreg(width); + + MOV_xi(REG_WORK3, offs); + ANDS_xx1f(REG_WORK4, width); + BNE_i(2); + MOV_xi(REG_WORK4, 0x20); + + BFI_xxii(d2, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d2, d2, REG_WORK2); + + ROR_xxx(REG_WORK1, s, REG_WORK4); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d2, d2, REG_WORK1); + LSR_xxi(d, d2, 32); + + unlock2(width); EXIT_REGS(d,s); - unlock2(d2); + unlock2(d2); } MENDFUNC(5,jnf_BFINS2_id,(RW4 d, RW4 d2, RR4 s, IM8 offs, RR4 width)) MIDFUNC(5,jff_BFINS2_id,(RW4 d, RW4 d2, RR4 s, IM8 offs, RR4 width)) { - d2 = rmw(d2); + d2 = rmw(d2); INIT_REGS_l(d,s); - width = readreg(width); - - MOV_xi(REG_WORK3, offs); - ANDS_xx1f(REG_WORK4, width); - BNE_i(2); - MOV_xi(REG_WORK4, 0x20); - - BFI_xxii(d2, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d2, d2, REG_WORK2); - - ROR_xxx(REG_WORK1, s, REG_WORK4); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d2, d2, REG_WORK1); - LSR_xxi(d, d2, 32); - - LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - TST_xx(REG_WORK1, REG_WORK1); - - flags_carry_inverted = false; - unlock2(width); + width = readreg(width); + + MOV_xi(REG_WORK3, offs); + ANDS_xx1f(REG_WORK4, width); + BNE_i(2); + MOV_xi(REG_WORK4, 0x20); + + BFI_xxii(d2, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d2, d2, REG_WORK2); + + ROR_xxx(REG_WORK1, s, REG_WORK4); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d2, d2, REG_WORK1); + LSR_xxi(d, d2, 32); + + LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + TST_xx(REG_WORK1, REG_WORK1); + + flags_carry_inverted = false; + unlock2(width); EXIT_REGS(d,s); - unlock2(d2); + unlock2(d2); } MENDFUNC(5,jff_BFINS2_id,(RW4 d, RW4 d2, RR4 s, IM8 offs, RR4 width)) MIDFUNC(5,jnf_BFINS2_dd,(RW4 d, RW4 d2, RR4 s, RR4 offs, RR4 width)) { - clobber_flags(); + clobber_flags(); - d2 = rmw(d2); + d2 = rmw(d2); INIT_REGS_l(d,s); - offs = readreg(offs); - width = readreg(width); - - AND_xx1f(REG_WORK3, offs); - ANDS_xx1f(REG_WORK4, width); - BNE_i(2); - MOV_xi(REG_WORK4, 0x20); - - BFI_xxii(d2, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d2, d2, REG_WORK2); - - ROR_xxx(REG_WORK1, s, REG_WORK4); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d2, d2, REG_WORK1); - LSR_xxi(d, d2, 32); - - unlock2(width); - unlock2(offs); + offs = readreg(offs); + width = readreg(width); + + AND_xx1f(REG_WORK3, offs); + ANDS_xx1f(REG_WORK4, width); + BNE_i(2); + MOV_xi(REG_WORK4, 0x20); + + BFI_xxii(d2, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d2, d2, REG_WORK2); + + ROR_xxx(REG_WORK1, s, REG_WORK4); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d2, d2, REG_WORK1); + LSR_xxi(d, d2, 32); + + unlock2(width); + unlock2(offs); EXIT_REGS(d,s); - unlock2(d2); + unlock2(d2); } MENDFUNC(5,jnf_BFINS2_dd,(RW4 d, RW4 d2, RR4 s, RR4 offs, RR4 width)) MIDFUNC(5,jff_BFINS2_dd,(RW4 d, RW4 d2, RR4 s, RR4 offs, RR4 width)) { - d2 = rmw(d2); + d2 = rmw(d2); INIT_REGS_l(d,s); - offs = readreg(offs); - width = readreg(width); - - AND_xx1f(REG_WORK3, offs); - ANDS_xx1f(REG_WORK4, width); - BNE_i(2); - MOV_xi(REG_WORK4, 0x20); - - BFI_xxii(d2, d, 32, 32); - - MOVN_xi(REG_WORK2, 0); - LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); - ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - AND_xxx(d2, d2, REG_WORK2); - - ROR_xxx(REG_WORK1, s, REG_WORK4); - ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - MVN_xx(REG_WORK2, REG_WORK2); - AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); - - ORR_xxx(d2, d2, REG_WORK1); - LSR_xxi(d, d2, 32); - - LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); - TST_xx(REG_WORK1, REG_WORK1); - - flags_carry_inverted = false; - unlock2(width); - unlock2(offs); + offs = readreg(offs); + width = readreg(width); + + AND_xx1f(REG_WORK3, offs); + ANDS_xx1f(REG_WORK4, width); + BNE_i(2); + MOV_xi(REG_WORK4, 0x20); + + BFI_xxii(d2, d, 32, 32); + + MOVN_xi(REG_WORK2, 0); + LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK4); + ROR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + AND_xxx(d2, d2, REG_WORK2); + + ROR_xxx(REG_WORK1, s, REG_WORK4); + ROR_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + MVN_xx(REG_WORK2, REG_WORK2); + AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); + + ORR_xxx(d2, d2, REG_WORK1); + LSR_xxi(d, d2, 32); + + LSL_xxx(REG_WORK1, REG_WORK1, REG_WORK3); + TST_xx(REG_WORK1, REG_WORK1); + + flags_carry_inverted = false; + unlock2(width); + unlock2(offs); EXIT_REGS(d,s); - unlock2(d2); + unlock2(d2); } MENDFUNC(5,jff_BFINS2_dd,(RW4 d, RW4 d2, RR4 s, RR4 offs, RR4 width)) @@ -2468,10 +2468,10 @@ MIDFUNC(2,jff_BSET_b_imm,(RW1 d, IM8 s)) d = rmw(d); MRS_NZCV_x(REG_WORK1); - CLEAR_xxZflag(REG_WORK1, REG_WORK1); + CLEAR_xxZflag(REG_WORK1, REG_WORK1); TBNZ_wii(d, s & 0x7, 2); - SET_xxZflag(REG_WORK1, REG_WORK1); - MSR_NZCV_x(REG_WORK1); + SET_xxZflag(REG_WORK1, REG_WORK1); + MSR_NZCV_x(REG_WORK1); SET_xxbit(d, d, s & 0x7); unlock2(d); @@ -2483,10 +2483,10 @@ MIDFUNC(2,jff_BSET_l_imm,(RW4 d, IM8 s)) d = rmw(d); MRS_NZCV_x(REG_WORK1); - CLEAR_xxZflag(REG_WORK1, REG_WORK1); + CLEAR_xxZflag(REG_WORK1, REG_WORK1); TBNZ_wii(d, s & 0x1f, 2); - SET_xxZflag(REG_WORK1, REG_WORK1); - MSR_NZCV_x(REG_WORK1); + SET_xxZflag(REG_WORK1, REG_WORK1); + MSR_NZCV_x(REG_WORK1); SET_xxbit(d, d, s & 0x1f); unlock2(d); @@ -2509,9 +2509,9 @@ MIDFUNC(2,jff_BSET_b,(RW1 d, RR4 s)) MRS_NZCV_x(REG_WORK1); TST_ww(d,REG_WORK2); - CSET_xc(REG_WORK3, NATIVE_CC_EQ); - BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); - MSR_NZCV_x(REG_WORK1); + CSET_xc(REG_WORK3, NATIVE_CC_EQ); + BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); + MSR_NZCV_x(REG_WORK1); ORR_www(d, d, REG_WORK2); unlock2(d); @@ -2534,9 +2534,9 @@ MIDFUNC(2,jff_BSET_l,(RW4 d, RR4 s)) MRS_NZCV_x(REG_WORK1); TST_ww(d,REG_WORK2); - CSET_xc(REG_WORK3, NATIVE_CC_EQ); - BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); - MSR_NZCV_x(REG_WORK1); + CSET_xc(REG_WORK3, NATIVE_CC_EQ); + BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); + MSR_NZCV_x(REG_WORK1); ORR_www(d, d, REG_WORK2); EXIT_REGS(d,s); @@ -2603,8 +2603,8 @@ MIDFUNC(2,jff_BTST_b,(RR1 d, RR4 s)) MRS_NZCV_x(REG_WORK1); TST_ww(d, REG_WORK2); - CSET_xc(REG_WORK3, NATIVE_CC_EQ); - BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); + CSET_xc(REG_WORK3, NATIVE_CC_EQ); + BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); MSR_NZCV_x(REG_WORK1); unlock2(d); @@ -2625,15 +2625,15 @@ MIDFUNC(2,jff_BTST_l,(RR4 d, RR4 s)) s = readreg(s); else s = d; - + UBFIZ_xxii(REG_WORK1, s, 0, 5); // REG_WORK1 = s & 31 MOV_xi(REG_WORK2, 1); LSL_www(REG_WORK2, REG_WORK2, REG_WORK1); MRS_NZCV_x(REG_WORK1); TST_ww(d, REG_WORK2); - CSET_xc(REG_WORK3, NATIVE_CC_EQ); - BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); + CSET_xc(REG_WORK3, NATIVE_CC_EQ); + BFI_xxii(REG_WORK1, REG_WORK3, 30, 1); MSR_NZCV_x(REG_WORK1); unlock2(d); @@ -2674,7 +2674,7 @@ MIDFUNC(1,jnf_CLR_w,(W2 d)) return; } INIT_WREG_w(d); - CLEAR_LOW16_xx(d, d); + CLEAR_LOW16_xx(d, d); unlock2(d); } MENDFUNC(1,jnf_CLR_w,(W2 d)) @@ -2689,7 +2689,7 @@ MIDFUNC(1,jff_CLR_b,(W1 d)) { MOV_xish(REG_WORK1, 0x4000, 16); // set Z flag MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; if(d >= 16) { set_const(d, 0); return; @@ -2704,11 +2704,11 @@ MIDFUNC(1,jff_CLR_w,(W2 d)) { MOV_xish(REG_WORK1, 0x4000, 16); // set Z flag MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; if(d >= 16) { set_const(d, 0); - return; - } + return; + } INIT_WREG_w(d); CLEAR_LOW16_xx(d, d); unlock2(d); @@ -2719,7 +2719,7 @@ MIDFUNC(1,jff_CLR_l,(W4 d)) { MOV_xish(REG_WORK1, 0x4000, 16); // set Z flag MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; set_const(d, 0); } MENDFUNC(1,jff_CLR_l,(W4 d)) @@ -2739,19 +2739,19 @@ MENDFUNC(1,jff_CLR_l,(W4 d)) */ MIDFUNC(2,jff_CMP_b_imm,(RR1 d, IM8 v)) { - if (isconst(d)) { - uae_u8 tmp = (uae_u8)(live.state[d].val & 0xff); - MOV_wish(REG_WORK1, tmp << 8, 16); - } else { - d = readreg(d); - LSL_wwi(REG_WORK1, d, 24); - unlock2(d); - } + if (isconst(d)) { + uae_u8 tmp = (uae_u8)(live.state[d].val & 0xff); + MOV_wish(REG_WORK1, tmp << 8, 16); + } else { + d = readreg(d); + LSL_wwi(REG_WORK1, d, 24); + unlock2(d); + } - MOV_wi(REG_WORK2, v & 0xff); - CMP_wwLSLi(REG_WORK1, REG_WORK2, 24); + MOV_wi(REG_WORK2, v & 0xff); + CMP_wwLSLi(REG_WORK1, REG_WORK2, 24); - flags_carry_inverted = true; + flags_carry_inverted = true; } MENDFUNC(2,jff_CMP_b_imm,(RR1 d, IM8 v)) @@ -2763,39 +2763,39 @@ MIDFUNC(2,jff_CMP_b,(RR1 d, RR1 s)) } if (isconst(d)) { - uae_u8 tmp = (uae_u8)(live.state[d].val & 0xff); - s = readreg(s); - MOV_wish(REG_WORK1, tmp << 8, 16); - CMP_wwLSLi(REG_WORK1, s, 24); - unlock2(s); + uae_u8 tmp = (uae_u8)(live.state[d].val & 0xff); + s = readreg(s); + MOV_wish(REG_WORK1, tmp << 8, 16); + CMP_wwLSLi(REG_WORK1, s, 24); + unlock2(s); } else { - INIT_RREGS_b(d, s); - - LSL_wwi(REG_WORK1, d, 24); - CMP_wwLSLi(REG_WORK1, s, 24); + INIT_RREGS_b(d, s); - EXIT_REGS(d,s); - } - flags_carry_inverted = true; + LSL_wwi(REG_WORK1, d, 24); + CMP_wwLSLi(REG_WORK1, s, 24); + + EXIT_REGS(d,s); + } + flags_carry_inverted = true; } MENDFUNC(2,jff_CMP_b,(RR1 d, RR1 s)) MIDFUNC(2,jff_CMP_w_imm,(RR2 d, IM16 v)) { if (isconst(d)) { - MOV_wish(REG_WORK1, (live.state[d].val & 0xffff), 16); - MOV_wish(REG_WORK2, (v & 0xffff), 16); - CMP_ww(REG_WORK1, REG_WORK2); + MOV_wish(REG_WORK1, (live.state[d].val & 0xffff), 16); + MOV_wish(REG_WORK2, (v & 0xffff), 16); + CMP_ww(REG_WORK1, REG_WORK2); } else { - d = readreg(d); + d = readreg(d); - LSL_wwi(REG_WORK1, d, 16); - MOV_xi(REG_WORK2, v); - CMP_wwLSLi(REG_WORK1, REG_WORK2, 16); + LSL_wwi(REG_WORK1, d, 16); + MOV_xi(REG_WORK2, v); + CMP_wwLSLi(REG_WORK1, REG_WORK2, 16); - unlock2(d); - } - flags_carry_inverted = true; + unlock2(d); + } + flags_carry_inverted = true; } MENDFUNC(2,jff_CMP_w_imm,(RR2 d, IM16 v)) @@ -2807,52 +2807,52 @@ MIDFUNC(2,jff_CMP_w,(RR2 d, RR2 s)) } if (isconst(d)) { - uae_u16 tmp = (uae_u16)(live.state[d].val & 0xffff); - s = readreg(s); - MOV_wish(REG_WORK1, tmp, 16); - CMP_wwLSLi(REG_WORK1, s, 16); - unlock2(s); + uae_u16 tmp = (uae_u16)(live.state[d].val & 0xffff); + s = readreg(s); + MOV_wish(REG_WORK1, tmp, 16); + CMP_wwLSLi(REG_WORK1, s, 16); + unlock2(s); } else { - INIT_RREGS_w(d, s); + INIT_RREGS_w(d, s); - LSL_wwi(REG_WORK1, d, 16); - CMP_wwLSLi(REG_WORK1, s, 16); + LSL_wwi(REG_WORK1, d, 16); + CMP_wwLSLi(REG_WORK1, s, 16); - EXIT_REGS(d,s); - } - flags_carry_inverted = true; + EXIT_REGS(d,s); + } + flags_carry_inverted = true; } MENDFUNC(2,jff_CMP_w,(RR2 d, RR2 s)) MIDFUNC(2,jff_CMP_l_imm,(RR4 d, IM32 v)) { - if(isconst(d)) { - uae_u32 newv = ((uae_u32)live.state[d].val) - ((uae_u32)v); - int flgs = ((uae_s32)v) < 0; - int flgo = ((uae_s32)live.state[d].val) < 0; - int flgn = ((uae_s32)newv) < 0; - uae_u32 f = 0; - if(((uae_s32)newv) == 0) - f |= (ARM_Z_FLAG >> 16); - if((flgs != flgo) && (flgn != flgo)) - f |= (ARM_V_FLAG >> 16); - if(((uae_u32)v) > ((uae_u32)live.state[d].val)) - f |= (ARM_C_FLAG >> 16); - if(flgn != 0) - f |= (ARM_N_FLAG >> 16); - MOV_xish(REG_WORK1, f, 16); - MSR_NZCV_x(REG_WORK1); - - flags_carry_inverted = false; - return; - } + if(isconst(d)) { + uae_u32 newv = ((uae_u32)live.state[d].val) - ((uae_u32)v); + int flgs = ((uae_s32)v) < 0; + int flgo = ((uae_s32)live.state[d].val) < 0; + int flgn = ((uae_s32)newv) < 0; + uae_u32 f = 0; + if(((uae_s32)newv) == 0) + f |= (ARM_Z_FLAG >> 16); + if((flgs != flgo) && (flgn != flgo)) + f |= (ARM_V_FLAG >> 16); + if(((uae_u32)v) > ((uae_u32)live.state[d].val)) + f |= (ARM_C_FLAG >> 16); + if(flgn != 0) + f |= (ARM_N_FLAG >> 16); + MOV_xish(REG_WORK1, f, 16); + MSR_NZCV_x(REG_WORK1); + + flags_carry_inverted = false; + return; + } d = readreg(d); - LOAD_U32(REG_WORK1, v); + LOAD_U32(REG_WORK1, v); CMP_ww(d, REG_WORK1); - flags_carry_inverted = true; + flags_carry_inverted = true; unlock2(d); } MENDFUNC(2,jff_CMP_l_imm,(RR4 d, IM32 v)) @@ -2861,14 +2861,14 @@ MIDFUNC(2,jff_CMP_l,(RR4 d, RR4 s)) { if (isconst(s)) { COMPCALL(jff_CMP_l_imm)(d, live.state[s].val); - return; - } + return; + } INIT_RREGS_l(d, s); CMP_ww(d, s); - flags_carry_inverted = true; + flags_carry_inverted = true; EXIT_REGS(d,s); } MENDFUNC(2,jff_CMP_l,(RR4 d, RR4 s)) @@ -2888,39 +2888,39 @@ MENDFUNC(2,jff_CMP_l,(RR4 d, RR4 s)) */ MIDFUNC(2,jff_CMPA_w_imm,(RR2 d, IM16 v)) { - uae_u16 tmp = (uae_u16)(v & 0xffff); - d = readreg(d); - SIGNED16_IMM_2_REG(REG_WORK1, tmp); - CMP_ww(d, REG_WORK1); - unlock2(d); + uae_u16 tmp = (uae_u16)(v & 0xffff); + d = readreg(d); + SIGNED16_IMM_2_REG(REG_WORK1, tmp); + CMP_ww(d, REG_WORK1); + unlock2(d); - flags_carry_inverted = true; + flags_carry_inverted = true; } MENDFUNC(2,jff_CMPA_w_imm,(RR2 d, IM16 v)) MIDFUNC(2,jff_CMPA_w,(RR2 d, RR2 s)) { - if (isconst(s)) { + if (isconst(s)) { COMPCALL(jff_CMPA_w_imm)(d, live.state[s].val); return; } - INIT_RREGS_w(d, s); - CMP_wwEX(d, s, EX_SXTH); - EXIT_REGS(d,s); + INIT_RREGS_w(d, s); + CMP_wwEX(d, s, EX_SXTH); + EXIT_REGS(d,s); - flags_carry_inverted = true; + flags_carry_inverted = true; } MENDFUNC(2,jff_CMPA_w,(RR2 d, RR2 s)) MIDFUNC(2,jff_CMPA_l_imm,(RR4 d, IM32 v)) { - d = readreg(d); + d = readreg(d); - LOAD_U32(REG_WORK1, v); + LOAD_U32(REG_WORK1, v); CMP_ww(d, REG_WORK1); - flags_carry_inverted = true; + flags_carry_inverted = true; unlock2(d); } MENDFUNC(2,jff_CMPA_l_imm,(RR4 d, IM32 v)) @@ -2936,7 +2936,7 @@ MIDFUNC(2,jff_CMPA_l,(RR4 d, RR4 s)) CMP_ww(d, s); - flags_carry_inverted = true; + flags_carry_inverted = true; EXIT_REGS(d,s); } MENDFUNC(2,jff_CMPA_l,(RR4 d, RR4 s)) @@ -2947,42 +2947,42 @@ MENDFUNC(2,jff_CMPA_l,(RR4 d, RR4 s)) */ MIDFUNC(2,jff_DBCC,(RW4 d, IM8 cc)) { - d = rmw(d); - - FIX_INVERTED_CARRY + d = rmw(d); - // If cc true -> no branch, so we have to clear ARM_C_FLAG + FIX_INVERTED_CARRY + + // If cc true -> no branch, so we have to clear ARM_C_FLAG MOV_xish(REG_WORK1, 0x2000, 16); // set C flag MOV_xi(REG_WORK2, 0); - switch(cc) { - case 9: // LS - CSEL_xxxc(REG_WORK1, REG_WORK2, REG_WORK1, NATIVE_CC_EQ); - CSEL_xxxc(REG_WORK1, REG_WORK2, REG_WORK1, NATIVE_CC_CS); - break; - - case 8: // HI - MOV_xish(REG_WORK3, 0x2000, 16); - CSEL_xxxc(REG_WORK1, REG_WORK2, REG_WORK1, NATIVE_CC_CC); - CSEL_xxxc(REG_WORK1, REG_WORK3, REG_WORK1, NATIVE_CC_EQ); - break; - - default: - CSEL_xxxc(REG_WORK1, REG_WORK2, REG_WORK1, cc); - break; - } - clobber_flags(); + switch(cc) { + case 9: // LS + CSEL_xxxc(REG_WORK1, REG_WORK2, REG_WORK1, NATIVE_CC_EQ); + CSEL_xxxc(REG_WORK1, REG_WORK2, REG_WORK1, NATIVE_CC_CS); + break; + + case 8: // HI + MOV_xish(REG_WORK3, 0x2000, 16); + CSEL_xxxc(REG_WORK1, REG_WORK2, REG_WORK1, NATIVE_CC_CC); + CSEL_xxxc(REG_WORK1, REG_WORK3, REG_WORK1, NATIVE_CC_EQ); + break; + + default: + CSEL_xxxc(REG_WORK1, REG_WORK2, REG_WORK1, cc); + break; + } + clobber_flags(); MSR_NZCV_x(REG_WORK1); - BCC_i(4); // If cc true -> no sub - - // sub (d, 1) - LSL_wwi(REG_WORK2, d, 16); + BCC_i(4); // If cc true -> no sub + + // sub (d, 1) + LSL_wwi(REG_WORK2, d, 16); SUBS_wwish(REG_WORK2, REG_WORK2, 0x10, 1); BFXIL_xxii(d, REG_WORK2, 16, 16); - - // caller can now use register_branch(v1, v2, NATIVE_CC_CS); - - unlock2(d); + + // caller can now use register_branch(v1, v2, NATIVE_CC_CS); + + unlock2(d); } MENDFUNC(2,jff_DBCC,(RW4 d, IM8 cc)) @@ -2999,49 +2999,49 @@ MENDFUNC(2,jff_DBCC,(RW4 d, IM8 cc)) MIDFUNC(2,jnf_DIVU,(RW4 d, RR4 s)) { int init_regs_used = 0; - int targetIsReg; - int s_is_d; + int targetIsReg; + int s_is_d; if (isconst(s) && (uae_u16)live.state[s].val != 0) { - uae_u16 tmp = (uae_u16)live.state[s].val; - d = rmw(d); - UNSIGNED16_IMM_2_REG(REG_WORK3, tmp); + uae_u16 tmp = (uae_u16)live.state[s].val; + d = rmw(d); + UNSIGNED16_IMM_2_REG(REG_WORK3, tmp); } else { - targetIsReg = (d < 16); - s_is_d = (s == d); - if(!s_is_d) - s = readreg(s); - d = rmw(d); - if(s_is_d) - s = d; - init_regs_used = 1; - - UNSIGNED16_REG_2_REG(REG_WORK3, s); - CBNZ_wi(REG_WORK3, 4); // src is not 0 - - // Signal exception 5 - MOV_wi(REG_WORK1, 5); - uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); - STR_wXi(REG_WORK1, R_REGSTRUCT, idx); - B_i(7); // end_of_op - } + targetIsReg = (d < 16); + s_is_d = (s == d); + if(!s_is_d) + s = readreg(s); + d = rmw(d); + if(s_is_d) + s = d; + init_regs_used = 1; + + UNSIGNED16_REG_2_REG(REG_WORK3, s); + CBNZ_wi(REG_WORK3, 4); // src is not 0 - // src is not 0 + // Signal exception 5 + MOV_wi(REG_WORK1, 5); + uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); + STR_wXi(REG_WORK1, R_REGSTRUCT, idx); + B_i(7); // end_of_op + } + + // src is not 0 UDIV_www(REG_WORK1, d, REG_WORK3); - LSR_wwi(REG_WORK2, REG_WORK1, 16); // if result of this is not 0, DIVU overflows -> no result - CBNZ_wi(REG_WORK2, 4); - - // Here we have to calc remainder - MSUB_wwww(REG_WORK2, REG_WORK1, REG_WORK3, d); - LSL_wwi(d, REG_WORK2, 16); - BFI_wwii(d, REG_WORK1, 0, 16); - // end_of_op + LSR_wwi(REG_WORK2, REG_WORK1, 16); // if result of this is not 0, DIVU overflows -> no result + CBNZ_wi(REG_WORK2, 4); + + // Here we have to calc remainder + MSUB_wwww(REG_WORK2, REG_WORK1, REG_WORK3, d); + LSL_wwi(d, REG_WORK2, 16); + BFI_wwii(d, REG_WORK1, 0, 16); + // end_of_op if (init_regs_used) { - EXIT_REGS(d, s); - } else { - unlock2(d); - } + EXIT_REGS(d, s); + } else { + unlock2(d); + } } MENDFUNC(2,jnf_DIVU,(RW4 d, R4 s)) @@ -3049,78 +3049,78 @@ MIDFUNC(2,jff_DIVU,(RW4 d, RR4 s)) { uae_u32* branchadd; int init_regs_used = 0; - int targetIsReg; - int s_is_d; + int targetIsReg; + int s_is_d; if (isconst(s) && (uae_u16)live.state[s].val != 0) { - uae_u16 tmp = (uae_u16)live.state[s].val; - d = rmw(d); - UNSIGNED16_IMM_2_REG(REG_WORK3, tmp); + uae_u16 tmp = (uae_u16)live.state[s].val; + d = rmw(d); + UNSIGNED16_IMM_2_REG(REG_WORK3, tmp); } else { - targetIsReg = (d < 16); - s_is_d = (s == d); - if(!s_is_d) - s = readreg(s); - d = rmw(d); - if(s_is_d) - s = d; - init_regs_used = 1; - - UNSIGNED16_REG_2_REG(REG_WORK3, s); - uae_u32* branchadd_not0 = (uae_u32*)get_target(); - CBNZ_wi(REG_WORK3, 0); // src is not 0 - - // Signal exception 5 - MOV_wi(REG_WORK1, 5); - uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); - STR_wXi(REG_WORK1, R_REGSTRUCT, idx); - - // flag handling like divbyzero_special() - if (currprefs.cpu_model == 68020 || currprefs.cpu_model == 68030) { - MOV_wish(REG_WORK1, 0x5000, 16); // Set V and Z (if d >=0) + targetIsReg = (d < 16); + s_is_d = (s == d); + if(!s_is_d) + s = readreg(s); + d = rmw(d); + if(s_is_d) + s = d; + init_regs_used = 1; + + UNSIGNED16_REG_2_REG(REG_WORK3, s); + uae_u32* branchadd_not0 = (uae_u32*)get_target(); + CBNZ_wi(REG_WORK3, 0); // src is not 0 + + // Signal exception 5 + MOV_wi(REG_WORK1, 5); + uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); + STR_wXi(REG_WORK1, R_REGSTRUCT, idx); + + // flag handling like divbyzero_special() + if (currprefs.cpu_model == 68020 || currprefs.cpu_model == 68030) { + MOV_wish(REG_WORK1, 0x5000, 16); // Set V and Z (if d >=0) TBZ_wii(d, 31, 2); MOV_wish(REG_WORK1, 0x9000, 16); // Set V and N (if d < 0) - } else if (currprefs.cpu_model >= 68040) { - MRS_NZCV_x(REG_WORK1); - CLEAR_xxCflag(REG_WORK1, REG_WORK1); - } else { - // 68000/010 - MOV_wish(REG_WORK1, 0x0000, 16); - } - MSR_NZCV_x(REG_WORK1); - branchadd = (uae_u32*)get_target(); - B_i(0); // end_of_op - write_jmp_target(branchadd_not0, (uintptr)get_target()); - } + } else if (currprefs.cpu_model >= 68040) { + MRS_NZCV_x(REG_WORK1); + CLEAR_xxCflag(REG_WORK1, REG_WORK1); + } else { + // 68000/010 + MOV_wish(REG_WORK1, 0x0000, 16); + } + MSR_NZCV_x(REG_WORK1); + branchadd = (uae_u32*)get_target(); + B_i(0); // end_of_op + write_jmp_target(branchadd_not0, (uintptr)get_target()); + } - // src is not 0 + // src is not 0 UDIV_www(REG_WORK1, d, REG_WORK3); - - LSR_wwi(REG_WORK2, REG_WORK1, 16); // if result of this is not 0, DIVU overflows - CBZ_wi(REG_WORK2, 4); - // Here we handle overflow - MOV_wish(REG_WORK1, 0x9000, 16); // set V and N + + LSR_wwi(REG_WORK2, REG_WORK1, 16); // if result of this is not 0, DIVU overflows + CBZ_wi(REG_WORK2, 4); + // Here we handle overflow + MOV_wish(REG_WORK1, 0x9000, 16); // set V and N MSR_NZCV_x(REG_WORK1); - B_i(6); - - // Here we have to calc flags and remainder - LSL_wwi(REG_WORK2, REG_WORK1, 16); - TST_ww(REG_WORK2, REG_WORK2); // N and Z ok, C and V cleared - - MSUB_wwww(REG_WORK2, REG_WORK1, REG_WORK3, d); - LSL_wwi(d, REG_WORK2, 16); - BFI_wwii(d, REG_WORK1, 0, 16); - - // end_of_op - flags_carry_inverted = false; + B_i(6); + + // Here we have to calc flags and remainder + LSL_wwi(REG_WORK2, REG_WORK1, 16); + TST_ww(REG_WORK2, REG_WORK2); // N and Z ok, C and V cleared + + MSUB_wwww(REG_WORK2, REG_WORK1, REG_WORK3, d); + LSL_wwi(d, REG_WORK2, 16); + BFI_wwii(d, REG_WORK1, 0, 16); + + // end_of_op + flags_carry_inverted = false; if (init_regs_used) { - write_jmp_target(branchadd, (uintptr)get_target()); - EXIT_REGS(d, s); - } else { - unlock2(d); - } + write_jmp_target(branchadd, (uintptr)get_target()); + EXIT_REGS(d, s); + } else { + unlock2(d); + } } MENDFUNC(2,jff_DIVU,(RW4 d, RR4 s)) - + /* * DIVS * @@ -3135,65 +3135,65 @@ MIDFUNC(2,jnf_DIVS,(RW4 d, RR4 s)) { uae_u32* branchadd; int init_regs_used = 0; - int targetIsReg; - int s_is_d; - uae_s16 tmp; - if (isconst(s) && (uae_s16)live.state[s].val != 0) { - tmp = (uae_s16)live.state[s].val; - d = rmw(d); - SIGNED16_IMM_2_REG(REG_WORK3, tmp); - } else { - targetIsReg = (d < 16); - s_is_d = (s == d); - if(!s_is_d) - s = readreg(s); - d = rmw(d); - if(s_is_d) - s = d; - init_regs_used = 1; - - SIGNED16_REG_2_REG(REG_WORK3, s); - CBNZ_wi(REG_WORK3, 4); // src is not 0 - - // Signal exception 5 - MOV_wi(REG_WORK1, 5); - uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); - STR_wXi(REG_WORK1, R_REGSTRUCT, idx); - branchadd = (uae_u32*)get_target(); - B_i(0); // end_of_op - } + int targetIsReg; + int s_is_d; + uae_s16 tmp; + if (isconst(s) && (uae_s16)live.state[s].val != 0) { + tmp = (uae_s16)live.state[s].val; + d = rmw(d); + SIGNED16_IMM_2_REG(REG_WORK3, tmp); + } else { + targetIsReg = (d < 16); + s_is_d = (s == d); + if(!s_is_d) + s = readreg(s); + d = rmw(d); + if(s_is_d) + s = d; + init_regs_used = 1; + + SIGNED16_REG_2_REG(REG_WORK3, s); + CBNZ_wi(REG_WORK3, 4); // src is not 0 - // src is not 0 + // Signal exception 5 + MOV_wi(REG_WORK1, 5); + uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); + STR_wXi(REG_WORK1, R_REGSTRUCT, idx); + branchadd = (uae_u32*)get_target(); + B_i(0); // end_of_op + } + + // src is not 0 SDIV_www(REG_WORK1, d, REG_WORK3); - - // check for overflow - MOVN_wi(REG_WORK2, 0x7fff); // REG_WORK2 is now 0xffff8000 - ANDS_www(REG_WORK3, REG_WORK1, REG_WORK2); - BEQ_i(3); // positive result, no overflow + + // check for overflow + MOVN_wi(REG_WORK2, 0x7fff); // REG_WORK2 is now 0xffff8000 + ANDS_www(REG_WORK3, REG_WORK1, REG_WORK2); + BEQ_i(3); // positive result, no overflow CMP_ww(REG_WORK3, REG_WORK2); BNE_i(8); // overflow -> end_of_op - - // Here we have to calc remainder - if (init_regs_used) - SIGNED16_REG_2_REG(REG_WORK3, s); - else - SIGNED16_IMM_2_REG(REG_WORK3, tmp); - MSUB_wwww(REG_WORK2, REG_WORK1, REG_WORK3, d); // REG_WORK2 contains remainder - + + // Here we have to calc remainder + if (init_regs_used) + SIGNED16_REG_2_REG(REG_WORK3, s); + else + SIGNED16_IMM_2_REG(REG_WORK3, tmp); + MSUB_wwww(REG_WORK2, REG_WORK1, REG_WORK3, d); // REG_WORK2 contains remainder + EOR_www(REG_WORK3, REG_WORK2, d); // If sign of remainder and first operand differs, change sign of remainder TBZ_wii(REG_WORK3, 31, 2); NEG_ww(REG_WORK2, REG_WORK2); - - LSL_wwi(d, REG_WORK2, 16); - BFI_wwii(d, REG_WORK1, 0, 16); - - // end_of_op - if (init_regs_used) { - write_jmp_target(branchadd, (uintptr)get_target()); - EXIT_REGS(d, s); - } else { - unlock2(d); - } + + LSL_wwi(d, REG_WORK2, 16); + BFI_wwii(d, REG_WORK1, 0, 16); + + // end_of_op + if (init_regs_used) { + write_jmp_target(branchadd, (uintptr)get_target()); + EXIT_REGS(d, s); + } else { + unlock2(d); + } } MENDFUNC(2,jnf_DIVS,(RW4 d, RR4 s)) @@ -3201,222 +3201,222 @@ MIDFUNC(2,jff_DIVS,(RW4 d, RR4 s)) { uae_u32* branchadd; int init_regs_used = 0; - int targetIsReg; - int s_is_d; - uae_s16 tmp; - if (isconst(s) && (uae_s16)live.state[s].val != 0) { - tmp = (uae_s16)live.state[s].val; - d = rmw(d); - SIGNED16_IMM_2_REG(REG_WORK3, tmp); - } else { - targetIsReg = (d < 16); - s_is_d = (s == d); - if(!s_is_d) - s = readreg(s); - d = rmw(d); - if(s_is_d) - s = d; - init_regs_used = 1; - - SIGNED16_REG_2_REG(REG_WORK3, s); - uae_u32* branchadd_not0 = (uae_u32*)get_target(); - CBNZ_wi(REG_WORK3, 0); // src is not 0 - - // Signal exception 5 - MOV_wi(REG_WORK1, 5); - uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); - STR_wXi(REG_WORK1, R_REGSTRUCT, idx); - - // flag handling like divbyzero_special() - if (currprefs.cpu_model == 68020 || currprefs.cpu_model == 68030) { - MOV_wish(REG_WORK1, 0x4000, 16); // Set Z - } else if (currprefs.cpu_model >= 68040) { - MRS_NZCV_x(REG_WORK1); - CLEAR_xxCflag(REG_WORK1, REG_WORK1); - } else { - // 68000/010 - MOV_wish(REG_WORK1, 0x0000, 16); - } - - MSR_NZCV_x(REG_WORK1); - branchadd = (uae_u32*)get_target(); - B_i(0); // end_of_op - write_jmp_target(branchadd_not0, (uintptr)get_target()); - } + int targetIsReg; + int s_is_d; + uae_s16 tmp; + if (isconst(s) && (uae_s16)live.state[s].val != 0) { + tmp = (uae_s16)live.state[s].val; + d = rmw(d); + SIGNED16_IMM_2_REG(REG_WORK3, tmp); + } else { + targetIsReg = (d < 16); + s_is_d = (s == d); + if(!s_is_d) + s = readreg(s); + d = rmw(d); + if(s_is_d) + s = d; + init_regs_used = 1; + + SIGNED16_REG_2_REG(REG_WORK3, s); + uae_u32* branchadd_not0 = (uae_u32*)get_target(); + CBNZ_wi(REG_WORK3, 0); // src is not 0 + + // Signal exception 5 + MOV_wi(REG_WORK1, 5); + uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); + STR_wXi(REG_WORK1, R_REGSTRUCT, idx); + + // flag handling like divbyzero_special() + if (currprefs.cpu_model == 68020 || currprefs.cpu_model == 68030) { + MOV_wish(REG_WORK1, 0x4000, 16); // Set Z + } else if (currprefs.cpu_model >= 68040) { + MRS_NZCV_x(REG_WORK1); + CLEAR_xxCflag(REG_WORK1, REG_WORK1); + } else { + // 68000/010 + MOV_wish(REG_WORK1, 0x0000, 16); + } - // src is not 0 + MSR_NZCV_x(REG_WORK1); + branchadd = (uae_u32*)get_target(); + B_i(0); // end_of_op + write_jmp_target(branchadd_not0, (uintptr)get_target()); + } + + // src is not 0 SDIV_www(REG_WORK1, d, REG_WORK3); - // check for overflow - MOVN_wi(REG_WORK2, 0x7fff); // REG_WORK2 is now 0xffff8000 - ANDS_www(REG_WORK3, REG_WORK1, REG_WORK2); - BEQ_i(6); // positive result, no overflow + // check for overflow + MOVN_wi(REG_WORK2, 0x7fff); // REG_WORK2 is now 0xffff8000 + ANDS_www(REG_WORK3, REG_WORK1, REG_WORK2); + BEQ_i(6); // positive result, no overflow CMP_ww(REG_WORK3, REG_WORK2); BEQ_i(4); // no overflow - - // Here we handle overflow - MOV_wish(REG_WORK1, 0x9000, 16); // set V and N + + // Here we handle overflow + MOV_wish(REG_WORK1, 0x9000, 16); // set V and N MSR_NZCV_x(REG_WORK1); - B_i(10); - - // calc flags - LSL_wwi(REG_WORK2, REG_WORK1, 16); - TST_ww(REG_WORK2, REG_WORK2); // N and Z ok, C and V cleared - - // calc remainder - if (init_regs_used) - SIGNED16_REG_2_REG(REG_WORK3, s); - else - SIGNED16_IMM_2_REG(REG_WORK3, tmp); + B_i(10); + + // calc flags + LSL_wwi(REG_WORK2, REG_WORK1, 16); + TST_ww(REG_WORK2, REG_WORK2); // N and Z ok, C and V cleared + + // calc remainder + if (init_regs_used) + SIGNED16_REG_2_REG(REG_WORK3, s); + else + SIGNED16_IMM_2_REG(REG_WORK3, tmp); MSUB_wwww(REG_WORK2, REG_WORK1, REG_WORK3, d); // REG_WORK2 contains remainder EOR_www(REG_WORK3, REG_WORK2, d); // If sign of remainder and first operand differs, change sign of remainder TBZ_wii(REG_WORK3, 31, 2); NEG_ww(REG_WORK2, REG_WORK2); - - LSL_wwi(d, REG_WORK2, 16); - BFI_wwii(d, REG_WORK1, 0, 16); - - // end_of_op - flags_carry_inverted = false; - if (init_regs_used) { - write_jmp_target(branchadd, (uintptr)get_target()); - EXIT_REGS(d, s); - } else { - unlock2(d); - } + + LSL_wwi(d, REG_WORK2, 16); + BFI_wwii(d, REG_WORK1, 0, 16); + + // end_of_op + flags_carry_inverted = false; + if (init_regs_used) { + write_jmp_target(branchadd, (uintptr)get_target()); + EXIT_REGS(d, s); + } else { + unlock2(d); + } } MENDFUNC(2,jff_DIVS,(RW4 d, RR4 s)) MIDFUNC(3,jnf_DIVLU32,(RW4 d, RR4 s1, W4 rem)) { - s1 = readreg(s1); - d = rmw(d); - rem = writereg(rem); + s1 = readreg(s1); + d = rmw(d); + rem = writereg(rem); - CBNZ_wi(s1, 4); // src is not 0 + CBNZ_wi(s1, 4); // src is not 0 - // Signal exception 5 + // Signal exception 5 MOV_wi(REG_WORK1, 5); - uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); - STR_wXi(REG_WORK1, R_REGSTRUCT, idx); + uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); + STR_wXi(REG_WORK1, R_REGSTRUCT, idx); B_i(4); // end_of_op - // src is not 0 + // src is not 0 UDIV_www(REG_WORK1, d, s1); - // Here we have to calc remainder - MSUB_wwww(rem, s1, REG_WORK1, d); - MOV_ww(d, REG_WORK1); + // Here we have to calc remainder + MSUB_wwww(rem, s1, REG_WORK1, d); + MOV_ww(d, REG_WORK1); // end_of_op - - unlock2(rem); - unlock2(d); - unlock2(s1); + + unlock2(rem); + unlock2(d); + unlock2(s1); } MENDFUNC(3,jnf_DIVLU32,(RW4 d, RR4 s1, W4 rem)) MIDFUNC(3,jff_DIVLU32,(RW4 d, RR4 s1, W4 rem)) { - s1 = readreg(s1); - d = rmw(d); - rem = writereg(rem); + s1 = readreg(s1); + d = rmw(d); + rem = writereg(rem); - CBNZ_wi(s1, 4); // src is not 0 + CBNZ_wi(s1, 4); // src is not 0 - // Signal exception 5 + // Signal exception 5 MOV_wi(REG_WORK1, 5); - uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); - STR_wXi(REG_WORK1, R_REGSTRUCT, idx); - + uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); + STR_wXi(REG_WORK1, R_REGSTRUCT, idx); + B_i(5); // end_of_op - // src is not 0 + // src is not 0 UDIV_www(REG_WORK1, d, s1); - // Here we have to calc flags and remainder - TST_ww(REG_WORK1, REG_WORK1); - - MSUB_wwww(rem, s1, REG_WORK1, d); - MOV_ww(d, REG_WORK1); + // Here we have to calc flags and remainder + TST_ww(REG_WORK1, REG_WORK1); - // end_of_op + MSUB_wwww(rem, s1, REG_WORK1, d); + MOV_ww(d, REG_WORK1); - flags_carry_inverted = false; - unlock2(rem); - unlock2(d); - unlock2(s1); + // end_of_op + + flags_carry_inverted = false; + unlock2(rem); + unlock2(d); + unlock2(s1); } MENDFUNC(3,jff_DIVLU32,(RW4 d, RR4 s1, W4 rem)) MIDFUNC(3,jnf_DIVLS32,(RW4 d, RR4 s1, W4 rem)) { - s1 = readreg(s1); - d = rmw(d); - rem = writereg(rem); + s1 = readreg(s1); + d = rmw(d); + rem = writereg(rem); - CBNZ_wi(s1, 4); // src is not 0 + CBNZ_wi(s1, 4); // src is not 0 - // Signal exception 5 + // Signal exception 5 MOV_wi(REG_WORK1, 5); - uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); - STR_wXi(REG_WORK1, R_REGSTRUCT, idx); + uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); + STR_wXi(REG_WORK1, R_REGSTRUCT, idx); B_i(7); // end_of_op - // src is not 0 + // src is not 0 SDIV_www(REG_WORK1, d, s1); - // Here we have to calc remainder - MSUB_wwww(rem, s1, REG_WORK1, d); + // Here we have to calc remainder + MSUB_wwww(rem, s1, REG_WORK1, d); EOR_www(REG_WORK3, rem, d); // If sign of remainder and first operand differs, change sign of remainder TBZ_wii(REG_WORK3, 31, 2); NEG_ww(rem, rem); - - MOV_ww(d, REG_WORK1); - // end_of_op - - unlock2(rem); - unlock2(d); - unlock2(s1); + MOV_ww(d, REG_WORK1); + + // end_of_op + + unlock2(rem); + unlock2(d); + unlock2(s1); } MENDFUNC(3,jnf_DIVLS32,(RW4 d, RR4 s1, W4 rem)) MIDFUNC(3,jff_DIVLS32,(RW4 d, RR4 s1, W4 rem)) { - s1 = readreg(s1); - d = rmw(d); - rem = writereg(rem); + s1 = readreg(s1); + d = rmw(d); + rem = writereg(rem); - CBNZ_wi(s1, 4); // src is not 0 + CBNZ_wi(s1, 4); // src is not 0 - // Signal exception 5 + // Signal exception 5 MOV_wi(REG_WORK1, 5); - uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); - STR_wXi(REG_WORK1, R_REGSTRUCT, idx); + uintptr idx = (uintptr)(®s.jit_exception) - (uintptr)(®s); + STR_wXi(REG_WORK1, R_REGSTRUCT, idx); B_i(8); // end_of_op - // src is not 0 + // src is not 0 SDIV_www(REG_WORK1, d, s1); - // Here we have to calc remainder - MSUB_wwww(rem, s1, REG_WORK1, d); + // Here we have to calc remainder + MSUB_wwww(rem, s1, REG_WORK1, d); EOR_www(REG_WORK3, rem, d); // If sign of remainder and first operand differs, change sign of remainder TBZ_wii(REG_WORK3, 31, 2); NEG_ww(REG_WORK2, REG_WORK2); - - MOV_ww(d, REG_WORK1); - TST_ww(d, d); - - // end_of_op - - flags_carry_inverted = false; - unlock2(rem); - unlock2(d); - unlock2(s1); + + MOV_ww(d, REG_WORK1); + TST_ww(d, d); + + // end_of_op + + flags_carry_inverted = false; + unlock2(rem); + unlock2(d); + unlock2(s1); } MENDFUNC(3,jff_DIVLS32,(RW4 d, RR4 s1, W4 rem)) @@ -3437,7 +3437,7 @@ MIDFUNC(2,jnf_EOR_b_imm,(RW1 d, IM8 v)) { INIT_REG_b(d); - MOV_xi(REG_WORK1, (v & 0xff)); + MOV_xi(REG_WORK1, (v & 0xff)); EOR_www(d, d, REG_WORK1); unlock2(d); @@ -3468,8 +3468,8 @@ MIDFUNC(2,jnf_EOR_w_imm,(RW2 d, IM16 v)) { INIT_REG_w(d); - MOV_xi(REG_WORK1, v & 0xffff); - EOR_www(d, d, REG_WORK1); + MOV_xi(REG_WORK1, v & 0xffff); + EOR_www(d, d, REG_WORK1); unlock2(d); } @@ -3485,7 +3485,7 @@ MIDFUNC(2,jnf_EOR_w,(RW2 d, RR2 s)) INIT_REGS_w(d, s); EOR_www(REG_WORK1, d, s); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); EXIT_REGS(d, s); } @@ -3493,14 +3493,14 @@ MENDFUNC(2,jnf_EOR_w,(RW2 d, RR2 s)) MIDFUNC(2,jnf_EOR_l_imm,(RW4 d, IM32 v)) { - if(isconst(d)) { - live.state[d].val = live.state[d].val ^ v; - return; - } - + if(isconst(d)) { + live.state[d].val = live.state[d].val ^ v; + return; + } + d = rmw(d); - LOAD_U32(REG_WORK1, v); + LOAD_U32(REG_WORK1, v); EOR_www(d, d, REG_WORK1); unlock2(d); @@ -3537,7 +3537,7 @@ MIDFUNC(2,jff_EOR_b_imm,(RW1 d, IM8 v)) TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_EOR_b_imm,(RW1 d, IM8 v)) @@ -3562,7 +3562,7 @@ MIDFUNC(2,jff_EOR_b,(RW1 d, RR1 s)) TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_EOR_b,(RW1 d, RR1 s)) @@ -3575,14 +3575,14 @@ MIDFUNC(2,jff_EOR_w_imm,(RW2 d, IM16 v)) SIGNED16_IMM_2_REG(REG_WORK2, v); if(targetIsReg) { EOR_www(REG_WORK1, REG_WORK1, REG_WORK2); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); TST_ww(REG_WORK1, REG_WORK1); } else { EOR_www(d, REG_WORK1, REG_WORK2); TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_EOR_w_imm,(RW2 d, IM16 v)) @@ -3600,14 +3600,14 @@ MIDFUNC(2,jff_EOR_w,(RW2 d, RR2 s)) SIGNED16_REG_2_REG(REG_WORK2, s); if(targetIsReg) { EOR_www(REG_WORK1, REG_WORK1, REG_WORK2); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); TST_ww(REG_WORK1, REG_WORK1); } else { EOR_www(d, REG_WORK1, REG_WORK2); TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_EOR_w,(RW2 d, RR2 s)) @@ -3616,11 +3616,11 @@ MIDFUNC(2,jff_EOR_l_imm,(RW4 d, IM32 v)) { d = rmw(d); - LOAD_U32(REG_WORK1, v); + LOAD_U32(REG_WORK1, v); EOR_www(d, d, REG_WORK1); TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_EOR_l_imm,(RW4 d, IM32 v)) @@ -3637,7 +3637,7 @@ MIDFUNC(2,jff_EOR_l,(RW4 d, RR4 s)) EOR_www(d, d, s); TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_EOR_l,(RW4 d, RR4 s)) @@ -3658,10 +3658,10 @@ MENDFUNC(2,jff_EOR_l,(RW4 d, RR4 s)) MIDFUNC(2,jff_EORSR,(IM32 s, IM8 x)) { MRS_NZCV_x(REG_WORK1); - if(flags_carry_inverted) { - EOR_xxCflag(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; - } + if(flags_carry_inverted) { + EOR_xxCflag(REG_WORK1, REG_WORK1); + flags_carry_inverted = false; + } MOV_xish(REG_WORK2, (s >> 16), 16); EOR_www(REG_WORK1, REG_WORK1, REG_WORK2); MSR_NZCV_x(REG_WORK1); @@ -3713,7 +3713,7 @@ MIDFUNC(1,jnf_EXT_w,(RW4 d)) SIGNED8_REG_2_REG(REG_WORK1, d); BFI_xxii(d, REG_WORK1, 0, 16); - + unlock2(d); } MENDFUNC(1,jnf_EXT_w,(RW4 d)) @@ -3736,17 +3736,17 @@ MENDFUNC(1,jnf_EXT_l,(RW4 d)) MIDFUNC(1,jff_EXT_b,(RW4 d)) { if (isconst(d)) { - uae_u8 tmp = (uae_u8)live.state[d].val; + uae_u8 tmp = (uae_u8)live.state[d].val; d = writereg(d); SIGNED8_IMM_2_REG(d, tmp); } else { - d = rmw(d); - SIGNED8_REG_2_REG(d, d); + d = rmw(d); + SIGNED8_REG_2_REG(d, d); } TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(1,jff_EXT_b,(RW4 d)) @@ -3754,43 +3754,43 @@ MENDFUNC(1,jff_EXT_b,(RW4 d)) MIDFUNC(1,jff_EXT_w,(RW4 d)) { if (isconst(d)) { - uae_u8 tmp = (uae_u8)live.state[d].val; - d = writereg(d); + uae_u8 tmp = (uae_u8)live.state[d].val; + d = writereg(d); SIGNED8_IMM_2_REG(REG_WORK1, tmp); } else { - d = rmw(d); - SIGNED8_REG_2_REG(REG_WORK1, d); - } + d = rmw(d); + SIGNED8_REG_2_REG(REG_WORK1, d); + } TST_ww(REG_WORK1, REG_WORK1); BFI_xxii(d, REG_WORK1, 0, 16); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(1,jff_EXT_w,(RW4 d)) MIDFUNC(1,jff_EXT_l,(RW4 d)) { - if(isconst(d)) { + if(isconst(d)) { live.state[d].val = (uae_s32)(uae_s16)live.state[d].val; - uae_u32 f = 0; - if(((uae_s32)live.state[d].val) == 0) - f |= (ARM_Z_FLAG >> 16); - if(((uae_s32)live.state[d].val) < 0) - f |= (ARM_N_FLAG >> 16); - MOV_xish(REG_WORK1, f, 16); - MSR_NZCV_x(REG_WORK1); - - flags_carry_inverted = false; - return; - } + uae_u32 f = 0; + if(((uae_s32)live.state[d].val) == 0) + f |= (ARM_Z_FLAG >> 16); + if(((uae_s32)live.state[d].val) < 0) + f |= (ARM_N_FLAG >> 16); + MOV_xish(REG_WORK1, f, 16); + MSR_NZCV_x(REG_WORK1); + + flags_carry_inverted = false; + return; + } - d = rmw(d); - SIGNED16_REG_2_REG(d, d); + d = rmw(d); + SIGNED16_REG_2_REG(d, d); TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(1,jff_EXT_l,(RW4 d)) @@ -3812,56 +3812,56 @@ MENDFUNC(1,jff_EXT_l,(RW4 d)) */ MIDFUNC(2,jnf_LSL_b_imm,(RW1 d, IM8 i)) { - if(i) { + if(i) { if (isconst(d)) { live.state[d].val = (live.state[d].val & 0xffffff00) | ((live.state[d].val << i) & 0x000000ff); return; } - + INIT_REG_b(d); - - if(i > 31) - i = 31; - LSL_wwi(REG_WORK1, d, i); - BFI_wwii(d, REG_WORK1, 0, 8); - + + if(i > 31) + i = 31; + LSL_wwi(REG_WORK1, d, i); + BFI_wwii(d, REG_WORK1, 0, 8); + unlock2(d); - } + } } MENDFUNC(2,jnf_LSL_b_imm,(RW1 d, IM8 i)) MIDFUNC(2,jnf_LSL_w_imm,(RW2 d, IM8 i)) { - if(i) { + if(i) { if (isconst(d)) { live.state[d].val = (live.state[d].val & 0xffff0000) | ((live.state[d].val << i) & 0x0000ffff); return; } INIT_REG_w(d); - - if(i > 31) - i = 31; - LSL_wwi(REG_WORK1, d, i); - BFI_wwii(d, REG_WORK1, 0, 16); - + + if(i > 31) + i = 31; + LSL_wwi(REG_WORK1, d, i); + BFI_wwii(d, REG_WORK1, 0, 16); + unlock2(d); - } + } } MENDFUNC(2,jnf_LSL_w_imm,(RW2 d, IM8 i)) MIDFUNC(2,jnf_LSL_l_imm,(RW4 d, IM8 i)) { - if(i) { + if(i) { if (isconst(d)) { live.state[d].val = live.state[d].val << i; return; } d = rmw(d); - - LSL_wwi(d, d, i); - + + LSL_wwi(d, d, i); + unlock2(d); } } @@ -3876,9 +3876,9 @@ MIDFUNC(2,jnf_LSL_b_reg,(RW1 d, RR4 i)) INIT_REGS_b(d, i); - AND_ww3f(REG_WORK1, i); + AND_ww3f(REG_WORK1, i); LSL_www(REG_WORK1, d, REG_WORK1); - BFI_wwii(d, REG_WORK1, 0, 8); + BFI_wwii(d, REG_WORK1, 0, 8); EXIT_REGS(d, i); } @@ -3895,7 +3895,7 @@ MIDFUNC(2,jnf_LSL_w_reg,(RW2 d, RR4 i)) AND_ww3f(REG_WORK1, i); LSL_www(REG_WORK1, d, REG_WORK1); - BFI_wwii(d, REG_WORK1, 0, 16); + BFI_wwii(d, REG_WORK1, 0, 16); EXIT_REGS(d, i); } @@ -3924,27 +3924,27 @@ MIDFUNC(2,jff_LSL_b_imm,(RW1 d, IM8 i)) { if (i) { d = rmw(d); - if(i >= 8) - MOV_wi(REG_WORK3, 0); - else - LSL_wwi(REG_WORK3, d, i + 24); + if(i >= 8) + MOV_wi(REG_WORK3, 0); + else + LSL_wwi(REG_WORK3, d, i + 24); TST_ww(REG_WORK3, REG_WORK3); - + if(i <= 8) { - TBZ_wii(d, (8 - i), 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - flags_carry_inverted = false; - DUPLICACTE_CARRY - - BFXIL_xxii(d, REG_WORK3, 24, 8); + TBZ_wii(d, (8 - i), 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + flags_carry_inverted = false; + DUPLICACTE_CARRY + + BFXIL_xxii(d, REG_WORK3, 24, 8); } else { d = readreg(d); LSL_wwi(REG_WORK3, d, 24); TST_ww(REG_WORK3, REG_WORK3); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -3955,27 +3955,27 @@ MIDFUNC(2,jff_LSL_w_imm,(RW2 d, IM8 i)) { if (i) { d = rmw(d); - if(i >= 16) - MOV_wi(REG_WORK3, 0); - else - LSL_wwi(REG_WORK3, d, i + 16); + if(i >= 16) + MOV_wi(REG_WORK3, 0); + else + LSL_wwi(REG_WORK3, d, i + 16); TST_ww(REG_WORK3, REG_WORK3); if(i <= 16) { - TBZ_wii(d, (16 - i), 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - flags_carry_inverted = false; + TBZ_wii(d, (16 - i), 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + flags_carry_inverted = false; DUPLICACTE_CARRY - BFXIL_xxii(d, REG_WORK3, 16, 16); + BFXIL_xxii(d, REG_WORK3, 16, 16); } else { d = readreg(d); LSL_wwi(REG_WORK3, d, 16); TST_ww(REG_WORK3, REG_WORK3); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -3985,26 +3985,26 @@ MENDFUNC(2,jff_LSL_w_imm,(RW2 d, IM8 i)) MIDFUNC(2,jff_LSL_l_imm,(RW4 d, IM8 i)) { if (i) { - d = rmw(d); - if(i >= 32) - MOV_wi(REG_WORK3, 0); - else - LSL_wwi(REG_WORK3, d, i); + d = rmw(d); + if(i >= 32) + MOV_wi(REG_WORK3, 0); + else + LSL_wwi(REG_WORK3, d, i); TST_ww(REG_WORK3, REG_WORK3); - if(i <= 32) { - TBZ_wii(d, (32 - i), 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - flags_carry_inverted = false; + if(i <= 32) { + TBZ_wii(d, (32 - i), 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + flags_carry_inverted = false; DUPLICACTE_CARRY MOV_ww(d, REG_WORK3); } else { d = readreg(d); TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -4013,35 +4013,35 @@ MENDFUNC(2,jff_LSL_l_imm,(RW4 d, IM8 i)) MIDFUNC(2,jff_LSL_b_reg,(RW1 d, RR4 i)) { - if (isconst(i)) { - COMPCALL(jff_LSL_b_imm)(d, live.state[i].val & 0x3f); - return; - } - + if (isconst(i)) { + COMPCALL(jff_LSL_b_imm)(d, live.state[i].val & 0x3f); + return; + } + INIT_REGS_b(d, i); LSL_wwi(REG_WORK3, d, 24); ANDS_ww3f(REG_WORK1, i); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); BEQ_i(0); // No shift -> X flag unchanged, C cleared - - // shift count > 0 - LSL_xxx(REG_WORK2, REG_WORK3, REG_WORK1); - BFXIL_xxii(d, REG_WORK2, 24, 8); // result is ready - TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared - + + // shift count > 0 + LSL_xxx(REG_WORK2, REG_WORK3, REG_WORK1); + BFXIL_xxii(d, REG_WORK2, 24, 8); // result is ready + TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared + // Calculate C Flag - TBZ_xii(REG_WORK2, 32, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - - flags_carry_inverted = false; + TBZ_xii(REG_WORK2, 32, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + + flags_carry_inverted = false; DUPLICACTE_CARRY B_i(2); - // No shift - write_jmp_target(branchadd, (uintptr)get_target()); + // No shift + write_jmp_target(branchadd, (uintptr)get_target()); TST_ww(REG_WORK3, REG_WORK3); EXIT_REGS(d, i); @@ -4050,34 +4050,34 @@ MENDFUNC(2,jff_LSL_b_reg,(RW1 d, RR4 i)) MIDFUNC(2,jff_LSL_w_reg,(RW2 d, RR4 i)) { - if (isconst(i)) { - COMPCALL(jff_LSL_w_imm)(d, live.state[i].val & 0x3f); - return; - } + if (isconst(i)) { + COMPCALL(jff_LSL_w_imm)(d, live.state[i].val & 0x3f); + return; + } INIT_REGS_w(d, i); LSL_wwi(REG_WORK3, d, 16); ANDS_ww3f(REG_WORK1, i); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); BEQ_i(0); // No shift -> X flag unchanged, C cleared LSL_xxx(REG_WORK2, REG_WORK3, REG_WORK1); - BFXIL_xxii(d, REG_WORK2, 16, 16); // result is ready - TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared - + BFXIL_xxii(d, REG_WORK2, 16, 16); // result is ready + TST_ww(REG_WORK2, REG_WORK2); // NZ correct, VC cleared + // Calculate C Flag - TBZ_xii(REG_WORK2, 32, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - - flags_carry_inverted = false; + TBZ_xii(REG_WORK2, 32, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + + flags_carry_inverted = false; DUPLICACTE_CARRY B_i(2); - // No shift - write_jmp_target(branchadd, (uintptr)get_target()); + // No shift + write_jmp_target(branchadd, (uintptr)get_target()); TST_ww(REG_WORK3, REG_WORK3); EXIT_REGS(d, i); @@ -4086,32 +4086,32 @@ MENDFUNC(2,jff_LSL_w_reg,(RW2 d, RR4 i)) MIDFUNC(2,jff_LSL_l_reg,(RW4 d, RR4 i)) { - if (isconst(i)) { - COMPCALL(jff_LSL_l_imm)(d, live.state[i].val & 0x3f); - return; - } + if (isconst(i)) { + COMPCALL(jff_LSL_l_imm)(d, live.state[i].val & 0x3f); + return; + } INIT_REGS_l(d, i); ANDS_ww3f(REG_WORK1, i); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); BEQ_i(0); // No shift -> X flag unchanged, C cleared LSL_xxx(d, d, REG_WORK1); - TST_ww(d, d); // NZ correct, VC cleared - + TST_ww(d, d); // NZ correct, VC cleared + // Calculate C Flag - TBZ_xii(d, 32, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - - flags_carry_inverted = false; + TBZ_xii(d, 32, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + + flags_carry_inverted = false; DUPLICACTE_CARRY B_i(2); - // No shift - write_jmp_target(branchadd, (uintptr)get_target()); + // No shift + write_jmp_target(branchadd, (uintptr)get_target()); TST_ww(d, d); EXIT_REGS(d, i); @@ -4151,18 +4151,18 @@ MIDFUNC(1,jff_LSLW,(RW2 d)) { d = rmw(d); - LSL_wwi(REG_WORK1, d, 17); - TST_ww(REG_WORK1, REG_WORK1); + LSL_wwi(REG_WORK1, d, 17); + TST_ww(REG_WORK1, REG_WORK1); - // Calculate C flag - TBZ_wii(d, 15, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + // Calculate C flag + TBZ_wii(d, 15, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); LSL_wwi(d, d, 1); - flags_carry_inverted = false; + flags_carry_inverted = false; DUPLICACTE_CARRY unlock2(d); @@ -4195,10 +4195,10 @@ MIDFUNC(2,jnf_LSR_b_imm,(RW1 d, IM8 i)) INIT_REG_b(d); UNSIGNED8_REG_2_REG(REG_WORK1, d); - if(i > 31) - i = 31; - LSR_wwi(REG_WORK1, REG_WORK1, i); - BFI_wwii(d, REG_WORK1, 0, 8); + if(i > 31) + i = 31; + LSR_wwi(REG_WORK1, REG_WORK1, i); + BFI_wwii(d, REG_WORK1, 0, 8); unlock2(d); } @@ -4216,10 +4216,10 @@ MIDFUNC(2,jnf_LSR_w_imm,(RW2 d, IM8 i)) INIT_REG_w(d); UNSIGNED16_REG_2_REG(REG_WORK1, d); - if(i > 31) - i = 31; - LSR_wwi(REG_WORK1, REG_WORK1, i); - BFI_wwii(d, REG_WORK1, 0, 16); + if(i > 31) + i = 31; + LSR_wwi(REG_WORK1, REG_WORK1, i); + BFI_wwii(d, REG_WORK1, 0, 16); unlock2(d); } @@ -4236,7 +4236,7 @@ MIDFUNC(2,jnf_LSR_l_imm,(RW4 d, IM8 i)) d = rmw(d); - LSR_wwi(d, d, i); + LSR_wwi(d, d, i); unlock2(d); } @@ -4247,28 +4247,28 @@ MIDFUNC(2,jff_LSR_b_imm,(RW1 d, IM8 i)) { if (i) { d = rmw(d); - if(i >= 8) - MOV_wi(REG_WORK1, 0); - else { - UNSIGNED8_REG_2_REG(REG_WORK1, d); - LSR_wwi(REG_WORK1, REG_WORK1, i); - } + if(i >= 8) + MOV_wi(REG_WORK1, 0); + else { + UNSIGNED8_REG_2_REG(REG_WORK1, d); + LSR_wwi(REG_WORK1, REG_WORK1, i); + } TST_ww(REG_WORK1, REG_WORK1); - if(i <= 8) { - TBZ_wii(d, i-1, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - BFI_wwii(d, REG_WORK1, 0, 8); - flags_carry_inverted = false; + if(i <= 8) { + TBZ_wii(d, i-1, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + BFI_wwii(d, REG_WORK1, 0, 8); + flags_carry_inverted = false; DUPLICACTE_CARRY } else { d = readreg(d); - SIGNED8_REG_2_REG(REG_WORK1, d); + SIGNED8_REG_2_REG(REG_WORK1, d); TST_ww(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -4279,28 +4279,28 @@ MIDFUNC(2,jff_LSR_w_imm,(RW2 d, IM8 i)) { if (i) { d = rmw(d); - if(i >= 16) - MOV_wi(REG_WORK1, 0); - else { - UNSIGNED16_REG_2_REG(REG_WORK1, d); - LSR_wwi(REG_WORK1, REG_WORK1, i); - } + if(i >= 16) + MOV_wi(REG_WORK1, 0); + else { + UNSIGNED16_REG_2_REG(REG_WORK1, d); + LSR_wwi(REG_WORK1, REG_WORK1, i); + } TST_ww(REG_WORK1, REG_WORK1); - if(i <= 16) { - TBZ_wii(d, i-1, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - BFI_wwii(d, REG_WORK1, 0, 16); - flags_carry_inverted = false; + if(i <= 16) { + TBZ_wii(d, i-1, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + BFI_wwii(d, REG_WORK1, 0, 16); + flags_carry_inverted = false; DUPLICACTE_CARRY } else { d = readreg(d); - SIGNED16_REG_2_REG(REG_WORK1, d); + SIGNED16_REG_2_REG(REG_WORK1, d); TST_ww(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -4310,23 +4310,23 @@ MENDFUNC(2,jff_LSR_w_imm,(RW2 d, IM8 i)) MIDFUNC(2,jff_LSR_l_imm,(RW4 d, IM8 i)) { if (i) { - d = rmw(d); - MOV_ww(REG_WORK1, d); + d = rmw(d); + MOV_ww(REG_WORK1, d); LSR_wwi(d, d, i); TST_ww(d, d); - if(i <= 32) { - TBZ_wii(REG_WORK1, i-1, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - flags_carry_inverted = false; + if(i <= 32) { + TBZ_wii(REG_WORK1, i-1, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + flags_carry_inverted = false; DUPLICACTE_CARRY } else { d = readreg(d); TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; } unlock2(d); @@ -4345,7 +4345,7 @@ MIDFUNC(2,jnf_LSR_b_reg,(RW1 d, RR4 i)) UNSIGNED8_REG_2_REG(REG_WORK1, d); AND_ww3f(REG_WORK2, i); LSR_www(REG_WORK1, REG_WORK1, REG_WORK2); - BFI_wwii(d, REG_WORK1, 0, 8); + BFI_wwii(d, REG_WORK1, 0, 8); EXIT_REGS(d, i); } @@ -4363,7 +4363,7 @@ MIDFUNC(2,jnf_LSR_w_reg,(RW2 d, RR4 i)) UNSIGNED16_REG_2_REG(REG_WORK1, d); AND_ww3f(REG_WORK2, i); LSR_www(REG_WORK1, REG_WORK1, REG_WORK2); - BFI_wwii(d, REG_WORK1, 0, 16); + BFI_wwii(d, REG_WORK1, 0, 16); EXIT_REGS(d, i); } @@ -4398,29 +4398,29 @@ MIDFUNC(2,jff_LSR_b_reg,(RW1 d, RR4 i)) INIT_REGS_b(d, i); ANDS_ww3f(REG_WORK1, i); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); BEQ_i(0); // No shift -> X flag unchanged - + UNSIGNED8_REG_2_REG(REG_WORK3, d); LSR_www(REG_WORK2, REG_WORK3, REG_WORK1); - BFI_wwii(d, REG_WORK2, 0, 8); + BFI_wwii(d, REG_WORK2, 0, 8); TST_ww(REG_WORK2, REG_WORK2); - + // Calculate C Flag SUB_wwi(REG_WORK2, REG_WORK1, 1); LSR_www(REG_WORK2, REG_WORK3, REG_WORK2); - TBZ_wii(REG_WORK2, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + TBZ_wii(REG_WORK2, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; DUPLICACTE_CARRY B_i(3); - // No shift - write_jmp_target(branchadd, (uintptr)get_target()); + // No shift + write_jmp_target(branchadd, (uintptr)get_target()); SIGNED8_REG_2_REG(REG_WORK2, d); // Make sure, sign is in MSB if shift count is 0 (to get correct N flag) TST_ww(REG_WORK2, REG_WORK2); @@ -4438,29 +4438,29 @@ MIDFUNC(2,jff_LSR_w_reg,(RW2 d, RR4 i)) INIT_REGS_w(d, i); ANDS_ww3f(REG_WORK1, i); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); BEQ_i(0); // No shift -> X flag unchanged UXTH_ww(REG_WORK3, d); // Shift count is not 0 -> unsigned required LSR_www(REG_WORK2, REG_WORK3, REG_WORK1); - BFI_wwii(d, REG_WORK2, 0, 16); + BFI_wwii(d, REG_WORK2, 0, 16); TST_ww(REG_WORK2, REG_WORK2); - + // Calculate C Flag SUB_wwi(REG_WORK2, REG_WORK1, 1); LSR_www(REG_WORK2, REG_WORK3, REG_WORK2); - TBZ_wii(REG_WORK2, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + TBZ_wii(REG_WORK2, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; DUPLICACTE_CARRY B_i(3); - // No shift - write_jmp_target(branchadd, (uintptr)get_target()); + // No shift + write_jmp_target(branchadd, (uintptr)get_target()); SIGNED16_REG_2_REG(REG_WORK2, d); // Make sure, sign is in MSB if shift count is 0 (to get correct N flag) TST_ww(REG_WORK2, REG_WORK2); @@ -4478,28 +4478,28 @@ MIDFUNC(2,jff_LSR_l_reg,(RW4 d, RR4 i)) INIT_REGS_l(d, i); ANDS_ww3f(REG_WORK1, i); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); BEQ_i(0); // No shift -> X flag unchanged - MOV_ww(REG_WORK3, d); + MOV_ww(REG_WORK3, d); LSR_www(d, d, REG_WORK1); TST_ww(d, d); - + // Calculate C Flag SUB_wwi(REG_WORK2, REG_WORK1, 1); LSR_www(REG_WORK2, REG_WORK3, REG_WORK2); - TBZ_wii(REG_WORK2, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + TBZ_wii(REG_WORK2, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; DUPLICACTE_CARRY B_i(2); - // No shift - write_jmp_target(branchadd, (uintptr)get_target()); + // No shift + write_jmp_target(branchadd, (uintptr)get_target()); TST_ww(d, d); EXIT_REGS(d, i); @@ -4526,7 +4526,7 @@ MIDFUNC(1,jnf_LSRW,(RW2 d)) live.state[d].val = ((live.state[d].val & 0xffff) >> 1); return; } - + d = rmw(d); UNSIGNED16_REG_2_REG(d, d); @@ -4542,15 +4542,15 @@ MIDFUNC(1,jff_LSRW,(RW2 d)) UNSIGNED16_REG_2_REG(REG_WORK3, d); LSR_wwi(d, REG_WORK3, 1); - TST_ww(d, d); + TST_ww(d, d); // Calculate C Flag - TBZ_wii(REG_WORK3, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - - flags_carry_inverted = false; + TBZ_wii(REG_WORK3, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + + flags_carry_inverted = false; DUPLICACTE_CARRY unlock2(d); @@ -4612,7 +4612,7 @@ MIDFUNC(2,jnf_MOVE_b,(W1 d, RR1 s)) INIT_REGS_b(d, s); - BFI_xxii(d, s, 0, 8); + BFI_xxii(d, s, 0, 8); EXIT_REGS(d, s); } @@ -4629,7 +4629,7 @@ MIDFUNC(2,jnf_MOVE_w,(W2 d, RR2 s)) INIT_REGS_w(d, s); - BFI_xxii(d, s, 0, 16); + BFI_xxii(d, s, 0, 16); EXIT_REGS(d, s); } @@ -4651,51 +4651,51 @@ MIDFUNC(2,jff_MOVE_b_imm,(W1 d, IM8 s)) MOV_xi(REG_WORK1, (uae_u8) s); } TST_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 8); + BFI_xxii(d, REG_WORK1, 0, 8); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_MOVE_b_imm,(W1 d, IM8 s)) MIDFUNC(2,jff_MOVE_w_imm,(W2 d, IM16 s)) { - if(isconst(d)) { + if(isconst(d)) { live.state[d].val = (live.state[d].val & 0xffff0000) | (s & 0x0000ffff); - uae_u32 f = 0; - if((uae_s16)s == 0) - f |= (ARM_Z_FLAG >> 16); - if((uae_s16)s < 0) - f |= (ARM_N_FLAG >> 16); - MOV_xish(REG_WORK1, f, 16); - MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; - return; - } + uae_u32 f = 0; + if((uae_s16)s == 0) + f |= (ARM_Z_FLAG >> 16); + if((uae_s16)s < 0) + f |= (ARM_N_FLAG >> 16); + MOV_xish(REG_WORK1, f, 16); + MSR_NZCV_x(REG_WORK1); + flags_carry_inverted = false; + return; + } d = rmw(d); SIGNED16_IMM_2_REG(REG_WORK1, (uae_u16)s); TST_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_MOVE_w_imm,(W2 d, IM16 s)) MIDFUNC(2,jff_MOVE_l_imm,(W4 d, IM32 s)) { - set_const(d, s); - uae_u32 f = 0; - if(s == 0) - f |= (ARM_Z_FLAG >> 16); - if((uae_s32)s < 0) - f |= (ARM_N_FLAG >> 16); + set_const(d, s); + uae_u32 f = 0; + if(s == 0) + f |= (ARM_Z_FLAG >> 16); + if((uae_s32)s < 0) + f |= (ARM_N_FLAG >> 16); MOV_xish(REG_WORK1, f, 16); MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; } MENDFUNC(2,jff_MOVE_l_imm,(W4 d, IM32 s)) @@ -4709,17 +4709,17 @@ MIDFUNC(2,jff_MOVE_b,(W1 d, RR1 s)) int s_is_d = (s == d); if(!s_is_d) { s = readreg(s); - d = rmw(d); - } else { + d = rmw(d); + } else { s = d = readreg(d); - } + } SIGNED8_REG_2_REG(REG_WORK1, s); TST_ww(REG_WORK1, REG_WORK1); if(!s_is_d) - BFI_xxii(d, REG_WORK1, 0, 8); + BFI_xxii(d, REG_WORK1, 0, 8); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_MOVE_b,(W1 d, RR1 s)) @@ -4734,17 +4734,17 @@ MIDFUNC(2,jff_MOVE_w,(W2 d, RR2 s)) int s_is_d = (s == d); if(!s_is_d) { s = readreg(s); - d = rmw(d); - } else { + d = rmw(d); + } else { s = d = readreg(d); - } + } SIGNED16_REG_2_REG(REG_WORK1, s); TST_ww(REG_WORK1, REG_WORK1); - if(!s_is_d) - BFI_xxii(d, REG_WORK1, 0, 16); + if(!s_is_d) + BFI_xxii(d, REG_WORK1, 0, 16); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_MOVE_w,(W2 d, RR2 s)) @@ -4758,16 +4758,16 @@ MIDFUNC(2,jff_MOVE_l,(W4 d, RR4 s)) int s_is_d = (s == d); s = readreg(s); - + if(!s_is_d) { - d = writereg(d); - MOV_ww(d, s); + d = writereg(d); + MOV_ww(d, s); } - TST_ww(s, s); + TST_ww(s, s); - flags_carry_inverted = false; + flags_carry_inverted = false; if(!s_is_d) - unlock2(d); + unlock2(d); unlock2(s); } MENDFUNC(2,jff_MOVE_l,(W4 d, RR4 s)) @@ -4784,8 +4784,8 @@ MIDFUNC(3,jnf_MVMEL_w,(W4 d, RR4 s, IM8 offset)) d = writereg(d); LDRH_wXi(REG_WORK1, s, offset); - REV16_ww(d, REG_WORK1); - SXTH_ww(d, d); + REV16_ww(d, REG_WORK1); + SXTH_ww(d, d); unlock2(d); unlock2(s); @@ -4795,24 +4795,24 @@ MENDFUNC(3,jnf_MVMEL_w,(W4 d, RR4 s, IM8 offset)) MIDFUNC(3,jnf_MVMEL_l,(W4 d, RR4 s, IM8 offset)) { if (s == d || isconst(d) || isinreg(d)) { - s = readreg(s); - d = writereg(d); - - LDR_wXi(REG_WORK1, s, offset); - REV32_xx(d, REG_WORK1); - - unlock2(d); - unlock2(s); - } else { - s = readreg(s); - - LDR_wXi(REG_WORK1, s, offset); - REV32_xx(REG_WORK2, REG_WORK1); - uintptr idx = (uintptr)(®s.regs[d]) - (uintptr) ®s; - STR_wXi(REG_WORK2, R_REGSTRUCT, idx); - - unlock2(s); - } + s = readreg(s); + d = writereg(d); + + LDR_wXi(REG_WORK1, s, offset); + REV32_xx(d, REG_WORK1); + + unlock2(d); + unlock2(s); + } else { + s = readreg(s); + + LDR_wXi(REG_WORK1, s, offset); + REV32_xx(REG_WORK2, REG_WORK1); + uintptr idx = (uintptr)(®s.regs[d]) - (uintptr) ®s; + STR_wXi(REG_WORK2, R_REGSTRUCT, idx); + + unlock2(s); + } } MENDFUNC(3,jnf_MVMEL_l,(W4 d, RR4 s, IM8 offset)) @@ -4828,7 +4828,7 @@ MIDFUNC(3,jnf_MVMLE_w,(RR4 d, RR4 s, IM8 offset)) d = readreg(d); REV16_ww(REG_WORK1, s); - STURH_wXi(REG_WORK1, d, offset); + STURH_wXi(REG_WORK1, d, offset); unlock2(d); unlock2(s); @@ -4838,24 +4838,24 @@ MENDFUNC(3,jnf_MVMLE_w,(RR4 d, RR4 s, IM8 offset)) MIDFUNC(3,jnf_MVMLE_l,(RR4 d, RR4 s, IM8 offset)) { if (s == d || isconst(s) || isinreg(s)) { - s = readreg(s); - d = readreg(d); + s = readreg(s); + d = readreg(d); - REV32_xx(REG_WORK1, s); - STUR_wXi(REG_WORK1, d, offset); + REV32_xx(REG_WORK1, s); + STUR_wXi(REG_WORK1, d, offset); - unlock2(d); - unlock2(s); - } else { - d = readreg(d); + unlock2(d); + unlock2(s); + } else { + d = readreg(d); - uintptr idx = (uintptr)(®s.regs[s]) - (uintptr) ®s; - LDR_wXi(REG_WORK2, R_REGSTRUCT, idx); - REV32_xx(REG_WORK1, REG_WORK2); - STUR_wXi(REG_WORK1, d, offset); + uintptr idx = (uintptr)(®s.regs[s]) - (uintptr) ®s; + LDR_wXi(REG_WORK2, R_REGSTRUCT, idx); + REV32_xx(REG_WORK1, REG_WORK2); + STUR_wXi(REG_WORK1, d, offset); - unlock2(d); - } + unlock2(d); + } } MENDFUNC(3,jnf_MVMLE_l,(RR4 d, RR4 s, IM8 offset)) @@ -4895,7 +4895,7 @@ MENDFUNC(2,jnf_MOVE16,(RR4 d, RR4 s)) */ MIDFUNC(2,jnf_MOVEA_w_imm,(W4 d, IM16 v)) { - set_const(d, (uae_s32)(uae_s16)v); + set_const(d, (uae_s32)(uae_s16)v); } MENDFUNC(2,jnf_MOVEA_w_imm,(W4 d, IM16 v)) @@ -4907,7 +4907,7 @@ MIDFUNC(2,jnf_MOVEA_w,(W4 d, RR2 s)) } INIT_REGS_l(d, s); - + SIGNED16_REG_2_REG(d, s); EXIT_REGS(d, s); @@ -4935,22 +4935,22 @@ MENDFUNC(2,jnf_MOVEA_l,(W4 d, RR4 s)) */ MIDFUNC(2,jnf_MULS,(RW4 d, RR4 s)) { - if (isconst(s)) { - uae_s16 tmp = (uae_s16)live.state[s].val; - d = rmw(d); - SIGNED16_IMM_2_REG(REG_WORK1, tmp); - SIGNED16_REG_2_REG(d, d); - SMULL_xww(d, d, REG_WORK1); - unlock2(d); - return; - } - + if (isconst(s)) { + uae_s16 tmp = (uae_s16)live.state[s].val; + d = rmw(d); + SIGNED16_IMM_2_REG(REG_WORK1, tmp); + SIGNED16_REG_2_REG(d, d); + SMULL_xww(d, d, REG_WORK1); + unlock2(d); + return; + } + INIT_REGS_l(d, s); - - SIGNED16_REG_2_REG(d, d); - SIGNED16_REG_2_REG(REG_WORK1, s); - SMULL_xww(d, d, REG_WORK1); - + + SIGNED16_REG_2_REG(d, d); + SIGNED16_REG_2_REG(REG_WORK1, s); + SMULL_xww(d, d, REG_WORK1); + EXIT_REGS(d, s); } MENDFUNC(2,jnf_MULS,(RW4 d, RR4 s)) @@ -4962,9 +4962,9 @@ MIDFUNC(2,jff_MULS,(RW4 d, RR4 s)) SIGNED16_REG_2_REG(d, d); SIGNED16_REG_2_REG(REG_WORK1, s); SMULL_xww(d, d, REG_WORK1); - TST_ww(d, d); - - flags_carry_inverted = false; + TST_ww(d, d); + + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_MULS,(RW4 d, RR4 s)) @@ -4983,17 +4983,17 @@ MIDFUNC(2,jff_MULS32,(RW4 d, RR4 s)) { INIT_REGS_l(d, s); - SMULL_xww(d, d, s); - TST_ww(d, d); + SMULL_xww(d, d, s); + TST_ww(d, d); - if (needed_flags & FLAG_V) { - LSR_xxi(REG_WORK1, d, 32); - CBZ_wi(REG_WORK1, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxVflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - flags_carry_inverted = false; + if (needed_flags & FLAG_V) { + LSR_xxi(REG_WORK1, d, 32); + CBZ_wi(REG_WORK1, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxVflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_MULS32,(RW4 d, RR4 s)) @@ -5003,8 +5003,8 @@ MIDFUNC(2,jnf_MULS64,(RW4 d, RW4 s)) s = rmw(s); d = rmw(d); - SMULL_xww(d, d, s); - LSR_xxi(s, d, 32); + SMULL_xww(d, d, s); + LSR_xxi(s, d, 32); unlock2(s); unlock2(d); @@ -5016,24 +5016,24 @@ MIDFUNC(2,jff_MULS64,(RW4 d, RW4 s)) s = rmw(s); d = rmw(d); - SXTW_xw(REG_WORK1, d); - SXTW_xw(REG_WORK2, s); - SMULL_xww(d, REG_WORK1, REG_WORK2); - TST_xx(d, d); - LSR_xxi(s, d, 32); - - if (needed_flags & FLAG_V) { - // check overflow: no overflow if high part is 0 or 0xffffffff - SMULH_xxx(REG_WORK3, REG_WORK1, REG_WORK2); - CBZ_xi(REG_WORK3, 6); - ADD_wwi(REG_WORK3, REG_WORK3, 1); - CBZ_xi(REG_WORK3, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxVflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - - flags_carry_inverted = false; + SXTW_xw(REG_WORK1, d); + SXTW_xw(REG_WORK2, s); + SMULL_xww(d, REG_WORK1, REG_WORK2); + TST_xx(d, d); + LSR_xxi(s, d, 32); + + if (needed_flags & FLAG_V) { + // check overflow: no overflow if high part is 0 or 0xffffffff + SMULH_xxx(REG_WORK3, REG_WORK1, REG_WORK2); + CBZ_xi(REG_WORK3, 6); + ADD_wwi(REG_WORK3, REG_WORK3, 1); + CBZ_xi(REG_WORK3, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxVflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + + flags_carry_inverted = false; unlock2(s); unlock2(d); } @@ -5054,15 +5054,15 @@ MENDFUNC(2,jff_MULS64,(RW4 d, RW4 s)) */ MIDFUNC(2,jnf_MULU,(RW4 d, RR4 s)) { - if (isconst(s)) { - uae_u16 tmp = (uae_u16)live.state[s].val; - d = rmw(d); - UNSIGNED16_IMM_2_REG(REG_WORK1, tmp); - UNSIGNED16_REG_2_REG(d, d); - UMULL_xww(d, d, REG_WORK1); - unlock2(d); - return; - } + if (isconst(s)) { + uae_u16 tmp = (uae_u16)live.state[s].val; + d = rmw(d); + UNSIGNED16_IMM_2_REG(REG_WORK1, tmp); + UNSIGNED16_REG_2_REG(d, d); + UMULL_xww(d, d, REG_WORK1); + unlock2(d); + return; + } INIT_REGS_l(d, s); @@ -5076,26 +5076,26 @@ MENDFUNC(2,jnf_MULU,(RW4 d, RR4 s)) MIDFUNC(2,jff_MULU,(RW4 d, RR4 s)) { - if (isconst(s)) { - uae_u16 tmp = (uae_u16)live.state[s].val; - d = rmw(d); - UNSIGNED16_IMM_2_REG(REG_WORK1, tmp); - UNSIGNED16_REG_2_REG(d, d); - UMULL_xww(d, d, REG_WORK1); - TST_ww(d, d); - flags_carry_inverted = false; - unlock2(d); - return; - } + if (isconst(s)) { + uae_u16 tmp = (uae_u16)live.state[s].val; + d = rmw(d); + UNSIGNED16_IMM_2_REG(REG_WORK1, tmp); + UNSIGNED16_REG_2_REG(d, d); + UMULL_xww(d, d, REG_WORK1); + TST_ww(d, d); + flags_carry_inverted = false; + unlock2(d); + return; + } INIT_REGS_l(d, s); UNSIGNED16_REG_2_REG(d, d); UNSIGNED16_REG_2_REG(REG_WORK1, s); UMULL_xww(d, d, REG_WORK1); - TST_ww(d, d); + TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_MULU,(RW4 d, RR4 s)) @@ -5114,18 +5114,18 @@ MIDFUNC(2,jff_MULU32,(RW4 d, RR4 s)) { INIT_REGS_l(d, s); - UMULL_xww(d, d, s); - TST_ww(d, d); + UMULL_xww(d, d, s); + TST_ww(d, d); - if (needed_flags & FLAG_V) { - LSR_xxi(REG_WORK1, d, 32); - CBZ_wi(REG_WORK1, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxVflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } + if (needed_flags & FLAG_V) { + LSR_xxi(REG_WORK1, d, 32); + CBZ_wi(REG_WORK1, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxVflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_MULU32,(RW4 d, RR4 s)) @@ -5135,8 +5135,8 @@ MIDFUNC(2,jnf_MULU64,(RW4 d, RW4 s)) s = rmw(s); d = rmw(d); - UMULL_xww(d, d, s); - LSR_xxi(s, d, 32); + UMULL_xww(d, d, s); + LSR_xxi(s, d, 32); unlock2(s); unlock2(d); @@ -5148,26 +5148,26 @@ MIDFUNC(2,jff_MULU64,(RW4 d, RW4 s)) s = rmw(s); d = rmw(d); - if (needed_flags & FLAG_V) { - MOV_ww(REG_WORK1, d); - MOV_ww(REG_WORK2, s); - UMULL_xww(d, REG_WORK1, REG_WORK2); - } else { - UMULL_xww(d, d, s); - } - TST_xx(d, d); - LSR_xxi(s, d, 32); - - if (needed_flags & FLAG_V) { - // check overflow: no overflow if high part is 0 - UMULH_xxx(REG_WORK3, REG_WORK1, REG_WORK2); - CBZ_xi(REG_WORK3, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxVflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } - - flags_carry_inverted = false; + if (needed_flags & FLAG_V) { + MOV_ww(REG_WORK1, d); + MOV_ww(REG_WORK2, s); + UMULL_xww(d, REG_WORK1, REG_WORK2); + } else { + UMULL_xww(d, d, s); + } + TST_xx(d, d); + LSR_xxi(s, d, 32); + + if (needed_flags & FLAG_V) { + // check overflow: no overflow if high part is 0 + UMULH_xxx(REG_WORK3, REG_WORK1, REG_WORK2); + CBZ_xi(REG_WORK3, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxVflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } + + flags_carry_inverted = false; unlock2(s); unlock2(d); } @@ -5192,7 +5192,7 @@ MIDFUNC(1,jnf_NEG_b,(RW1 d)) SIGNED8_REG_2_REG(REG_WORK1, d); NEG_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 8); + BFI_xxii(d, REG_WORK1, 0, 8); unlock2(d); } @@ -5204,7 +5204,7 @@ MIDFUNC(1,jnf_NEG_w,(RW2 d)) SIGNED16_REG_2_REG(REG_WORK1, d); NEG_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); unlock2(d); } @@ -5226,10 +5226,10 @@ MIDFUNC(1,jff_NEG_b,(RW1 d)) SIGNED8_REG_2_REG(REG_WORK1, d); NEGS_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 8); - - flags_carry_inverted = true; - DUPLICACTE_CARRY + BFI_xxii(d, REG_WORK1, 0, 8); + + flags_carry_inverted = true; + DUPLICACTE_CARRY unlock2(d); } @@ -5241,10 +5241,10 @@ MIDFUNC(1,jff_NEG_w,(RW2 d)) SIGNED16_REG_2_REG(REG_WORK1, d); NEGS_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); - flags_carry_inverted = true; - DUPLICACTE_CARRY + flags_carry_inverted = true; + DUPLICACTE_CARRY unlock2(d); } @@ -5256,8 +5256,8 @@ MIDFUNC(1,jff_NEG_l,(RW4 d)) NEGS_ww(d, d); - flags_carry_inverted = true; - DUPLICACTE_CARRY + flags_carry_inverted = true; + DUPLICACTE_CARRY unlock2(d); } @@ -5280,12 +5280,12 @@ MENDFUNC(1,jff_NEG_l,(RW4 d)) */ MIDFUNC(1,jnf_NEGX_b,(RW1 d)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REG_b(d); - clobber_flags(); - + clobber_flags(); + // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); SIGNED8_REG_2_REG(REG_WORK1, d); NGC_ww(REG_WORK1, REG_WORK1); @@ -5298,13 +5298,13 @@ MENDFUNC(1,jnf_NEGX_b,(RW1 d)) MIDFUNC(1,jnf_NEGX_w,(RW2 d)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REG_w(d); - clobber_flags(); + clobber_flags(); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); SIGNED16_REG_2_REG(REG_WORK1, d); NGC_ww(REG_WORK1, REG_WORK1); @@ -5317,13 +5317,13 @@ MENDFUNC(1,jnf_NEGX_w,(RW2 d)) MIDFUNC(1,jnf_NEGX_l,(RW4 d)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); d = rmw(d); - clobber_flags(); + clobber_flags(); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); NGC_ww(d, d); @@ -5335,26 +5335,26 @@ MENDFUNC(1,jnf_NEGX_l,(RW4 d)) MIDFUNC(1,jff_NEGX_b,(RW1 d)) { INIT_REG_b(d); - int x = rmw(FLAGX); + int x = rmw(FLAGX); MOVN_xi(REG_WORK2, 0); MOVN_xish(REG_WORK1, 0x4000, 16); // inverse Z flag CSEL_xxxc(REG_WORK2, REG_WORK1, REG_WORK2, NATIVE_CC_NE); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); SIGNED8_REG_2_REG(REG_WORK1, d); NGCS_ww(REG_WORK1, REG_WORK1); - BFI_wwii(d, REG_WORK1, 0, 8); - + BFI_wwii(d, REG_WORK1, 0, 8); + MRS_NZCV_x(REG_WORK4); EOR_xxCflag(REG_WORK4, REG_WORK4); AND_www(REG_WORK4, REG_WORK4, REG_WORK2); MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; if (needed_flags & FLAG_X) - UBFX_wwii(x, REG_WORK4, 29, 1); // Duplicate carry + UBFX_wwii(x, REG_WORK4, 29, 1); // Duplicate carry unlock2(x); unlock2(d); @@ -5364,26 +5364,26 @@ MENDFUNC(1,jff_NEGX_b,(RW1 d)) MIDFUNC(1,jff_NEGX_w,(RW2 d)) { INIT_REG_w(d); - int x = rmw(FLAGX); + int x = rmw(FLAGX); MOVN_xi(REG_WORK2, 0); MOVN_xish(REG_WORK1, 0x4000, 16); // inverse Z flag CSEL_xxxc(REG_WORK2, REG_WORK1, REG_WORK2, NATIVE_CC_NE); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); SIGNED16_REG_2_REG(REG_WORK1, d); NGCS_ww(REG_WORK1, REG_WORK1); - BFI_wwii(d, REG_WORK1, 0, 16); - + BFI_wwii(d, REG_WORK1, 0, 16); + MRS_NZCV_x(REG_WORK4); EOR_xxCflag(REG_WORK4, REG_WORK4); AND_www(REG_WORK4, REG_WORK4, REG_WORK2); MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; if (needed_flags & FLAG_X) - UBFX_wwii(x, REG_WORK4, 29, 1); // Duplicate carry + UBFX_wwii(x, REG_WORK4, 29, 1); // Duplicate carry unlock2(x); unlock2(d); @@ -5393,14 +5393,14 @@ MENDFUNC(1,jff_NEGX_w,(RW2 d)) MIDFUNC(1,jff_NEGX_l,(RW4 d)) { d = rmw(d); - int x = rmw(FLAGX); + int x = rmw(FLAGX); MOVN_xi(REG_WORK2, 0); MOVN_xish(REG_WORK1, 0x4000, 16); // inverse Z flag CSEL_xxxc(REG_WORK2, REG_WORK1, REG_WORK2, NATIVE_CC_NE); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); NGCS_ww(d, d); @@ -5408,9 +5408,9 @@ MIDFUNC(1,jff_NEGX_l,(RW4 d)) EOR_xxCflag(REG_WORK4, REG_WORK4); AND_www(REG_WORK4, REG_WORK4, REG_WORK2); MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; if (needed_flags & FLAG_X) - UBFX_wwii(x, REG_WORK4, 29, 1); // Duplicate carry + UBFX_wwii(x, REG_WORK4, 29, 1); // Duplicate carry unlock2(x); unlock2(d); @@ -5441,7 +5441,7 @@ MIDFUNC(1,jnf_NOT_b,(RW1 d)) if(targetIsReg) { MVN_ww(REG_WORK1, d); - BFI_xxii(d, REG_WORK1, 0, 8); + BFI_xxii(d, REG_WORK1, 0, 8); } else { MVN_ww(d, d); } @@ -5461,7 +5461,7 @@ MIDFUNC(1,jnf_NOT_w,(RW2 d)) if(targetIsReg) { MVN_ww(REG_WORK1, d); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); } else { MVN_ww(d, d); } @@ -5492,14 +5492,14 @@ MIDFUNC(1,jff_NOT_b,(RW1 d)) SIGNED8_REG_2_REG(REG_WORK1, d); if(targetIsReg) { MVN_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 8); - TST_ww(REG_WORK1, REG_WORK1); + BFI_xxii(d, REG_WORK1, 0, 8); + TST_ww(REG_WORK1, REG_WORK1); } else { MVN_ww(d, REG_WORK1); TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(1,jff_NOT_b,(RW1 d)) @@ -5511,14 +5511,14 @@ MIDFUNC(1,jff_NOT_w,(RW2 d)) SIGNED16_REG_2_REG(REG_WORK1, d); if(targetIsReg) { MVN_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 16); - TST_ww(REG_WORK1, REG_WORK1); + BFI_xxii(d, REG_WORK1, 0, 16); + TST_ww(REG_WORK1, REG_WORK1); } else { MVN_ww(d, REG_WORK1); TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(1,jff_NOT_w,(RW2 d)) @@ -5530,7 +5530,7 @@ MIDFUNC(1,jff_NOT_l,(RW4 d)) MVN_ww(d, d); TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(1,jff_NOT_l,(RW4 d)) @@ -5557,9 +5557,9 @@ MIDFUNC(2,jnf_OR_b_imm,(RW1 d, IM8 v)) } INIT_REG_b(d); - - MOV_xi(REG_WORK2, v & 0xff); - ORR_www(d, d, REG_WORK2); + + MOV_xi(REG_WORK2, v & 0xff); + ORR_www(d, d, REG_WORK2); unlock2(d); } @@ -5576,7 +5576,7 @@ MIDFUNC(2,jnf_OR_b,(RW1 d, RR1 s)) if(targetIsReg) { ORR_www(REG_WORK1, d, s); - BFI_xxii(d, REG_WORK1, 0, 8); + BFI_xxii(d, REG_WORK1, 0, 8); } else { ORR_www(d, d, s); } @@ -5594,9 +5594,9 @@ MIDFUNC(2,jnf_OR_w_imm,(RW2 d, IM16 v)) INIT_REG_w(d); - MOV_xi(REG_WORK1, v & 0xffff); - ORR_www(d, d, REG_WORK1); - + MOV_xi(REG_WORK1, v & 0xffff); + ORR_www(d, d, REG_WORK1); + unlock2(d); } MENDFUNC(2,jnf_OR_w_imm,(RW2 d, IM16 v)) @@ -5612,7 +5612,7 @@ MIDFUNC(2,jnf_OR_w,(RW2 d, RR2 s)) if(targetIsReg) { ORR_www(REG_WORK1, d, s); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); } else { ORR_www(d, d, s); } @@ -5630,7 +5630,7 @@ MIDFUNC(2,jnf_OR_l_imm,(RW4 d, IM32 v)) d = rmw(d); - LOAD_U32(REG_WORK1, v); + LOAD_U32(REG_WORK1, v); ORR_www(d, d, REG_WORK1); unlock2(d); @@ -5667,7 +5667,7 @@ MIDFUNC(2,jff_OR_b_imm,(RW1 d, IM8 v)) TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_OR_b_imm,(RW1 d, IM8 v)) @@ -5686,13 +5686,13 @@ MIDFUNC(2,jff_OR_b,(RW1 d, RR1 s)) if(targetIsReg) { ORR_www(REG_WORK1, REG_WORK1, REG_WORK2); TST_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 8); + BFI_xxii(d, REG_WORK1, 0, 8); } else { ORR_www(d, REG_WORK1, REG_WORK2); TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_OR_b,(RW1 d, RR1 s)) @@ -5706,13 +5706,13 @@ MIDFUNC(2,jff_OR_w_imm,(RW2 d, IM16 v)) if(targetIsReg) { ORR_www(REG_WORK1, REG_WORK1, REG_WORK2); TST_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); } else { ORR_www(d, REG_WORK1, REG_WORK2); TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_OR_w_imm,(RW2 d, IM16 v)) @@ -5731,13 +5731,13 @@ MIDFUNC(2,jff_OR_w,(RW2 d, RR2 s)) if(targetIsReg) { ORR_www(REG_WORK1, REG_WORK1, REG_WORK2); TST_ww(REG_WORK1, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); } else { ORR_www(d, REG_WORK1, REG_WORK2); TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_OR_w,(RW2 d, RR2 s)) @@ -5746,11 +5746,11 @@ MIDFUNC(2,jff_OR_l_imm,(RW4 d, IM32 v)) { d = rmw(d); - LOAD_U32(REG_WORK1, v); + LOAD_U32(REG_WORK1, v); ORR_www(d, d, REG_WORK1); - TST_ww(d, d); + TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_OR_l_imm,(RW4 d, IM32 v)) @@ -5767,7 +5767,7 @@ MIDFUNC(2,jff_OR_l,(RW4 d, RR4 s)) ORR_www(d, d, s); TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, s); } MENDFUNC(2,jff_OR_l,(RW4 d, RR4 s)) @@ -5788,10 +5788,10 @@ MENDFUNC(2,jff_OR_l,(RW4 d, RR4 s)) MIDFUNC(1,jff_ORSR,(IM32 s, IM8 x)) { MRS_NZCV_x(REG_WORK1); - if (flags_carry_inverted) { - EOR_xxCflag(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; - } + if (flags_carry_inverted) { + EOR_xxCflag(REG_WORK1, REG_WORK1); + flags_carry_inverted = false; + } MOV_xish(REG_WORK2, (s >> 16), 16); ORR_www(REG_WORK1, REG_WORK1, REG_WORK2); MSR_NZCV_x(REG_WORK1); @@ -5821,50 +5821,50 @@ MENDFUNC(2,jff_ORSR,(IM32 s, IM8 x)) */ MIDFUNC(2,jnf_ROL_b_imm,(RW1 d, IM8 i)) { - if(i & 0x1f) { + if(i & 0x1f) { INIT_REG_b(d); - LSL_wwi(REG_WORK1, d, 24); - ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 8); - ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); - ROR_wwi(REG_WORK1, REG_WORK1, (32 - (i & 0x1f))); - BFI_wwii(d, REG_WORK1, 0, 8); - + LSL_wwi(REG_WORK1, d, 24); + ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 8); + ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); + ROR_wwi(REG_WORK1, REG_WORK1, (32 - (i & 0x1f))); + BFI_wwii(d, REG_WORK1, 0, 8); + unlock2(d); - } + } } MENDFUNC(2,jnf_ROL_b_imm,(RW1 d, IM8 i)) MIDFUNC(2,jnf_ROL_w_imm,(RW2 d, IM8 i)) { - if(i & 0x1f) { + if(i & 0x1f) { INIT_REG_w(d); - MOV_ww(REG_WORK1, d); - BFI_wwii(REG_WORK1, REG_WORK1, 16, 16); - ROR_wwi(REG_WORK1, REG_WORK1, (32 - (i & 0x1f))); - BFI_wwii(d, REG_WORK1, 0, 16); + MOV_ww(REG_WORK1, d); + BFI_wwii(REG_WORK1, REG_WORK1, 16, 16); + ROR_wwi(REG_WORK1, REG_WORK1, (32 - (i & 0x1f))); + BFI_wwii(d, REG_WORK1, 0, 16); unlock2(d); - } + } } MENDFUNC(2,jnf_ROL_w_imm,(RW2 d, IM8 i)) MIDFUNC(2,jnf_ROL_l_imm,(RW4 d, IM8 i)) { - if(i & 0x1f) { - if (isconst(d)) { - i = i & 31; - live.state[d].val = (live.state[d].val << i) | (live.state[d].val >> (32-i)); - return; - } + if(i & 0x1f) { + if (isconst(d)) { + i = i & 31; + live.state[d].val = (live.state[d].val << i) | (live.state[d].val >> (32-i)); + return; + } d = rmw(d); - ROR_wwi(d, d, (32 - (i & 0x1f))); - + ROR_wwi(d, d, (32 - (i & 0x1f))); + unlock2(d); - } + } } MENDFUNC(2,jnf_ROL_l_imm,(RW4 d, RR4 s, IM8 i)) @@ -5877,13 +5877,13 @@ MIDFUNC(2,jff_ROL_b_imm,(RW1 d, IM8 i)) LSL_wwi(REG_WORK1, d, 24); if (i) { - ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 8); - ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); + ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 8); + ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); if(i & 0x1f) { - ROR_wwi(REG_WORK1, REG_WORK1, (32 - (i & 0x1f))); + ROR_wwi(REG_WORK1, REG_WORK1, (32 - (i & 0x1f))); } - TST_ww(REG_WORK1, REG_WORK1); - BFI_wwii(d, REG_WORK1, 0, 8); + TST_ww(REG_WORK1, REG_WORK1); + BFI_wwii(d, REG_WORK1, 0, 8); MRS_NZCV_x(REG_WORK4); BFI_wwii(REG_WORK4, REG_WORK1, 29, 1); // Handle C flag @@ -5892,7 +5892,7 @@ MIDFUNC(2,jff_ROL_b_imm,(RW1 d, IM8 i)) TST_ww(REG_WORK1, REG_WORK1); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_ROL_b_imm,(RW1 d, IM8 i)) @@ -5904,13 +5904,13 @@ MIDFUNC(2,jff_ROL_w_imm,(RW2 d, IM8 i)) else d = readreg(d); - MOV_ww(REG_WORK1, d); + MOV_ww(REG_WORK1, d); BFI_wwii(REG_WORK1, REG_WORK1, 16, 16); if (i) { if(i & 0x1f) - ROR_wwi(REG_WORK1, REG_WORK1, (32 - (i & 0x1f))); - TST_ww(REG_WORK1, REG_WORK1); - BFI_wwii(d, REG_WORK1, 0, 16); + ROR_wwi(REG_WORK1, REG_WORK1, (32 - (i & 0x1f))); + TST_ww(REG_WORK1, REG_WORK1); + BFI_wwii(d, REG_WORK1, 0, 16); MRS_NZCV_x(REG_WORK4); BFI_wwii(REG_WORK4, REG_WORK1, 29, 1); // Handle C flag @@ -5919,7 +5919,7 @@ MIDFUNC(2,jff_ROL_w_imm,(RW2 d, IM8 i)) TST_ww(REG_WORK1, REG_WORK1); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_ROL_w_imm,(RW2 d, IM8 i)) @@ -5928,12 +5928,12 @@ MIDFUNC(2,jff_ROL_l_imm,(RW4 d, IM8 i)) { if (i) { if(i & 0x1f) { - d = rmw(d); - ROR_wwi(d, d, (32 - (i & 0x1f))); - } else { - d = readreg(d); - } - TST_ww(d, d); + d = rmw(d); + ROR_wwi(d, d, (32 - (i & 0x1f))); + } else { + d = readreg(d); + } + TST_ww(d, d); MRS_NZCV_x(REG_WORK4); BFI_wwii(REG_WORK4, d, 29, 1); // Handle C flag @@ -5943,7 +5943,7 @@ MIDFUNC(2,jff_ROL_l_imm,(RW4 d, IM8 i)) TST_ww(d, d); } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_ROL_l_imm,(RW4 d, IM8 i)) @@ -5965,7 +5965,7 @@ MIDFUNC(2,jnf_ROL_b,(RW1 d, RR4 i)) ORR_wwwLSRi(REG_WORK2, REG_WORK2, REG_WORK2, 8); ORR_wwwLSRi(REG_WORK2, REG_WORK2, REG_WORK2, 16); ROR_www(REG_WORK2, REG_WORK2, REG_WORK1); - BFI_wwii(d, REG_WORK2, 0, 8); + BFI_wwii(d, REG_WORK2, 0, 8); EXIT_REGS(d, i); } @@ -5984,10 +5984,10 @@ MIDFUNC(2,jnf_ROL_w,(RW2 d, RR4 i)) MOV_wi(REG_WORK2, 32); SUB_www(REG_WORK1, REG_WORK2, REG_WORK1); - MOV_ww(REG_WORK2, d); + MOV_ww(REG_WORK2, d); BFI_wwii(REG_WORK2, REG_WORK2, 16, 16); ROR_www(REG_WORK2, REG_WORK2, REG_WORK1); - BFI_wwii(d, REG_WORK2, 0, 16); + BFI_wwii(d, REG_WORK2, 0, 16); EXIT_REGS(d, i); } @@ -6022,14 +6022,14 @@ MIDFUNC(2,jff_ROL_b,(RW1 d, RR4 i)) INIT_REGS_b(d, i); UBFIZ_xxii(REG_WORK1, i, 0, 5); // AND_rri(REG_WORK1, i, 0x1f); - CBNZ_wi(REG_WORK1, 4); + CBNZ_wi(REG_WORK1, 4); - // shift count is 0 + // shift count is 0 LSL_wwi(REG_WORK3, d, 24); - TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // - + TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // + MOV_wi(REG_WORK2, 32); SUB_www(REG_WORK1, REG_WORK2, REG_WORK1); @@ -6037,17 +6037,17 @@ MIDFUNC(2,jff_ROL_b,(RW1 d, RR4 i)) ORR_wwwLSRi(REG_WORK2, REG_WORK2, REG_WORK2, 8); ORR_wwwLSRi(REG_WORK2, REG_WORK2, REG_WORK2, 16); ROR_www(REG_WORK2, REG_WORK2, REG_WORK1); - BFI_wwii(d, REG_WORK2, 0, 8); - TST_ww(REG_WORK2, REG_WORK2); - + BFI_wwii(d, REG_WORK2, 0, 8); + TST_ww(REG_WORK2, REG_WORK2); + MRS_NZCV_x(REG_WORK4); BFI_wwii(REG_WORK4, d, 29, 1); // Handle C flag MSR_NZCV_x(REG_WORK4); - // - write_jmp_target(branchadd, (uintptr)get_target()); + // + write_jmp_target(branchadd, (uintptr)get_target()); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, i); } MENDFUNC(2,jff_ROL_b,(RW1 d, RR4 i)) @@ -6062,31 +6062,31 @@ MIDFUNC(2,jff_ROL_w,(RW2 d, RR4 i)) INIT_REGS_w(d, i); UBFIZ_xxii(REG_WORK1, i, 0, 5); // AND_rri(REG_WORK1, i, 0x1f); - CBNZ_wi(REG_WORK1, 4); + CBNZ_wi(REG_WORK1, 4); - // shift count is 0 + // shift count is 0 LSL_wwi(REG_WORK3, d, 16); - TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // + TST_ww(REG_WORK3, REG_WORK3); // NZ correct, VC cleared + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // MOV_wi(REG_WORK2, 32); SUB_www(REG_WORK1, REG_WORK2, REG_WORK1); - MOV_ww(REG_WORK2, d); + MOV_ww(REG_WORK2, d); BFI_wwii(REG_WORK2, REG_WORK2, 16, 16); ROR_www(REG_WORK2, REG_WORK2, REG_WORK1); - BFI_wwii(d, REG_WORK2, 0, 16); - TST_ww(REG_WORK2, REG_WORK2); - + BFI_wwii(d, REG_WORK2, 0, 16); + TST_ww(REG_WORK2, REG_WORK2); + MRS_NZCV_x(REG_WORK4); BFI_wwii(REG_WORK4, d, 29, 1); // Handle C flag MSR_NZCV_x(REG_WORK4); - // - write_jmp_target(branchadd, (uintptr)get_target()); + // + write_jmp_target(branchadd, (uintptr)get_target()); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, i); } MENDFUNC(2,jff_ROL_w,(RW2 d, RR4 i)) @@ -6101,27 +6101,27 @@ MIDFUNC(2,jff_ROL_l,(RW4 d, RR4 i)) INIT_REGS_l(d, i); UBFIZ_xxii(REG_WORK1, i, 0, 5); // AND_rri(REG_WORK1, i, 0x1f); - CBNZ_wi(REG_WORK1, 3); + CBNZ_wi(REG_WORK1, 3); - // shift count is 0 - TST_ww(d, d); // NZ correct, VC cleared - uae_u32* branchadd = (uae_u32*)get_target(); - B_i(0); // + // shift count is 0 + TST_ww(d, d); // NZ correct, VC cleared + uae_u32* branchadd = (uae_u32*)get_target(); + B_i(0); // MOV_wi(REG_WORK2, 32); SUB_www(REG_WORK1, REG_WORK2, REG_WORK1); ROR_www(d, d, REG_WORK1); - TST_ww(d, d); - + TST_ww(d, d); + MRS_NZCV_x(REG_WORK4); BFI_wwii(REG_WORK4, d, 29, 1); // Handle C flag MSR_NZCV_x(REG_WORK4); - // - write_jmp_target(branchadd, (uintptr)get_target()); + // + write_jmp_target(branchadd, (uintptr)get_target()); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); unlock2(i); } @@ -6158,13 +6158,13 @@ MIDFUNC(1,jff_ROLW,(RW2 d)) BFI_wwii(d, d, 16, 16); ROR_wwi(d, d, (32 - 1)); - TST_ww(d, d); - + TST_ww(d, d); + MRS_NZCV_x(REG_WORK4); BFI_wwii(REG_WORK4, d, 29, 1); // Handle C flag MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(1,jff_ROLW,(RW2 d)) @@ -6185,7 +6185,7 @@ MENDFUNC(1,jff_ROLW,(RW2 d)) */ MIDFUNC(2,jnf_ROXL_b,(RW1 d, RR4 i)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_b(d, i); clobber_flags(); @@ -6200,22 +6200,22 @@ MIDFUNC(2,jnf_ROXL_b,(RW1 d, RR4 i)) CMP_wi(REG_WORK1, 8); BLE_i(2); SUB_wwi(REG_WORK1, REG_WORK1, 9); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); CBZ_wi(REG_WORK1, 0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_wwii(REG_WORK2, x, 8, 1); // move x to left side of d BFI_wwii(REG_WORK2, REG_WORK2, 9, 9); // duplicate 9 bits - + MOV_wi(REG_WORK3, 9); SUB_www(REG_WORK3, REG_WORK3, REG_WORK1); LSR_www(REG_WORK2, REG_WORK2, REG_WORK3); - + BFI_wwii(d, REG_WORK2, 0, 8); - - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); + + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); unlock2(x); EXIT_REGS(d, i); @@ -6224,7 +6224,7 @@ MENDFUNC(2,jnf_ROXL_b,(RW1 d, RR4 i)) MIDFUNC(2,jnf_ROXL_w,(RW2 d, RR4 i)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_w(d, i); clobber_flags(); @@ -6236,10 +6236,10 @@ MIDFUNC(2,jnf_ROXL_w,(RW2 d, RR4 i)) CMP_wi(REG_WORK1, 16); BLE_i(2); SUB_wwi(REG_WORK1, REG_WORK1, 17); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); CBZ_wi(REG_WORK1, 0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_wwii(REG_WORK2, x, 16, 1); // move x to left side of d BFI_xxii(REG_WORK2, REG_WORK2, 17, 17); // duplicate 17 bits @@ -6247,11 +6247,11 @@ MIDFUNC(2,jnf_ROXL_w,(RW2 d, RR4 i)) MOV_wi(REG_WORK3, 17); SUB_www(REG_WORK3, REG_WORK3, REG_WORK1); LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - + BFI_wwii(d, REG_WORK2, 0, 16); - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); unlock2(x); EXIT_REGS(d, i); @@ -6260,19 +6260,19 @@ MENDFUNC(2,jnf_ROXL_w,(RW2 d, RR4 i)) MIDFUNC(2,jnf_ROXL_l,(RW4 d, RR4 i)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_l(d, i); clobber_flags(); - + AND_ww3f(REG_WORK1, i); CMP_wi(REG_WORK1, 32); BLE_i(2); SUB_wwi(REG_WORK1, REG_WORK1, 33); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); CBZ_wi(REG_WORK1, 0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_xxii(REG_WORK2, x, 32, 1); // move x to left side of d BFI_xxii(REG_WORK2, REG_WORK2, 33, 31); // duplicate 31 bits @@ -6281,8 +6281,8 @@ MIDFUNC(2,jnf_ROXL_l,(RW4 d, RR4 i)) SUB_www(REG_WORK3, REG_WORK3, REG_WORK1); LSR_xxx(d, REG_WORK2, REG_WORK3); - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); unlock2(x); EXIT_REGS(d, i); @@ -6292,7 +6292,7 @@ MENDFUNC(2,jnf_ROXL_l,(RW4 d, RR4 i)) MIDFUNC(2,jff_ROXL_b,(RW1 d, RR4 i)) { INIT_REGS_b(d, i); - int x = rmw(FLAGX); + int x = rmw(FLAGX); AND_ww3f(REG_WORK1, i); CMP_wi(REG_WORK1, 35); @@ -6308,33 +6308,33 @@ MIDFUNC(2,jff_ROXL_b,(RW1 d, RR4 i)) LSL_wwi(REG_WORK1, d, 24); TST_ww(REG_WORK1, REG_WORK1); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); B_i(0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_wwii(REG_WORK2, x, 8, 1); // move x to left side of d BFI_wwii(REG_WORK2, REG_WORK2, 9, 9); // duplicate 9 bits - + MOV_wi(REG_WORK3, 9); SUB_www(REG_WORK3, REG_WORK3, REG_WORK1); LSR_www(REG_WORK2, REG_WORK2, REG_WORK3); BFI_wwii(d, REG_WORK2, 0, 8); - // Calculate NZ + // Calculate NZ LSL_wwi(REG_WORK1, REG_WORK2, 24); TST_ww(REG_WORK1, REG_WORK1); - - // Calculate C: bit left of result - MRS_NZCV_x(REG_WORK4); - UBFX_wwii(x, REG_WORK2, 8, 1); - BFI_wwii(REG_WORK4, x, 29, 1); - MSR_NZCV_x(REG_WORK4); - - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); - - flags_carry_inverted = false; + + // Calculate C: bit left of result + MRS_NZCV_x(REG_WORK4); + UBFX_wwii(x, REG_WORK2, 8, 1); + BFI_wwii(REG_WORK4, x, 29, 1); + MSR_NZCV_x(REG_WORK4); + + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); + + flags_carry_inverted = false; unlock2(x); EXIT_REGS(d, i); } @@ -6343,7 +6343,7 @@ MENDFUNC(2,jff_ROXL_b,(RW1 d, RR4 i)) MIDFUNC(2,jff_ROXL_w,(RW2 d, RR4 i)) { INIT_REGS_w(d, i); - int x = rmw(FLAGX); + int x = rmw(FLAGX); AND_ww3f(REG_WORK1, i); CMP_wi(REG_WORK1, 33); @@ -6356,10 +6356,10 @@ MIDFUNC(2,jff_ROXL_w,(RW2 d, RR4 i)) LSL_wwi(REG_WORK1, d, 16); TST_ww(REG_WORK1, REG_WORK1); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); B_i(0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_wwii(REG_WORK2, x, 16, 1); // move x to left side of d BFI_xxii(REG_WORK2, REG_WORK2, 17, 17); // duplicate 17 bits @@ -6367,23 +6367,23 @@ MIDFUNC(2,jff_ROXL_w,(RW2 d, RR4 i)) MOV_wi(REG_WORK3, 17); SUB_www(REG_WORK3, REG_WORK3, REG_WORK1); LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - + BFI_wwii(d, REG_WORK2, 0, 16); - // Calculate NZ + // Calculate NZ LSL_wwi(REG_WORK1, REG_WORK2, 16); TST_ww(REG_WORK1, REG_WORK1); - - // Calculate C: bit left of result - MRS_NZCV_x(REG_WORK4); - UBFX_wwii(x, REG_WORK2, 16, 1); - BFI_wwii(REG_WORK4, x, 29, 1); - MSR_NZCV_x(REG_WORK4); - - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); - - flags_carry_inverted = false; + + // Calculate C: bit left of result + MRS_NZCV_x(REG_WORK4); + UBFX_wwii(x, REG_WORK2, 16, 1); + BFI_wwii(REG_WORK4, x, 29, 1); + MSR_NZCV_x(REG_WORK4); + + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); + + flags_carry_inverted = false; unlock2(x); EXIT_REGS(d, i); } @@ -6392,7 +6392,7 @@ MENDFUNC(2,jff_ROXL_w,(RW2 d, RR4 i)) MIDFUNC(2,jff_ROXL_l,(RW4 d, RR4 i)) { INIT_REGS_l(d, i); - int x = rmw(FLAGX); + int x = rmw(FLAGX); AND_ww3f(REG_WORK1, i); CMP_wi(REG_WORK1, 32); @@ -6401,10 +6401,10 @@ MIDFUNC(2,jff_ROXL_l,(RW4 d, RR4 i)) CBNZ_wi(REG_WORK1, 3); // need to rotate TST_ww(d, d); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); B_i(0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_xxii(REG_WORK2, x, 32, 1); // move x to left side of d BFI_xxii(REG_WORK2, REG_WORK2, 33, 31); // duplicate 31 bits @@ -6413,21 +6413,21 @@ MIDFUNC(2,jff_ROXL_l,(RW4 d, RR4 i)) SUB_www(REG_WORK3, REG_WORK3, REG_WORK1); LSR_xxx(d, REG_WORK2, REG_WORK3); - // Calculate NZ + // Calculate NZ TST_ww(d, d); - // Calculate C - MRS_NZCV_x(REG_WORK4); - SUB_wwi(REG_WORK3, REG_WORK3, 1); - LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); - UBFX_wwii(x, REG_WORK2, 0, 1); - BFI_wwii(REG_WORK4, x, 29, 1); - MSR_NZCV_x(REG_WORK4); + // Calculate C + MRS_NZCV_x(REG_WORK4); + SUB_wwi(REG_WORK3, REG_WORK3, 1); + LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK3); + UBFX_wwii(x, REG_WORK2, 0, 1); + BFI_wwii(REG_WORK4, x, 29, 1); + MSR_NZCV_x(REG_WORK4); - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(x); EXIT_REGS(d, i); } @@ -6453,13 +6453,13 @@ MIDFUNC(2,jnf_ROR_b_imm,(RW1 d, IM8 i)) if(i & 0x07) { INIT_REG_b(d); - MOV_ww(REG_WORK1, d); - BFI_wwii(REG_WORK1, REG_WORK1, 8, 8); - ROR_wwi(REG_WORK1, REG_WORK1, i & 0x07); - BFI_wwii(d, REG_WORK1, 0, 8); - + MOV_ww(REG_WORK1, d); + BFI_wwii(REG_WORK1, REG_WORK1, 8, 8); + ROR_wwi(REG_WORK1, REG_WORK1, i & 0x07); + BFI_wwii(d, REG_WORK1, 0, 8); + unlock2(d); - } + } } MENDFUNC(2,jnf_ROR_b_imm,(RW1 d, IM8 i)) @@ -6468,29 +6468,29 @@ MIDFUNC(2,jnf_ROR_w_imm,(RW2 d, IM8 i)) if(i & 0x0f) { INIT_REG_w(d); - MOV_ww(REG_WORK1, d); - BFI_wwii(REG_WORK1, REG_WORK1, 16, 16); - ROR_wwi(REG_WORK1, REG_WORK1, i & 0x0f); - BFI_wwii(d, REG_WORK1, 0, 16); + MOV_ww(REG_WORK1, d); + BFI_wwii(REG_WORK1, REG_WORK1, 16, 16); + ROR_wwi(REG_WORK1, REG_WORK1, i & 0x0f); + BFI_wwii(d, REG_WORK1, 0, 16); unlock2(d); - } + } } MENDFUNC(2,jnf_ROR_w_imm,(RW2 d, IM8 i)) MIDFUNC(2,jnf_ROR_l_imm,(RW4 d, IM8 i)) { if(i & 0x1f) { - if (isconst(d)) { - i = i & 31; - live.state[d].val = (live.state[d].val >> i) | (live.state[d].val << (32-i)); - return; - } + if (isconst(d)) { + i = i & 31; + live.state[d].val = (live.state[d].val >> i) | (live.state[d].val << (32-i)); + return; + } d = rmw(d); - + ROR_wwi(d, d, i & 31); - + unlock2(d); } } @@ -6505,20 +6505,20 @@ MIDFUNC(2,jff_ROR_b_imm,(RW1 d, IM8 i)) LSL_wwi(REG_WORK1, d, 24); if(i & 0x07) { - ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 8); - ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); - ROR_wwi(REG_WORK1, REG_WORK1, i & 0x07); - BFI_wwii(d, REG_WORK1, 0, 8); - } - TST_ww(REG_WORK1, REG_WORK1); - if(i) { - TBZ_wii(REG_WORK1, 31, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } + ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 8); + ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); + ROR_wwi(REG_WORK1, REG_WORK1, i & 0x07); + BFI_wwii(d, REG_WORK1, 0, 8); + } + TST_ww(REG_WORK1, REG_WORK1); + if(i) { + TBZ_wii(REG_WORK1, 31, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_ROR_b_imm,(RW1 d, IM8 i)) @@ -6532,19 +6532,19 @@ MIDFUNC(2,jff_ROR_w_imm,(RW2 d, IM8 i)) LSL_wwi(REG_WORK1, d, 16); if(i & 0x0f) { - ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); - ROR_wwi(REG_WORK1, REG_WORK1, i & 0x0f); - BFI_wwii(d, REG_WORK1, 0, 16); - } - TST_ww(REG_WORK1, REG_WORK1); - if (i) { - TBZ_wii(REG_WORK1, 31, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } + ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); + ROR_wwi(REG_WORK1, REG_WORK1, i & 0x0f); + BFI_wwii(d, REG_WORK1, 0, 16); + } + TST_ww(REG_WORK1, REG_WORK1); + if (i) { + TBZ_wii(REG_WORK1, 31, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_ROR_w_imm,(RW2 d, IM8 i)) @@ -6552,22 +6552,22 @@ MENDFUNC(2,jff_ROR_w_imm,(RW2 d, IM8 i)) MIDFUNC(2,jff_ROR_l_imm,(RW4 d, IM8 i)) { if(i) - d = rmw(d); + d = rmw(d); else d = readreg(d); if(i & 0x1f) { - ROR_wwi(d, d, i & 0x1f); - } - TST_ww(d, d); - if (i) { - TBZ_wii(d, 31, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - } + ROR_wwi(d, d, i & 0x1f); + } + TST_ww(d, d); + if (i) { + TBZ_wii(d, 31, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + } - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(2,jff_ROR_l_imm,(RW4 d, IM8 i)) @@ -6585,7 +6585,7 @@ MIDFUNC(2,jnf_ROR_b,(RW1 d, RR4 i)) ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 8); ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); ROR_www(REG_WORK1, REG_WORK1, i); - BFI_wwii(d, REG_WORK1, 0, 8); + BFI_wwii(d, REG_WORK1, 0, 8); EXIT_REGS(d, i); } @@ -6603,7 +6603,7 @@ MIDFUNC(2,jnf_ROR_w,(RW2 d, RR4 i)) LSL_wwi(REG_WORK1, d, 16); ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); ROR_www(REG_WORK1, REG_WORK1, i); - BFI_wwii(d, REG_WORK1, 0, 16); + BFI_wwii(d, REG_WORK1, 0, 16); EXIT_REGS(d, i); } @@ -6638,16 +6638,16 @@ MIDFUNC(2,jff_ROR_b,(RW1 d, RR4 i)) ORR_wwwLSRi(REG_WORK1, REG_WORK1, REG_WORK1, 16); AND_ww3f(REG_WORK2, i); ROR_www(REG_WORK1, REG_WORK1, REG_WORK2); - BFI_wwii(d, REG_WORK1, 0, 8); + BFI_wwii(d, REG_WORK1, 0, 8); TST_ww(REG_WORK1, REG_WORK1); - - CBZ_wi(REG_WORK2, 5); // C cleared if no shift - TBZ_wii(REG_WORK1, 31, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - - flags_carry_inverted = false; + + CBZ_wi(REG_WORK2, 5); // C cleared if no shift + TBZ_wii(REG_WORK1, 31, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + + flags_carry_inverted = false; EXIT_REGS(d, i); } MENDFUNC(2,jff_ROR_b,(RW1 d, RR4 i)) @@ -6665,16 +6665,16 @@ MIDFUNC(2,jff_ROR_w,(RW2 d, RR4 i)) BFXIL_wwii(REG_WORK1, REG_WORK1, 16, 16); AND_ww3f(REG_WORK2, i); ROR_www(REG_WORK1, REG_WORK1, REG_WORK2); - BFI_wwii(d, REG_WORK1, 0, 16); + BFI_wwii(d, REG_WORK1, 0, 16); TST_ww(REG_WORK1, REG_WORK1); - CBZ_wi(REG_WORK2, 5); // C cleared if no shift - TBZ_wii(REG_WORK1, 31, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + CBZ_wi(REG_WORK2, 5); // C cleared if no shift + TBZ_wii(REG_WORK1, 31, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, i); } MENDFUNC(2,jff_ROR_w,(RW2 d, RR4 i)) @@ -6692,13 +6692,13 @@ MIDFUNC(2,jff_ROR_l,(RW4 d, RR4 i)) ROR_www(d, d, REG_WORK1); TST_ww(d, d); - CBZ_wi(REG_WORK1, 5); // C cleared if no shift - TBZ_wii(d, 31, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + CBZ_wi(REG_WORK1, 5); // C cleared if no shift + TBZ_wii(d, 31, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; EXIT_REGS(d, i); } MENDFUNC(2,jff_ROR_l,(RW4 d, RR4 i)) @@ -6736,12 +6736,12 @@ MIDFUNC(1,jff_RORW,(RW2 d)) ROR_wwi(d, d, 1); TST_ww(d, d); - TBZ_wii(d, 31, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + TBZ_wii(d, 31, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(1,jff_RORW,(RW2 d)) @@ -6762,7 +6762,7 @@ MENDFUNC(1,jff_RORW,(RW2 d)) */ MIDFUNC(2,jnf_ROXR_b,(RW1 d, RR4 i)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_b(d, i); clobber_flags(); @@ -6777,19 +6777,19 @@ MIDFUNC(2,jnf_ROXR_b,(RW1 d, RR4 i)) CMP_wi(REG_WORK1, 8); BLE_i(2); SUB_wwi(REG_WORK1, REG_WORK1, 9); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); CBZ_wi(REG_WORK1, 0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_wwii(REG_WORK2, x, 8, 1); // move x to left side of d BFI_wwii(REG_WORK2, REG_WORK2, 9, 9); // duplicate 9 bits - + LSR_www(REG_WORK2, REG_WORK2, REG_WORK1); BFI_wwii(d, REG_WORK2, 0, 8); - - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); + + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); unlock2(x); EXIT_REGS(d, i); @@ -6798,7 +6798,7 @@ MENDFUNC(2,jnf_ROXR_b,(RW1 d, RR4 i)) MIDFUNC(2,jnf_ROXR_w,(RW2 d, RR4 i)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_w(d, i); clobber_flags(); @@ -6810,19 +6810,19 @@ MIDFUNC(2,jnf_ROXR_w,(RW2 d, RR4 i)) CMP_wi(REG_WORK1, 16); BLE_i(2); SUB_wwi(REG_WORK1, REG_WORK1, 17); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); CBZ_wi(REG_WORK1, 0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_wwii(REG_WORK2, x, 16, 1); // move x to left side of d BFI_xxii(REG_WORK2, REG_WORK2, 17, 17); // duplicate 17 bits LSR_xxx(REG_WORK2, REG_WORK2, REG_WORK1); BFI_wwii(d, REG_WORK2, 0, 16); - - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); + + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); unlock2(x); EXIT_REGS(d, i); @@ -6831,27 +6831,27 @@ MENDFUNC(2,jnf_ROXR_w,(RW2 d, RR4 i)) MIDFUNC(2,jnf_ROXR_l,(RW4 d, RR4 i)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_l(d, i); clobber_flags(); - + AND_ww3f(REG_WORK1, i); CMP_wi(REG_WORK1, 32); BLE_i(2); SUB_wwi(REG_WORK1, REG_WORK1, 33); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); CBZ_wi(REG_WORK1, 0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_xxii(REG_WORK2, x, 32, 1); // move x to left side of d BFI_xxii(REG_WORK2, REG_WORK2, 33, 31); // duplicate 31 bits LSR_xxx(d, REG_WORK2, REG_WORK1); - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); unlock2(x); EXIT_REGS(d, i); @@ -6861,7 +6861,7 @@ MENDFUNC(2,jnf_ROXR_l,(RW4 d, RR4 i)) MIDFUNC(2,jff_ROXR_b,(RW1 d, RR4 i)) { INIT_REGS_b(d, i); - int x = rmw(FLAGX); + int x = rmw(FLAGX); AND_ww3f(REG_WORK1, i); CMP_wi(REG_WORK1, 35); @@ -6877,34 +6877,34 @@ MIDFUNC(2,jff_ROXR_b,(RW1 d, RR4 i)) LSL_wwi(REG_WORK1, d, 24); TST_ww(REG_WORK1, REG_WORK1); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); B_i(0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_wwii(REG_WORK2, x, 8, 1); // move x to left side of d BFI_wwii(REG_WORK2, REG_WORK2, 9, 9); // duplicate 9 bits - + LSR_www(REG_WORK3, REG_WORK2, REG_WORK1); BFI_wwii(d, REG_WORK3, 0, 8); - // calc N and Z - LSL_wwi(REG_WORK3, REG_WORK3, 24); - TST_ww(REG_WORK3, REG_WORK3); - + // calc N and Z + LSL_wwi(REG_WORK3, REG_WORK3, 24); + TST_ww(REG_WORK3, REG_WORK3); + // calc C and X SUB_wwi(REG_WORK1, REG_WORK1, 1); LSR_www(REG_WORK3, REG_WORK2, REG_WORK1); UBFIZ_wwii(x, REG_WORK3, 0, 1); - TBZ_wii(x, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); - - flags_carry_inverted = false; + TBZ_wii(x, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); + + flags_carry_inverted = false; unlock2(x); EXIT_REGS(d, i); } @@ -6913,7 +6913,7 @@ MENDFUNC(2,jff_ROXR_b,(RW1 d, RR4 i)) MIDFUNC(2,jff_ROXR_w,(RW2 d, RR4 i)) { INIT_REGS_w(d, i); - int x = rmw(FLAGX); + int x = rmw(FLAGX); AND_ww3f(REG_WORK1, i); CMP_wi(REG_WORK1, 33); @@ -6926,10 +6926,10 @@ MIDFUNC(2,jff_ROXR_w,(RW2 d, RR4 i)) LSL_wwi(REG_WORK1, d, 16); TST_ww(REG_WORK1, REG_WORK1); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); B_i(0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_wwii(REG_WORK2, x, 16, 1); // move x to left side of d BFI_xxii(REG_WORK2, REG_WORK2, 17, 17); // duplicate 17 bits @@ -6937,23 +6937,23 @@ MIDFUNC(2,jff_ROXR_w,(RW2 d, RR4 i)) LSR_xxx(REG_WORK3, REG_WORK2, REG_WORK1); BFI_wwii(d, REG_WORK3, 0, 16); - // calc N and Z - LSL_wwi(REG_WORK3, REG_WORK3, 16); - TST_ww(REG_WORK3, REG_WORK3); - + // calc N and Z + LSL_wwi(REG_WORK3, REG_WORK3, 16); + TST_ww(REG_WORK3, REG_WORK3); + // calc C and X SUB_wwi(REG_WORK1, REG_WORK1, 1); LSR_www(REG_WORK3, REG_WORK2, REG_WORK1); UBFIZ_wwii(x, REG_WORK3, 0, 1); - TBZ_wii(x, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); - - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); - - flags_carry_inverted = false; + TBZ_wii(x, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); + + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); + + flags_carry_inverted = false; unlock2(x); EXIT_REGS(d, i); } @@ -6962,7 +6962,7 @@ MENDFUNC(2,jff_ROXR_w,(RW2 d, RR4 i)) MIDFUNC(2,jff_ROXR_l,(RW4 d, RR4 i)) { INIT_REGS_l(d, i); - int x = rmw(FLAGX); + int x = rmw(FLAGX); AND_ww3f(REG_WORK1, i); CMP_wi(REG_WORK1, 32); @@ -6971,32 +6971,32 @@ MIDFUNC(2,jff_ROXR_l,(RW4 d, RR4 i)) CBNZ_wi(REG_WORK1, 3); // need to rotate TST_ww(d, d); - uae_u32* branchadd = (uae_u32*)get_target(); + uae_u32* branchadd = (uae_u32*)get_target(); B_i(0); // end of op - // need to rotate + // need to rotate MOV_ww(REG_WORK2, d); BFI_xxii(REG_WORK2, x, 32, 1); // move x to left side of d BFI_xxii(REG_WORK2, REG_WORK2, 33, 31); // duplicate 31 bits LSR_xxx(d, REG_WORK2, REG_WORK1); - // Calculate NZ + // Calculate NZ TST_ww(d, d); - // Calculate C + // Calculate C SUB_wwi(REG_WORK1, REG_WORK1, 1); LSR_xxx(REG_WORK3, REG_WORK2, REG_WORK1); UBFIZ_wwii(x, REG_WORK3, 0, 1); - TBZ_wii(x, 0, 4); - MRS_NZCV_x(REG_WORK4); - SET_xxCflag(REG_WORK4, REG_WORK4); - MSR_NZCV_x(REG_WORK4); + TBZ_wii(x, 0, 4); + MRS_NZCV_x(REG_WORK4); + SET_xxCflag(REG_WORK4, REG_WORK4); + MSR_NZCV_x(REG_WORK4); - // end of op - write_jmp_target(branchadd, (uintptr)get_target()); + // end of op + write_jmp_target(branchadd, (uintptr)get_target()); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(x); EXIT_REGS(d, i); } @@ -7008,30 +7008,30 @@ MENDFUNC(2,jff_ROXR_l,(RW4 d, RR4 i)) */ MIDFUNC(2,jnf_SCC,(W1 d, IM8 cc)) { - FIX_INVERTED_CARRY + FIX_INVERTED_CARRY INIT_WREG_b(d); - - switch (cc) { + + switch (cc) { case 9: // LS - CSETM_wc(REG_WORK1, NATIVE_CC_CS); + CSETM_wc(REG_WORK1, NATIVE_CC_CS); CSETM_wc(REG_WORK2, NATIVE_CC_EQ); ORR_www(REG_WORK1, REG_WORK1, REG_WORK2); break; case 8: // HI - CSETM_wc(REG_WORK1, NATIVE_CC_CC); - CSETM_wc(REG_WORK2, NATIVE_CC_NE); - AND_www(REG_WORK1, REG_WORK1, REG_WORK2); + CSETM_wc(REG_WORK1, NATIVE_CC_CC); + CSETM_wc(REG_WORK2, NATIVE_CC_NE); + AND_www(REG_WORK1, REG_WORK1, REG_WORK2); break; default: - CSETM_wc(REG_WORK1, cc); + CSETM_wc(REG_WORK1, cc); break; } - BFI_wwii(d, REG_WORK1, 0, 8); - - unlock2(d); + BFI_wwii(d, REG_WORK1, 0, 8); + + unlock2(d); } MENDFUNC(2,jnf_SCC,(W1 d, IM8 cc)) @@ -7059,8 +7059,8 @@ MIDFUNC(2,jnf_SUB_b_imm,(RW1 d, IM8 v)) INIT_REG_b(d); if(targetIsReg) { - SUB_wwi(REG_WORK1, d, v & 0xff); - BFI_xxii(d, REG_WORK1, 0, 8); + SUB_wwi(REG_WORK1, d, v & 0xff); + BFI_xxii(d, REG_WORK1, 0, 8); } else { SUB_wwi(d, d, v & 0xff); } @@ -7080,7 +7080,7 @@ MIDFUNC(2,jnf_SUB_b,(RW1 d, RR1 s)) if(targetIsReg) { SUB_www(REG_WORK1, d, s); - BFI_xxii(d, REG_WORK1, 0, 8); + BFI_xxii(d, REG_WORK1, 0, 8); } else { SUB_www(d, d, s); } @@ -7101,7 +7101,7 @@ MIDFUNC(2,jnf_SUB_w_imm,(RW2 d, IM16 v)) UNSIGNED16_IMM_2_REG(REG_WORK1, (uae_u16)v); if(targetIsReg) { SUB_www(REG_WORK1, d, REG_WORK1); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); } else{ SUB_www(d, d, REG_WORK1); } @@ -7121,7 +7121,7 @@ MIDFUNC(2,jnf_SUB_w,(RW2 d, RR2 s)) if(targetIsReg) { SUB_www(REG_WORK1, d, s); - BFI_xxii(d, REG_WORK1, 0, 16); + BFI_xxii(d, REG_WORK1, 0, 16); } else{ SUB_www(d, d, s); } @@ -7139,12 +7139,12 @@ MIDFUNC(2,jnf_SUB_l_imm,(RW2 d, IM32 v)) d = rmw(d); - if(v >= 0 && v < 4096) { - SUB_wwi(d, d, v); - } else { - LOAD_U32(REG_WORK1, v); - SUB_www(d, d, REG_WORK1); - } + if(v >= 0 && v < 4096) { + SUB_wwi(d, d, v); + } else { + LOAD_U32(REG_WORK1, v); + SUB_www(d, d, REG_WORK1); + } unlock2(d); } @@ -7173,9 +7173,9 @@ MIDFUNC(2,jff_SUB_b_imm,(RW1 d, IM8 v)) MOV_wish(REG_WORK2, (v & 0xff) << 8, 16); SUBS_www(REG_WORK1, REG_WORK1, REG_WORK2); BFXIL_xxii(d, REG_WORK1, 24, 8); - - flags_carry_inverted = true; - DUPLICACTE_CARRY + + flags_carry_inverted = true; + DUPLICACTE_CARRY unlock2(d); } @@ -7194,8 +7194,8 @@ MIDFUNC(2,jff_SUB_b,(RW1 d, RR1 s)) SUBS_wwwLSLi(REG_WORK1, REG_WORK1, s, 24); BFXIL_xxii(d, REG_WORK1, 24, 8); - flags_carry_inverted = true; - DUPLICACTE_CARRY + flags_carry_inverted = true; + DUPLICACTE_CARRY EXIT_REGS(d, s); } @@ -7205,13 +7205,13 @@ MIDFUNC(2,jff_SUB_w_imm,(RW2 d, IM16 v)) { INIT_REG_w(d); - MOV_xi(REG_WORK1, v); + MOV_xi(REG_WORK1, v); LSL_wwi(REG_WORK2, d, 16); SUBS_wwwLSLi(REG_WORK1, REG_WORK2, REG_WORK1, 16); - BFXIL_xxii(d, REG_WORK1, 16, 16); + BFXIL_xxii(d, REG_WORK1, 16, 16); - flags_carry_inverted = true; - DUPLICACTE_CARRY + flags_carry_inverted = true; + DUPLICACTE_CARRY unlock2(d); } @@ -7227,11 +7227,11 @@ MIDFUNC(2,jff_SUB_w,(RW2 d, RR2 s)) INIT_REGS_w(d, s); LSL_wwi(REG_WORK1, d, 16); - SUBS_wwwLSLi(REG_WORK1, REG_WORK1, s, 16); - BFXIL_xxii(d, REG_WORK1, 16, 16); + SUBS_wwwLSLi(REG_WORK1, REG_WORK1, s, 16); + BFXIL_xxii(d, REG_WORK1, 16, 16); - flags_carry_inverted = true; - DUPLICACTE_CARRY + flags_carry_inverted = true; + DUPLICACTE_CARRY EXIT_REGS(d, s); } @@ -7241,15 +7241,15 @@ MIDFUNC(2,jff_SUB_l_imm,(RW4 d, IM32 v)) { d = rmw(d); - if(v >= 0 && v < 4096) { - SUBS_wwi(d, d, v); - } else { - LOAD_U32(REG_WORK1, v); - SUBS_www(d, d, REG_WORK1); - } + if(v >= 0 && v < 4096) { + SUBS_wwi(d, d, v); + } else { + LOAD_U32(REG_WORK1, v); + SUBS_www(d, d, REG_WORK1); + } - flags_carry_inverted = true; - DUPLICACTE_CARRY + flags_carry_inverted = true; + DUPLICACTE_CARRY unlock2(d); } @@ -7266,8 +7266,8 @@ MIDFUNC(2,jff_SUB_l,(RW4 d, RR4 s)) SUBS_www(d, d, s); - flags_carry_inverted = true; - DUPLICACTE_CARRY + flags_carry_inverted = true; + DUPLICACTE_CARRY EXIT_REGS(d, s); } @@ -7292,11 +7292,11 @@ MIDFUNC(2,jnf_SUBA_w_imm,(RW4 d, IM16 v)) d = rmw(d); if(v >= 0 && v < 4096) { - SUB_wwi(d, d, v); + SUB_wwi(d, d, v); } else { - SIGNED16_IMM_2_REG(REG_WORK1, v); - SUB_www(d, d, REG_WORK1); - } + SIGNED16_IMM_2_REG(REG_WORK1, v); + SUB_www(d, d, REG_WORK1); + } unlock2(d); } MENDFUNC(2,jnf_SUBA_w_imm,(RW4 d, IM16 v)) @@ -7307,7 +7307,7 @@ MIDFUNC(2,jnf_SUBA_w,(RW4 d, RR2 s)) COMPCALL(jnf_SUBA_w_imm)(d, live.state[s].val & 0xffff); return; } - + INIT_REGS_w(d, s); SUB_wwwEX(d, d, s, EX_SXTH); @@ -7326,12 +7326,12 @@ MIDFUNC(2,jnf_SUBA_l_imm,(RW4 d, IM32 v)) d = rmw(d); if(v >= 0 && v < 4096) { - SUB_wwi(d, d, v); + SUB_wwi(d, d, v); } else { - LOAD_U32(REG_WORK1, v); - SUB_www(d, d, REG_WORK1); - } - + LOAD_U32(REG_WORK1, v); + SUB_www(d, d, REG_WORK1); + } + unlock2(d); } MENDFUNC(2,jnf_SUBA_l_imm,(RW4 d, IM32 v)) @@ -7369,13 +7369,13 @@ MENDFUNC(2,jnf_SUBA_l,(RW4 d, RR4 s)) */ MIDFUNC(2,jnf_SUBX_b,(RW1 d, RR1 s)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_b(d, s); - clobber_flags(); + clobber_flags(); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); LSL_wwi(REG_WORK1, d, 24); LSL_wwi(REG_WORK2, s, 24); @@ -7389,13 +7389,13 @@ MENDFUNC(2,jnf_SUBX_b,(RW1 d, RR1 s)) MIDFUNC(2,jnf_SUBX_w,(RW2 d, RR2 s)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_w(d, s); - clobber_flags(); + clobber_flags(); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); LSL_wwi(REG_WORK1, d, 16); LSL_wwi(REG_WORK2, s, 16); @@ -7409,13 +7409,13 @@ MENDFUNC(2,jnf_SUBX_w,(RW2 d, RR2 s)) MIDFUNC(2,jnf_SUBX_l,(RW4 d, RR4 s)) { - int x = readreg(FLAGX); + int x = readreg(FLAGX); INIT_REGS_l(d, s); - clobber_flags(); + clobber_flags(); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); SBC_www(d, d, s); @@ -7427,14 +7427,14 @@ MENDFUNC(2,jnf_SUBX_l,(RW4 d, RR4 s)) MIDFUNC(2,jff_SUBX_b,(RW1 d, RR1 s)) { INIT_REGS_b(d, s); - int x = rmw(FLAGX); + int x = rmw(FLAGX); MOVN_xi(REG_WORK2, 0); MOVN_xish(REG_WORK1, 0x4000, 16); // inverse Z flag CSEL_xxxc(REG_WORK2, REG_WORK1, REG_WORK2, NATIVE_CC_NE); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); LSL_wwi(REG_WORK1, d, 24); LSL_wwi(REG_WORK3, s, 24); @@ -7442,12 +7442,12 @@ MIDFUNC(2,jff_SUBX_b,(RW1 d, RR1 s)) BFXIL_wwii(d, REG_WORK1, 24, 8); MRS_NZCV_x(REG_WORK1); - EOR_xxCflag(REG_WORK1, REG_WORK1); + EOR_xxCflag(REG_WORK1, REG_WORK1); AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; if (needed_flags & FLAG_X) - UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry + UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry unlock2(x); EXIT_REGS(d, s); @@ -7457,14 +7457,14 @@ MENDFUNC(2,jff_SUBX_b,(RW1 d, RR1 s)) MIDFUNC(2,jff_SUBX_w,(RW2 d, RR2 s)) { INIT_REGS_w(d, s); - int x = rmw(FLAGX); + int x = rmw(FLAGX); MOVN_xi(REG_WORK2, 0); MOVN_xish(REG_WORK1, 0x4000, 16); // inverse Z flag CSEL_xxxc(REG_WORK2, REG_WORK1, REG_WORK2, NATIVE_CC_NE); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); LSL_wwi(REG_WORK1, d, 16); LSL_wwi(REG_WORK3, s, 16); @@ -7472,12 +7472,12 @@ MIDFUNC(2,jff_SUBX_w,(RW2 d, RR2 s)) BFXIL_wwii(d, REG_WORK1, 16, 16); MRS_NZCV_x(REG_WORK1); - EOR_xxCflag(REG_WORK1, REG_WORK1); + EOR_xxCflag(REG_WORK1, REG_WORK1); AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; if (needed_flags & FLAG_X) - UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry + UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry unlock2(x); EXIT_REGS(d, s); @@ -7487,24 +7487,24 @@ MENDFUNC(2,jff_SUBX_w,(RW2 d, RR2 s)) MIDFUNC(2,jff_SUBX_l,(RW4 d, RR4 s)) { INIT_REGS_l(d, s); - int x = rmw(FLAGX); + int x = rmw(FLAGX); MOVN_xi(REG_WORK2, 0); MOVN_xish(REG_WORK1, 0x4000, 16); // inverse Z flag CSEL_xxxc(REG_WORK2, REG_WORK1, REG_WORK2, NATIVE_CC_NE); // Restore inverted X to carry (don't care about other flags) - NEGS_ww(REG_WORK1, x); + NEGS_ww(REG_WORK1, x); SBCS_www(d, d, s); MRS_NZCV_x(REG_WORK1); - EOR_xxCflag(REG_WORK1, REG_WORK1); + EOR_xxCflag(REG_WORK1, REG_WORK1); AND_xxx(REG_WORK1, REG_WORK1, REG_WORK2); MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; if (needed_flags & FLAG_X) - UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry + UBFX_xxii(x, REG_WORK1, 29, 1); // Duplicate carry unlock2(x); EXIT_REGS(d, s); @@ -7541,25 +7541,25 @@ MENDFUNC(1,jnf_SWAP,(RW4 d)) MIDFUNC(1,jff_SWAP,(RW4 d)) { - if(isconst(d)) { - live.state[d].val = (live.state[d].val >> 16) | (live.state[d].val << 16); - uae_u32 f = 0; - if((uae_s32)live.state[d].val == 0) - f |= (ARM_Z_FLAG >> 16); - if((uae_s32)live.state[d].val < 0) - f |= (ARM_N_FLAG >> 16); - MOV_xish(REG_WORK1, f, 16); - MSR_NZCV_x(REG_WORK1); - flags_carry_inverted = false; - return; - } + if(isconst(d)) { + live.state[d].val = (live.state[d].val >> 16) | (live.state[d].val << 16); + uae_u32 f = 0; + if((uae_s32)live.state[d].val == 0) + f |= (ARM_Z_FLAG >> 16); + if((uae_s32)live.state[d].val < 0) + f |= (ARM_N_FLAG >> 16); + MOV_xish(REG_WORK1, f, 16); + MSR_NZCV_x(REG_WORK1); + flags_carry_inverted = false; + return; + } d = rmw(d); ROR_wwi(d, d, 16); TST_ww(d, d); - flags_carry_inverted = false; + flags_carry_inverted = false; unlock2(d); } MENDFUNC(1,jff_SWAP,(RW4 d)) @@ -7581,7 +7581,7 @@ MIDFUNC(1,jff_TST_b_imm,(IM8 v)) { SIGNED8_IMM_2_REG(REG_WORK1, (uae_u8)v); TST_ww(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; } MENDFUNC(1,jff_TST_b_imm,(IM8 v)) @@ -7597,7 +7597,7 @@ MIDFUNC(1,jff_TST_b,(RR1 s)) unlock2(s); TST_ww(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; } MENDFUNC(1,jff_TST_b,(RR1 s)) @@ -7605,7 +7605,7 @@ MIDFUNC(1,jff_TST_w_imm,(IM16 v)) { SIGNED16_IMM_2_REG(REG_WORK1, (uae_u16)v); TST_ww(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; } MENDFUNC(1,jff_TST_w_imm,(IM16 v)) @@ -7621,29 +7621,29 @@ MIDFUNC(1,jff_TST_w,(RR2 s)) unlock2(s); TST_ww(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; } MENDFUNC(1,jff_TST_w,(RR2 s)) MIDFUNC(1,jff_TST_l_imm,(IM32 v)) { - LOAD_U32(REG_WORK1, v); + LOAD_U32(REG_WORK1, v); TST_ww(REG_WORK1, REG_WORK1); - flags_carry_inverted = false; + flags_carry_inverted = false; } MENDFUNC(1,jff_TST_l_imm,(IM32 v)) MIDFUNC(1,jff_TST_l,(RR4 s)) { - if(isconst(s)) { + if(isconst(s)) { COMPCALL(jff_TST_l_imm)(live.state[s].val); - return; - } + return; + } s = readreg(s); TST_ww(s, s); unlock2(s); - flags_carry_inverted = false; + flags_carry_inverted = false; } MENDFUNC(1,jff_TST_l,(RR4 s)) @@ -7655,242 +7655,242 @@ MENDFUNC(1,jff_TST_l,(RR4 s)) */ MIDFUNC(2,jnf_MEM_WRITE_OFF_b,(RR4 adr, RR4 b)) { - adr = readreg(adr); + adr = readreg(adr); b = readreg(b); - - STRB_wXx(b, adr, R_MEMSTART); - - unlock2(b); - unlock2(adr); + + STRB_wXx(b, adr, R_MEMSTART); + + unlock2(b); + unlock2(adr); } MENDFUNC(2,jnf_MEM_WRITE_OFF_b,(RR4 adr, RR4 b)) MIDFUNC(2,jnf_MEM_WRITE_OFF_w,(RR4 adr, RR4 w)) { - adr = readreg(adr); + adr = readreg(adr); w = readreg(w); - - REV16_ww(REG_WORK1, w); - STRH_wXx(REG_WORK1, adr, R_MEMSTART); - - unlock2(w); - unlock2(adr); + + REV16_ww(REG_WORK1, w); + STRH_wXx(REG_WORK1, adr, R_MEMSTART); + + unlock2(w); + unlock2(adr); } MENDFUNC(2,jnf_MEM_WRITE_OFF_w,(RR4 adr, RR4 w)) MIDFUNC(2,jnf_MEM_WRITE_OFF_l,(RR4 adr, RR4 l)) { - adr = readreg(adr); - l = readreg(l); - - REV32_xx(REG_WORK1, l); - STR_wXx(REG_WORK1, adr, R_MEMSTART); - - unlock2(l); - unlock2(adr); + adr = readreg(adr); + l = readreg(l); + + REV32_xx(REG_WORK1, l); + STR_wXx(REG_WORK1, adr, R_MEMSTART); + + unlock2(l); + unlock2(adr); } MENDFUNC(2,jnf_MEM_WRITE_OFF_l,(RR4 adr, RR4 l)) MIDFUNC(2,jnf_MEM_READ_OFF_b,(W4 d, RR4 adr)) { - adr = readreg(adr); - d = writereg(d); - - LDRB_wXx(d, adr, R_MEMSTART); - - unlock2(d); - unlock2(adr); + adr = readreg(adr); + d = writereg(d); + + LDRB_wXx(d, adr, R_MEMSTART); + + unlock2(d); + unlock2(adr); } MENDFUNC(2,jnf_MEM_READ_OFF_b,(W4 d, RR4 adr)) MIDFUNC(2,jnf_MEM_READ_OFF_w,(W4 d, RR4 adr)) { - adr = readreg(adr); - d = writereg(d); - - LDRH_wXx(REG_WORK1, adr, R_MEMSTART); - REV16_ww(d, REG_WORK1); - - unlock2(d); - unlock2(adr); + adr = readreg(adr); + d = writereg(d); + + LDRH_wXx(REG_WORK1, adr, R_MEMSTART); + REV16_ww(d, REG_WORK1); + + unlock2(d); + unlock2(adr); } MENDFUNC(2,jnf_MEM_READ_OFF_w,(W4 d, RR4 adr)) MIDFUNC(2,jnf_MEM_READ_OFF_l,(W4 d, RR4 adr)) { - adr = readreg(adr); - d = writereg(d); - - LDR_wXx(REG_WORK1, adr, R_MEMSTART); - REV32_xx(d, REG_WORK1); - - unlock2(d); - unlock2(adr); + adr = readreg(adr); + d = writereg(d); + + LDR_wXx(REG_WORK1, adr, R_MEMSTART); + REV32_xx(d, REG_WORK1); + + unlock2(d); + unlock2(adr); } MENDFUNC(2,jnf_MEM_READ_OFF_l,(W4 d, RR4 adr)) MIDFUNC(2,jnf_MEM_WRITE24_OFF_b,(RR4 adr, RR4 b)) { - adr = readreg(adr); - b = readreg(b); - - UBFIZ_xxii(REG_WORK1, adr, 0, 24); - STRB_wXx(b, REG_WORK1, R_MEMSTART); - - unlock2(b); - unlock2(adr); + adr = readreg(adr); + b = readreg(b); + + UBFIZ_xxii(REG_WORK1, adr, 0, 24); + STRB_wXx(b, REG_WORK1, R_MEMSTART); + + unlock2(b); + unlock2(adr); } MENDFUNC(2,jnf_MEM_WRITE24_OFF_b,(RR4 adr, RR4 b)) MIDFUNC(2,jnf_MEM_WRITE24_OFF_w,(RR4 adr, RR4 w)) { - adr = readreg(adr); - w = readreg(w); - - UBFIZ_xxii(REG_WORK1, adr, 0, 24); - REV16_ww(REG_WORK3, w); - STRH_wXx(REG_WORK3, REG_WORK1, R_MEMSTART); - - unlock2(w); - unlock2(adr); + adr = readreg(adr); + w = readreg(w); + + UBFIZ_xxii(REG_WORK1, adr, 0, 24); + REV16_ww(REG_WORK3, w); + STRH_wXx(REG_WORK3, REG_WORK1, R_MEMSTART); + + unlock2(w); + unlock2(adr); } MENDFUNC(2,jnf_MEM_WRITE24_OFF_w,(RR4 adr, RR4 w)) MIDFUNC(2,jnf_MEM_WRITE24_OFF_l,(RR4 adr, RR4 l)) { - adr = readreg(adr); - l = readreg(l); - - UBFIZ_xxii(REG_WORK1, adr, 0, 24); - REV32_xx(REG_WORK3, l); - STR_wXx(REG_WORK3, REG_WORK1, R_MEMSTART); - - unlock2(l); - unlock2(adr); + adr = readreg(adr); + l = readreg(l); + + UBFIZ_xxii(REG_WORK1, adr, 0, 24); + REV32_xx(REG_WORK3, l); + STR_wXx(REG_WORK3, REG_WORK1, R_MEMSTART); + + unlock2(l); + unlock2(adr); } MENDFUNC(2,jnf_MEM_WRITE24_OFF_l,(RR4 adr, RR4 l)) MIDFUNC(2,jnf_MEM_READ24_OFF_b,(W4 d, RR4 adr)) { - adr = readreg(adr); - d = writereg(d); - - UBFIZ_xxii(REG_WORK1, adr, 0, 24); - LDRB_wXx(d, REG_WORK1, R_MEMSTART); - - unlock2(d); - unlock2(adr); + adr = readreg(adr); + d = writereg(d); + + UBFIZ_xxii(REG_WORK1, adr, 0, 24); + LDRB_wXx(d, REG_WORK1, R_MEMSTART); + + unlock2(d); + unlock2(adr); } MENDFUNC(2,jnf_MEM_READ24_OFF_b,(W4 d, RR4 adr)) MIDFUNC(2,jnf_MEM_READ24_OFF_w,(W4 d, RR4 adr)) { - adr = readreg(adr); - d = writereg(d); - - UBFIZ_xxii(REG_WORK1, adr, 0, 24); - LDRH_wXx(REG_WORK1, REG_WORK1, R_MEMSTART); - REV16_ww(d, REG_WORK1); - - unlock2(d); - unlock2(adr); + adr = readreg(adr); + d = writereg(d); + + UBFIZ_xxii(REG_WORK1, adr, 0, 24); + LDRH_wXx(REG_WORK1, REG_WORK1, R_MEMSTART); + REV16_ww(d, REG_WORK1); + + unlock2(d); + unlock2(adr); } MENDFUNC(2,jnf_MEM_READ24_OFF_w,(W4 d, RR4 adr)) MIDFUNC(2,jnf_MEM_READ24_OFF_l,(W4 d, RR4 adr)) { - adr = readreg(adr); - d = writereg(d); - - UBFIZ_xxii(REG_WORK1, adr, 0, 24); - LDR_wXx(d, REG_WORK1, R_MEMSTART); - REV32_xx(d, d); - - unlock2(d); - unlock2(adr); + adr = readreg(adr); + d = writereg(d); + + UBFIZ_xxii(REG_WORK1, adr, 0, 24); + LDR_wXx(d, REG_WORK1, R_MEMSTART); + REV32_xx(d, d); + + unlock2(d); + unlock2(adr); } MENDFUNC(2,jnf_MEM_READ24_OFF_l,(W4 d, RR4 adr)) MIDFUNC(2,jnf_MEM_GETADR_OFF,(W4 d, RR4 adr)) { - adr = readreg(adr); - d = writereg(d); - - ADD_www(d, adr, R_MEMSTART); - - unlock2(d); - unlock2(adr); + adr = readreg(adr); + d = writereg(d); + + ADD_www(d, adr, R_MEMSTART); + + unlock2(d); + unlock2(adr); } MENDFUNC(2,jnf_MEM_GETADR_OFF,(W4 d, RR4 adr)) MIDFUNC(2,jnf_MEM_GETADR24_OFF,(W4 d, RR4 adr)) { - adr = readreg(adr); - d = writereg(d); - - UBFIZ_xxii(REG_WORK1, adr, 0, 24); - ADD_www(d, REG_WORK1, R_MEMSTART); - - unlock2(d); - unlock2(adr); + adr = readreg(adr); + d = writereg(d); + + UBFIZ_xxii(REG_WORK1, adr, 0, 24); + ADD_www(d, REG_WORK1, R_MEMSTART); + + unlock2(d); + unlock2(adr); } MENDFUNC(2,jnf_MEM_GETADR24_OFF,(W4 d, RR4 adr)) MIDFUNC(3,jnf_MEM_READMEMBANK,(W4 dest, RR4 adr, IM8 offset)) { - clobber_flags(); - if (dest != adr) { - COMPCALL(forget_about)(dest); - } + clobber_flags(); + if (dest != adr) { + COMPCALL(forget_about)(dest); + } - adr = readreg_specific(adr, REG_PAR1); - prepare_for_call_1(); - unlock2(adr); - prepare_for_call_2(); - - uintptr idx = (uintptr)(®s.mem_banks) - (uintptr)(®s); - LDR_xXi(REG_WORK2, R_REGSTRUCT, idx); - LSR_wwi(REG_WORK1, adr, 16); - LDR_xXxLSLi(REG_WORK3, REG_WORK2, REG_WORK1, 1); // 1 means shift by 3 - LDR_xXi(REG_WORK3, REG_WORK3, offset); - - compemu_raw_call_r(REG_WORK3); - - live.nat[REG_RESULT].holds[0] = dest; - live.nat[REG_RESULT].nholds = 1; - live.nat[REG_RESULT].touched = touchcnt++; - - live.state[dest].realreg = REG_RESULT; - live.state[dest].realind = 0; - live.state[dest].val = 0; - set_status(dest, DIRTY); + adr = readreg_specific(adr, REG_PAR1); + prepare_for_call_1(); + unlock2(adr); + prepare_for_call_2(); + + uintptr idx = (uintptr)(®s.mem_banks) - (uintptr)(®s); + LDR_xXi(REG_WORK2, R_REGSTRUCT, idx); + LSR_wwi(REG_WORK1, adr, 16); + LDR_xXxLSLi(REG_WORK3, REG_WORK2, REG_WORK1, 1); // 1 means shift by 3 + LDR_xXi(REG_WORK3, REG_WORK3, offset); + + compemu_raw_call_r(REG_WORK3); + + live.nat[REG_RESULT].holds[0] = dest; + live.nat[REG_RESULT].nholds = 1; + live.nat[REG_RESULT].touched = touchcnt++; + + live.state[dest].realreg = REG_RESULT; + live.state[dest].realind = 0; + live.state[dest].val = 0; + set_status(dest, DIRTY); } MENDFUNC(3,jnf_MEM_READMEMBANK,(W4 dest, RR4 adr, IM8 offset)) MIDFUNC(3,jnf_MEM_WRITEMEMBANK,(RR4 adr, RR4 source, IM8 offset)) { - clobber_flags(); - - adr = readreg_specific(adr, REG_PAR1); - source = readreg_specific(source, REG_PAR2); - prepare_for_call_1(); - unlock2(adr); - unlock2(source); - prepare_for_call_2(); - - uintptr idx = (uintptr)(®s.mem_banks) - (uintptr)(®s); - LDR_xXi(REG_WORK2, R_REGSTRUCT, idx); - LSR_wwi(REG_WORK1, adr, 16); - LDR_xXxLSLi(REG_WORK3, REG_WORK2, REG_WORK1, 1); // 1 means shift by 3 - LDR_xXi(REG_WORK3, REG_WORK3, offset); - - compemu_raw_call_r(REG_WORK3); + clobber_flags(); + + adr = readreg_specific(adr, REG_PAR1); + source = readreg_specific(source, REG_PAR2); + prepare_for_call_1(); + unlock2(adr); + unlock2(source); + prepare_for_call_2(); + + uintptr idx = (uintptr)(®s.mem_banks) - (uintptr)(®s); + LDR_xXi(REG_WORK2, R_REGSTRUCT, idx); + LSR_wwi(REG_WORK1, adr, 16); + LDR_xXxLSLi(REG_WORK3, REG_WORK2, REG_WORK1, 1); // 1 means shift by 3 + LDR_xXi(REG_WORK3, REG_WORK3, offset); + + compemu_raw_call_r(REG_WORK3); } MENDFUNC(3,jnf_MEM_WRITEMEMBANK,(RR4 adr, RR4 source, IM8 offset)) diff --git a/src/jit/arm/compemu_support_arm.cpp b/src/jit/arm/compemu_support_arm.cpp new file mode 100644 index 000000000..c79be0581 --- /dev/null +++ b/src/jit/arm/compemu_support_arm.cpp @@ -0,0 +1,3084 @@ +/* + * compiler/compemu_support.cpp - Core dynamic translation engine + * + * Copyright (c) 2001-2009 Milan Jurik of ARAnyM dev team (see AUTHORS) + * + * Inspired by Christian Bauer's Basilisk II + * + * This file is part of the ARAnyM project which builds a new and powerful + * TOS/FreeMiNT compatible virtual machine running on almost any hardware. + * + * JIT compiler m68k -> ARM + * + * Original 68040 JIT compiler for UAE, copyright 2000-2002 Bernd Meyer + * Adaptation for Basilisk II and improvements, copyright 2000-2004 Gwenole Beauchesne + * Portions related to CPU detection come from linux/arch/i386/kernel/setup.c + * + * ARAnyM is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * ARAnyM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ARAnyM; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "sysdeps.h" + +#include + +#include "sysconfig.h" +#include "sysdeps.h" + +#if defined(JIT) + +#include "options.h" +#include "events.h" +#include "include/memory.h" +#include "newcpu.h" +#include "comptbl_arm.h" +#include "compemu_arm.h" +#include + +#if defined(__pie__) || defined (__PIE__) +#error Position-independent code (PIE) cannot be used with JIT +#endif + +#ifdef __MACH__ +// Needed for sys_cache_invalidate to on the JIT space region, Mac OS X specific +#include +#endif + +#include "uae/vm.h" +#define VM_PAGE_READ UAE_VM_READ +#define VM_PAGE_WRITE UAE_VM_WRITE +#define VM_PAGE_EXECUTE UAE_VM_EXECUTE +#define VM_MAP_FAILED UAE_VM_ALLOC_FAILED +#define VM_MAP_DEFAULT 1 +#define VM_MAP_32BIT 1 +#define vm_protect(address, size, protect) uae_vm_protect(address, size, protect) +#define vm_release(address, size) uae_vm_free(address, size) + +static inline void *vm_acquire(uae_u32 size, int options = VM_MAP_DEFAULT) +{ + assert(options == (VM_MAP_DEFAULT | VM_MAP_32BIT)); + return uae_vm_alloc(size, UAE_VM_32BIT, UAE_VM_READ_WRITE); +} + +#define UNUSED(x) +#if defined(CPU_AARCH64) +#define PRINT_PTR "%016llx" +#else +#define PRINT_PTR "%08x" +#endif + +#define jit_log(format, ...) \ + write_log("JIT: " format "\n", ##__VA_ARGS__); +#define jit_log2(format, ...) + +#define MEMBaseDiff uae_p32(NATMEM_OFFSET) + +#ifdef NATMEM_OFFSET +#define FIXED_ADDRESSING 1 +#endif + +// %%% BRIAN KING WAS HERE %%% +extern bool canbang; + +#include "../compemu_prefs.cpp" + +#define uint32 uae_u32 +#define uint8 uae_u8 + +static inline int distrust_check(int value) +{ +#ifdef JIT_ALWAYS_DISTRUST + return 1; +#else + int distrust = value; +#ifdef FSUAE + switch (value) { + case 0: distrust = 0; break; + case 1: distrust = 1; break; + case 2: distrust = ((start_pc & 0xF80000) == 0xF80000); break; + case 3: distrust = !have_done_picasso; break; + default: abort(); + } +#endif + return distrust; +#endif +} + +static inline int distrust_byte(void) +{ + return distrust_check(currprefs.comptrustbyte); +} + +static inline int distrust_word(void) +{ + return distrust_check(currprefs.comptrustword); +} + +static inline int distrust_long(void) +{ + return distrust_check(currprefs.comptrustlong); +} + +static inline int distrust_addr(void) +{ + return distrust_check(currprefs.comptrustnaddr); +} + +//#if DEBUG +//#define PROFILE_COMPILE_TIME 1 +//#endif +//#define PROFILE_UNTRANSLATED_INSNS 1 + +#ifdef JIT_DEBUG +#undef abort +#define abort() do { \ + fprintf(stderr, "Abort in file %s at line %d\n", __FILE__, __LINE__); \ + SDL_Quit(); \ + exit(EXIT_FAILURE); \ +} while (0) +#endif + +#ifdef RECORD_REGISTER_USAGE +static uint64 reg_count[16]; +static uint64 reg_count_local[16]; + +static int reg_count_compare(const void* ap, const void* bp) +{ + const int a = *((int*)ap); + const int b = *((int*)bp); + return reg_count[b] - reg_count[a]; +} +#endif + +#ifdef PROFILE_COMPILE_TIME +#include +static uae_u32 compile_count = 0; +static clock_t compile_time = 0; +static clock_t emul_start_time = 0; +static clock_t emul_end_time = 0; +#endif + +#ifdef PROFILE_UNTRANSLATED_INSNS +static const int untranslated_top_ten = 50; +static uae_u32 raw_cputbl_count[65536] = { 0, }; +static uae_u16 opcode_nums[65536]; + + +static int __cdecl untranslated_compfn(const void* e1, const void* e2) +{ + int v1 = *(const uae_u16*)e1; + int v2 = *(const uae_u16*)e2; + return (int)raw_cputbl_count[v2] - (int)raw_cputbl_count[v1]; +} +#endif + +static compop_func *compfunctbl[65536]; +static compop_func *nfcompfunctbl[65536]; +#ifdef NOFLAGS_SUPPORT_GENCOMP +static cpuop_func* nfcpufunctbl[65536]; +#endif +uae_u8* comp_pc_p; + +// gb-- Extra data for Basilisk II/JIT +#define follow_const_jumps (currprefs.comp_constjump != 0) + +static uae_u32 cache_size = 0; // Size of total cache allocated for compiled blocks +static uae_u32 current_cache_size = 0; // Cache grows upwards: how much has been consumed already +#ifdef USE_JIT_FPU +#define avoid_fpu (!currprefs.compfpu) +#define lazy_flush (!currprefs.comp_hardflush) +#else +#define avoid_fpu (true) +#define lazy_flush (true) +#endif +static bool have_cmov = false; // target has CMOV instructions ? +static bool have_rat_stall = true; // target has partial register stalls ? +const bool tune_alignment = true; // Tune code alignments for running CPU ? +const bool tune_nop_fillers = true; // Tune no-op fillers for architecture +static bool setzflg_uses_bsf = false; // setzflg virtual instruction can use native BSF instruction correctly? +static int align_loops = 32; // Align the start of loops +static int align_jumps = 32; // Align the start of jumps +static int optcount[10] = { +#ifdef UAE + 4, // How often a block has to be executed before it is translated +#else + 10, // How often a block has to be executed before it is translated +#endif + 0, // How often to use naive translation + 0, 0, 0, 0, + -1, -1, -1, -1 +}; + +op_properties prop[65536]; + +#ifdef AMIBERRY +bool may_raise_exception = false; +static bool flags_carry_inverted = false; +static bool disasm_this = false; +#endif + +static inline bool is_const_jump(uae_u32 opcode) +{ + return (prop[opcode].cflow == fl_const_jump); +} + +static inline unsigned int cft_map(unsigned int f) +{ +#ifdef UAE +#if !defined(HAVE_GET_WORD_UNSWAPPED) + return f; +#else + return do_byteswap_16(f); +#endif +#else +#if !defined(HAVE_GET_WORD_UNSWAPPED) || defined(FULLMMU) + return f; +#else + return ((f >> 8) & 255) | ((f & 255) << 8); +#endif +#endif +} + +uae_u8* start_pc_p; +uae_u32 start_pc; +uae_u32 current_block_pc_p; +static uintptr current_block_start_target; +uae_u32 needed_flags; +static uintptr next_pc_p; +static uintptr taken_pc_p; +static int branch_cc; +static int redo_current_block; + +#ifdef UAE +int segvcount = 0; +#endif +uae_u8* current_compile_p = NULL; +static uae_u8* max_compile_start; +uae_u8* compiled_code = NULL; +static uae_s32 reg_alloc_run; +const int POPALLSPACE_SIZE = 2048; /* That should be enough space */ +uae_u8* popallspace = NULL; + +void* pushall_call_handler = NULL; +static void* popall_do_nothing = NULL; +static void* popall_exec_nostats = NULL; +static void* popall_execute_normal = NULL; +static void* popall_cache_miss = NULL; +static void* popall_recompile_block = NULL; +static void* popall_check_checksum = NULL; + +#ifdef AMIBERRY +static void* popall_exec_nostats_setpc = NULL; +static void* popall_execute_normal_setpc = NULL; +static void* popall_check_checksum_setpc = NULL; +static void* popall_execute_exception = NULL; +#endif + +/* The 68k only ever executes from even addresses. So right now, we + * waste half the entries in this array + * UPDATE: We now use those entries to store the start of the linked + * lists that we maintain for each hash result. + */ +static cacheline cache_tags[TAGSIZE]; +static int cache_enabled = 0; +static blockinfo* hold_bi[MAX_HOLD_BI]; +blockinfo* active; +blockinfo* dormant; + +#ifdef NOFLAGS_SUPPORT_GENCOMP +/* 68040 */ +extern const struct cputbl op_smalltbl_0[]; +#endif +extern const struct comptbl op_smalltbl_0_comp_nf[]; +extern const struct comptbl op_smalltbl_0_comp_ff[]; + +static void flush_icache_hard(int); +static void flush_icache_lazy(int); +static void flush_icache_none(int); + +static bigstate live; +static smallstate empty_ss; +static smallstate default_ss; +static int optlev; + +static int writereg(int r); +static void unlock2(int r); +static void setlock(int r); +static int readreg_specific(int r, int size, int spec); +static int writereg_specific(int r, int size, int spec); + +#ifdef AMIBERRY +static int readreg(int r); +static void prepare_for_call_1(void); +static void prepare_for_call_2(void); + +STATIC_INLINE void flush_cpu_icache(void *from, void *to); +#endif +STATIC_INLINE void write_jmp_target(uae_u32 *jmpaddr, uintptr a); + +uae_u32 m68k_pc_offset; + +/* Some arithmetic operations can be optimized away if the operands + * are known to be constant. But that's only a good idea when the + * side effects they would have on the flags are not important. This + * variable indicates whether we need the side effects or not + */ +static uae_u32 needflags = 0; + +/* Flag handling is complicated. + * + * ARM instructions create flags, which quite often are exactly what we + * want. So at times, the "68k" flags are actually in the ARM flags. + * Exception: carry is often inverted. + * + * Then again, sometimes we do ARM instructions that clobber the ARM + * flags, but don't represent a corresponding m68k instruction. In that + * case, we have to save them. + * + * We used to save them to the stack, but now store them back directly + * into the regflags.nzcv of the traditional emulation. Thus some odd + * names. + * + * So flags can be in either of two places (used to be three; boy were + * things complicated back then!); And either place can contain either + * valid flags or invalid trash (and on the stack, there was also the + * option of "nothing at all", now gone). A couple of variables keep + * track of the respective states. + * + * To make things worse, we might or might not be interested in the flags. + * by default, we are, but a call to dont_care_flags can change that + * until the next call to live_flags. If we are not, pretty much whatever + * is in the register and/or the native flags is seen as valid. +*/ + +static inline blockinfo* get_blockinfo(uae_u32 cl) +{ + return cache_tags[cl + 1].bi; +} + +static inline blockinfo* get_blockinfo_addr(void* addr) +{ + blockinfo* bi = get_blockinfo(cacheline(addr)); + + while (bi) { + if (bi->pc_p == addr) + return bi; + bi = bi->next_same_cl; + } + return NULL; +} + + +/******************************************************************* + * All sorts of list related functions for all of the lists * + *******************************************************************/ + +static inline void remove_from_cl_list(blockinfo* bi) +{ + uae_u32 cl = cacheline(bi->pc_p); + + if (bi->prev_same_cl_p) + *(bi->prev_same_cl_p) = bi->next_same_cl; + if (bi->next_same_cl) + bi->next_same_cl->prev_same_cl_p = bi->prev_same_cl_p; + if (cache_tags[cl + 1].bi) + cache_tags[cl].handler = cache_tags[cl + 1].bi->handler_to_use; + else + cache_tags[cl].handler = (cpuop_func*)popall_execute_normal; +} + +static inline void remove_from_list(blockinfo* bi) +{ + if (bi->prev_p) + *(bi->prev_p) = bi->next; + if (bi->next) + bi->next->prev_p = bi->prev_p; +} + +static inline void add_to_cl_list(blockinfo* bi) +{ + uae_u32 cl = cacheline(bi->pc_p); + + if (cache_tags[cl + 1].bi) + cache_tags[cl + 1].bi->prev_same_cl_p = &(bi->next_same_cl); + bi->next_same_cl = cache_tags[cl + 1].bi; + + cache_tags[cl + 1].bi = bi; + bi->prev_same_cl_p = &(cache_tags[cl + 1].bi); + + cache_tags[cl].handler = bi->handler_to_use; +} + +void raise_in_cl_list(blockinfo* bi) +{ + remove_from_cl_list(bi); + add_to_cl_list(bi); +} + +static inline void add_to_active(blockinfo* bi) +{ + if (active) + active->prev_p = &(bi->next); + bi->next = active; + + active = bi; + bi->prev_p = &active; +} + +static inline void add_to_dormant(blockinfo* bi) +{ + if (dormant) + dormant->prev_p = &(bi->next); + bi->next = dormant; + + dormant = bi; + bi->prev_p = &dormant; +} + +static inline void remove_dep(dependency* d) +{ + if (d->prev_p) + *(d->prev_p) = d->next; + if (d->next) + d->next->prev_p = d->prev_p; + d->prev_p = NULL; + d->next = NULL; +} + +/* This block's code is about to be thrown away, so it no longer + depends on anything else */ +static inline void remove_deps(blockinfo* bi) +{ + remove_dep(&(bi->dep[0])); + remove_dep(&(bi->dep[1])); +} + +static inline void adjust_jmpdep(dependency* d, cpuop_func* a) +{ + write_jmp_target(d->jmp_off, (uintptr)a); +} + +/******************************************************************** + * Soft flush handling support functions * + ********************************************************************/ + +static inline void set_dhtu(blockinfo* bi, cpuop_func* dh) +{ + jit_log2("bi is %p", bi); + if (dh != bi->direct_handler_to_use) { + dependency* x = bi->deplist; + jit_log2("bi->deplist=%p", bi->deplist); + while (x) { + jit_log2("x is %p", x); + jit_log2("x->next is %p", x->next); + jit_log2("x->prev_p is %p", x->prev_p); + + if (x->jmp_off) { + adjust_jmpdep(x, dh); + } + x = x->next; + } + bi->direct_handler_to_use = (cpuop_func*)dh; + } +} + +void invalidate_block(blockinfo* bi) +{ + int i; + + bi->optlevel = 0; + bi->count = optcount[0] - 1; + bi->handler = NULL; + bi->handler_to_use = (cpuop_func*)popall_execute_normal; + bi->direct_handler = NULL; + set_dhtu(bi, bi->direct_pen); + bi->needed_flags = 0xff; + bi->status = BI_INVALID; + for (i = 0; i < 2; i++) { + bi->dep[i].jmp_off = NULL; + bi->dep[i].target = NULL; + } + remove_deps(bi); +} + +static inline void create_jmpdep(blockinfo* bi, int i, uae_u32* jmpaddr, uae_u32 target) +{ + blockinfo* tbi = get_blockinfo_addr((void*)(uintptr)target); + + Dif(!tbi) { + jit_abort("Could not create jmpdep!"); + } + bi->dep[i].jmp_off = jmpaddr; + bi->dep[i].source = bi; + bi->dep[i].target = tbi; + bi->dep[i].next = tbi->deplist; + if (bi->dep[i].next) + bi->dep[i].next->prev_p = &(bi->dep[i].next); + bi->dep[i].prev_p = &(tbi->deplist); + tbi->deplist = &(bi->dep[i]); +} + +static inline void block_need_recompile(blockinfo* bi) +{ + uae_u32 cl = cacheline(bi->pc_p); + + set_dhtu(bi, bi->direct_pen); + bi->direct_handler = bi->direct_pen; + + bi->handler_to_use = (cpuop_func*)popall_execute_normal; + bi->handler = (cpuop_func*)popall_execute_normal; + if (bi == cache_tags[cl + 1].bi) + cache_tags[cl].handler = (cpuop_func*)popall_execute_normal; + bi->status = BI_NEED_RECOMP; +} + +static inline blockinfo* get_blockinfo_addr_new(void* addr) +{ + blockinfo* bi = get_blockinfo_addr(addr); + int i; + + if (!bi) { + for (i = 0; i < MAX_HOLD_BI && !bi; i++) { + if (hold_bi[i]) { + (void)cacheline(addr); + + bi = hold_bi[i]; + hold_bi[i] = NULL; + bi->pc_p = (uae_u8*)addr; + invalidate_block(bi); + add_to_active(bi); + add_to_cl_list(bi); + } + } + } + if (!bi) { + jit_abort(_T("JIT: Looking for blockinfo, can't find free one\n")); + } + return bi; +} + +static void prepare_block(blockinfo* bi); + +/* Management of blockinfos. + + A blockinfo struct is allocated whenever a new block has to be + compiled. If the list of free blockinfos is empty, we allocate a new + pool of blockinfos and link the newly created blockinfos altogether + into the list of free blockinfos. Otherwise, we simply pop a structure + of the free list. + + Blockinfo are lazily deallocated, i.e. chained altogether in the + list of free blockinfos whenvever a translation cache flush (hard or + soft) request occurs. +*/ + +template< class T > +class LazyBlockAllocator +{ + enum { + kPoolSize = 1 + (16384 - sizeof(T) - sizeof(void*)) / sizeof(T) + }; + struct Pool { + T chunk[kPoolSize]; + Pool* next; + }; + Pool* mPools; + T* mChunks; +public: + LazyBlockAllocator() : mPools(0), mChunks(0) { } +#ifdef UAE +#else + ~LazyBlockAllocator(); +#endif + T* acquire(); + void release(T* const); +}; + +#ifdef UAE +/* uae_vm_release may do logging, which isn't safe to do when the application + * is shutting down. Better to release memory manually with a function call + * to a release_all method on shutdown, or even simpler, just let the OS + * handle it (we're shutting down anyway). */ +#else +template< class T > +LazyBlockAllocator::~LazyBlockAllocator() +{ + Pool* currentPool = mPools; + while (currentPool) { + Pool* deadPool = currentPool; + currentPool = currentPool->next; + vm_release(deadPool, sizeof(Pool)); + } +} +#endif + +template< class T > +T* LazyBlockAllocator::acquire() +{ + if (!mChunks) { + // There is no chunk left, allocate a new pool and link the + // chunks into the free list + Pool * newPool = (Pool *)vm_acquire(sizeof(Pool), VM_MAP_DEFAULT | VM_MAP_32BIT); + if (newPool == VM_MAP_FAILED) { + jit_abort("Could not allocate block pool!\n"); + } + for (T* chunk = &newPool->chunk[0]; chunk < &newPool->chunk[kPoolSize]; chunk++) { + chunk->next = mChunks; + mChunks = chunk; + } + newPool->next = mPools; + mPools = newPool; + } + T* chunk = mChunks; + mChunks = chunk->next; + return chunk; +} + +template< class T > +void LazyBlockAllocator::release(T* const chunk) +{ + chunk->next = mChunks; + mChunks = chunk; +} + +template< class T > +class HardBlockAllocator +{ +public: + T* acquire() { + T* data = (T*)current_compile_p; + current_compile_p += sizeof(T); + return data; + } + + void release(T* const) { + // Deallocated on invalidation + } +}; + +static LazyBlockAllocator BlockInfoAllocator; +static LazyBlockAllocator ChecksumInfoAllocator; + +static inline checksum_info* alloc_checksum_info(void) +{ + checksum_info* csi = ChecksumInfoAllocator.acquire(); + csi->next = NULL; + return csi; +} + +static inline void free_checksum_info(checksum_info* csi) +{ + csi->next = NULL; + ChecksumInfoAllocator.release(csi); +} + +static inline void free_checksum_info_chain(checksum_info* csi) +{ + while (csi != NULL) { + checksum_info* csi2 = csi->next; + free_checksum_info(csi); + csi = csi2; + } +} + +static inline blockinfo* alloc_blockinfo(void) +{ + blockinfo* bi = BlockInfoAllocator.acquire(); + bi->csi = NULL; + return bi; +} + +static inline void free_blockinfo(blockinfo* bi) +{ + free_checksum_info_chain(bi->csi); + bi->csi = NULL; + BlockInfoAllocator.release(bi); +} + +static inline void alloc_blockinfos(void) +{ + int i; + blockinfo* bi; + + for (i = 0; i < MAX_HOLD_BI; i++) { + if (hold_bi[i]) + return; + bi = hold_bi[i] = alloc_blockinfo(); +#ifdef __MACH__ + // Turn off write protect (which prevents execution) on JIT cache while the blocks are prepared, this is Mac OS X specific, it will work on x86-64, but as a noop + pthread_jit_write_protect_np(false); +#endif + prepare_block(bi); + } +} + +/******************************************************************** + * Functions to emit data into memory, and other general support * + ********************************************************************/ + +static uae_u8* target; + +static inline void emit_byte(uae_u8 x) +{ + *target++ = x; +} + +static inline void skip_n_bytes(int n) { + target += n; +} + +static inline void skip_byte() +{ + skip_n_bytes(1); +} + +static inline void skip_word() +{ + skip_n_bytes(2); +} + +static inline void skip_long() +{ + skip_n_bytes(4); +} + +static inline void skip_quad() +{ + skip_n_bytes(8); +} + +static inline void emit_word(uae_u16 x) +{ + *((uae_u16*)target) = x; + skip_word(); +} + +static inline void emit_long(uae_u32 x) +{ + *((uae_u32*)target) = x; + skip_long(); +} + +static inline void emit_quad(uae_u64 x) +{ + *((uae_u64*)target) = x; + skip_quad(); +} + +static inline void emit_block(const uae_u8* block, uae_u32 blocklen) +{ + memcpy((uae_u8*)target, block, blocklen); + target += blocklen; +} + +#define MAX_COMPILE_PTR max_compile_start + +static inline uae_u32 reverse32(uae_u32 v) +{ + return uae_bswap_32(v); +} + +static void set_target(uae_u8* t) +{ + target = t; +} + +static inline uae_u8* get_target_noopt(void) +{ + return target; +} + +inline uae_u8* get_target(void) +{ + return get_target_noopt(); +} + +/******************************************************************** + * New version of data buffer: interleave data and code * + ********************************************************************/ +#if defined(USE_DATA_BUFFER) + +#define DATA_BUFFER_SIZE 768 // Enlarge POPALLSPACE_SIZE if this value is greater than 768 +#define DATA_BUFFER_MAXOFFSET 4096 - 32 // max range between emit of data and use of data +static uae_u8* data_writepos = 0; +static uae_u8* data_endpos = 0; +#ifdef DEBUG_DATA_BUFFER +static uae_u32 data_wasted = 0; +static uae_u32 data_buffers_used = 0; +#endif + +STATIC_INLINE void compemu_raw_branch(IM32 d); + +STATIC_INLINE void data_check_end(uae_s32 n, uae_s32 codesize) +{ + if (data_writepos + n > data_endpos || get_target() + codesize - data_writepos > DATA_BUFFER_MAXOFFSET) { + // Start new buffer +#ifdef DEBUG_DATA_BUFFER + if (data_writepos < data_endpos) + data_wasted += data_endpos - data_writepos; + data_buffers_used++; +#endif + compemu_raw_branch(DATA_BUFFER_SIZE); + data_writepos = get_target(); + data_endpos = data_writepos + DATA_BUFFER_SIZE; + set_target(get_target() + DATA_BUFFER_SIZE); + } +} + +STATIC_INLINE uae_s32 data_word_offs(uae_u16 x) +{ + data_check_end(4, 4); + *((uae_u16*)data_writepos) = x; + data_writepos += 2; + *((uae_u16*)data_writepos) = 0; + data_writepos += 2; + return (uae_s32)data_writepos - (uae_s32)get_target() - 12; +} + +STATIC_INLINE uae_s32 data_long(uae_u32 x, uae_s32 codesize) +{ + data_check_end(4, codesize); + *((uae_u32*)data_writepos) = x; + data_writepos += 4; + return (uae_s32)data_writepos - 4; +} + +STATIC_INLINE uae_s32 data_long_offs(uae_u32 x) +{ + data_check_end(4, 4); + *((uae_u32*)data_writepos) = x; + data_writepos += 4; + return (uae_s32)data_writepos - (uae_s32)get_target() - 12; +} + +STATIC_INLINE uae_s32 get_data_offset(uae_s32 t) +{ + return t - (uae_s32)get_target() - 8; +} + +STATIC_INLINE void reset_data_buffer(void) +{ + data_writepos = 0; + data_endpos = 0; +} + +#endif + +/******************************************************************** + * Getting the information about the target CPU * + ********************************************************************/ +#ifdef AMIBERRY +STATIC_INLINE void clobber_flags(void); +#endif + +#if defined(CPU_AARCH64) +#include "codegen_arm64.cpp" +#elif defined(CPU_arm) +#include "codegen_arm.cpp" +#endif + +/******************************************************************** + * Flags status handling. EMIT TIME! * + ********************************************************************/ + +static void bt_l_ri_noclobber(RR4 r, IM8 i); + +static void make_flags_live_internal(void) +{ + if (live.flags_in_flags == VALID) + return; + Dif(live.flags_on_stack == TRASH) { + jit_abort("Want flags, got something on stack, but it is TRASH"); + } + if (live.flags_on_stack == VALID) { + int tmp; + tmp = readreg(FLAGTMP); + raw_reg_to_flags(tmp); + unlock2(tmp); + flags_carry_inverted = false; + + live.flags_in_flags = VALID; + return; + } + jit_abort("Huh? live.flags_in_flags=%d, live.flags_on_stack=%d, but need to make live", + live.flags_in_flags, live.flags_on_stack); +} + +static void flags_to_stack(void) +{ + if (live.flags_on_stack == VALID) { + flags_carry_inverted = false; + return; + } + if (!live.flags_are_important) { + live.flags_on_stack = VALID; + flags_carry_inverted = false; + return; + } + Dif(live.flags_in_flags != VALID) + jit_abort("flags_to_stack != VALID"); + else { + int tmp = writereg(FLAGTMP); + raw_flags_to_reg(tmp); + unlock2(tmp); + } + live.flags_on_stack = VALID; +} + +STATIC_INLINE void clobber_flags(void) +{ + if (live.flags_in_flags == VALID && live.flags_on_stack != VALID) + flags_to_stack(); + live.flags_in_flags = TRASH; +} + +/* Prepare for leaving the compiled stuff */ +static inline void flush_flags(void) +{ + flags_to_stack(); +} + +static int touchcnt; + +/******************************************************************** + * Partial register flushing for optimized calls * + ********************************************************************/ + +struct regusage { + uae_u16 rmask; + uae_u16 wmask; +}; + +/******************************************************************** + * register allocation per block logging * + ********************************************************************/ + +static uae_s8 vstate[VREGS]; +static uae_s8 vwritten[VREGS]; +static uae_s8 nstate[N_REGS]; + +#define L_UNKNOWN -127 +#define L_UNAVAIL -1 +#define L_NEEDED -2 +#define L_UNNEEDED -3 + +static inline void log_startblock(void) +{ + int i; + + for (i = 0; i < VREGS; i++) { + vstate[i] = L_UNKNOWN; + vwritten[i] = 0; + } + for (i = 0; i < N_REGS; i++) + nstate[i] = L_UNKNOWN; +} + +/* Using an n-reg for a temp variable */ +static inline void log_isused(int n) +{ + if (nstate[n] == L_UNKNOWN) + nstate[n] = L_UNAVAIL; +} + +static inline void log_visused(int r) +{ + if (vstate[r] == L_UNKNOWN) + vstate[r] = L_NEEDED; +} + +STATIC_INLINE void do_load_reg(int n, int r) +{ + compemu_raw_mov_l_rm(n, (uintptr)live.state[r].mem); +} + +static inline void log_vwrite(int r) +{ + vwritten[r] = 1; +} + +/* Using an n-reg to hold a v-reg */ +static inline void log_isreg(int n, int r) +{ + if (nstate[n] == L_UNKNOWN && r < 16 && !vwritten[r] && 0) + nstate[n] = r; + else { + do_load_reg(n, r); + if (nstate[n] == L_UNKNOWN) + nstate[n] = L_UNAVAIL; + } + if (vstate[r] == L_UNKNOWN) + vstate[r] = L_NEEDED; +} + +static inline void log_clobberreg(int r) +{ + if (vstate[r] == L_UNKNOWN) + vstate[r] = L_UNNEEDED; +} + +/* This ends all possibility of clever register allocation */ + +static inline void log_flush(void) +{ + int i; + + for (i = 0; i < VREGS; i++) + if (vstate[i] == L_UNKNOWN) + vstate[i] = L_NEEDED; + for (i = 0; i < N_REGS; i++) + if (nstate[i] == L_UNKNOWN) + nstate[i] = L_UNAVAIL; +} + +static inline void log_dump(void) +{ + return; +} + +/******************************************************************** + * register status handling. EMIT TIME! * + ********************************************************************/ + +static inline void set_status(int r, int status) +{ + if (status == ISCONST) + log_clobberreg(r); + live.state[r].status = status; +} + +static inline int isinreg(int r) +{ + return live.state[r].status == CLEAN || live.state[r].status == DIRTY; +} + +static void tomem(int r) +{ + int rr = live.state[r].realreg; + + if (live.state[r].status == DIRTY) { + compemu_raw_mov_l_mr((uintptr)live.state[r].mem, live.state[r].realreg); + set_status(r, CLEAN); + } +} + +static inline int isconst(int r) +{ + return live.state[r].status == ISCONST; +} + +int is_const(int r) +{ + return isconst(r); +} + +static inline void writeback_const(int r) +{ + if (!isconst(r)) + return; + Dif(live.state[r].needflush == NF_HANDLER) { + jit_abort("Trying to write back constant NF_HANDLER!"); + } + + compemu_raw_mov_l_mi((uintptr)live.state[r].mem, live.state[r].val); + log_vwrite(r); + live.state[r].val = 0; + set_status(r, INMEM); +} + +static inline void tomem_c(int r) +{ + if (isconst(r)) { + writeback_const(r); + } + else + tomem(r); +} + +static void evict(int r) +{ + if (!isinreg(r)) + return; + tomem(r); + int rr = live.state[r].realreg; + + Dif(live.nat[rr].locked && + live.nat[rr].nholds == 1) { + jit_abort("register %d in nreg %d is locked!", r, live.state[r].realreg); + } + + live.nat[rr].nholds--; + if (live.nat[rr].nholds != live.state[r].realind) { /* Was not last */ + int topreg = live.nat[rr].holds[live.nat[rr].nholds]; + int thisind = live.state[r].realind; + + live.nat[rr].holds[thisind] = topreg; + live.state[topreg].realind = thisind; + } + live.state[r].realreg = -1; + set_status(r, INMEM); +} + +static inline void free_nreg(int r) +{ + int i = live.nat[r].nholds; + + while (i) { + int vr; + + --i; + vr = live.nat[r].holds[i]; + evict(vr); + } + Dif(live.nat[r].nholds != 0) { + jit_abort("Failed to free nreg %d, nholds is %d", r, live.nat[r].nholds); + } +} + +/* Use with care! */ +static inline void isclean(int r) +{ + if (!isinreg(r)) + return; + live.state[r].val = 0; + set_status(r, CLEAN); +} + +static inline void disassociate(int r) +{ + isclean(r); + evict(r); +} + +static inline void set_const(int r, uae_u32 val) +{ + disassociate(r); + live.state[r].val = val; + set_status(r, ISCONST); +} + +static inline uae_u32 get_offset(int r) +{ + return live.state[r].val; +} + +#ifdef AMIBERRY +bool has_free_reg(void) +{ + for (int i = N_REGS - 1; i >= 0; i--) { + if (!live.nat[i].locked) { + if (live.nat[i].nholds == 0) + return true; + } + } + return false; +} +#endif + +static int alloc_reg_hinted(int r, int willclobber, int hint) +{ + int bestreg = -1; + uae_s32 when = 2000000000; + int i; + + for (i = N_REGS - 1; i >= 0; i--) { + if (!live.nat[i].locked) { + uae_s32 badness = live.nat[i].touched; + if (live.nat[i].nholds == 0) + badness = 0; + if (i == hint) + badness -= 200000000; + if (badness < when) { + bestreg = i; + when = badness; + if (live.nat[i].nholds == 0 && hint < 0) + break; + if (i == hint) + break; + } + } + } + Dif(bestreg == -1) + jit_abort("alloc_reg_hinted bestreg=-1"); + + if (live.nat[bestreg].nholds > 0) { + free_nreg(bestreg); + } + + if (!willclobber) { + if (live.state[r].status != UNDEF) { + if (isconst(r)) { + compemu_raw_mov_l_ri(bestreg, live.state[r].val); + live.state[r].val = 0; + set_status(r, DIRTY); + log_isused(bestreg); + } else { + do_load_reg(bestreg, r); + set_status(r, CLEAN); + } + } else { + live.state[r].val = 0; + set_status(r, CLEAN); + log_isused(bestreg); + } + } else { /* this is the easiest way, but not optimal. */ + live.state[r].val = 0; + set_status(r, DIRTY); + } + live.state[r].realreg = bestreg; + live.state[r].realind = 0; + live.nat[bestreg].touched = touchcnt++; + live.nat[bestreg].holds[0] = r; + live.nat[bestreg].nholds = 1; + + return bestreg; +} + + +static void unlock2(int r) +{ + Dif(!live.nat[r].locked) + jit_abort("unlock2 %d not locked", r); + live.nat[r].locked--; +} + +static void setlock(int r) +{ + live.nat[r].locked++; +} + + +static void mov_nregs(int d, int s) +{ + if (s == d) + return; + + if (live.nat[d].nholds > 0) + free_nreg(d); + + log_isused(d); + compemu_raw_mov_l_rr(d, s); + + for (int i = 0; i < live.nat[s].nholds; i++) { + int vs = live.nat[s].holds[i]; + + live.state[vs].realreg = d; + live.state[vs].realind = i; + live.nat[d].holds[i] = vs; + } + live.nat[d].nholds = live.nat[s].nholds; + + live.nat[s].nholds = 0; +} + + +static inline void make_exclusive(int r, int needcopy) +{ + reg_status oldstate; + int rr = live.state[r].realreg; + int nr; + int nind; + + if (!isinreg(r)) + return; + if (live.nat[rr].nholds == 1) + return; + + /* We have to split the register */ + oldstate = live.state[r]; + + setlock(rr); /* Make sure this doesn't go away */ + /* Forget about r being in the register rr */ + disassociate(r); + /* Get a new register, that we will clobber completely */ + nr = alloc_reg_hinted(r, 1, -1); + nind = live.state[r].realind; + live.state[r] = oldstate; /* Keep all the old state info */ + live.state[r].realreg = nr; + live.state[r].realind = nind; + + if (needcopy) { + compemu_raw_mov_l_rr(nr, rr); /* Make another copy */ + } + unlock2(rr); +} + +static inline int readreg_general(int r, int spec) +{ + int answer = -1; + + if (live.state[r].status == UNDEF) { + jit_log("WARNING: Unexpected read of undefined register %d", r); + } + + if (isinreg(r)) { + answer = live.state[r].realreg; + } else { + /* the value is in memory to start with */ + answer = alloc_reg_hinted(r, 0, spec); + } + + if (spec >= 0 && spec != answer) { + /* Too bad */ + mov_nregs(spec, answer); + answer = spec; + } + live.nat[answer].locked++; + live.nat[answer].touched = touchcnt++; + return answer; +} + + +static int readreg(int r) +{ + return readreg_general(r, -1); +} + +static int readreg_specific(int r, int spec) +{ + return readreg_general(r, spec); +} + +/* writereg(r) + * + * INPUT + * - r : mid-layer register + * + * OUTPUT + * - hard (physical, x86 here) register allocated to virtual register r + */ +static int writereg(int r) +{ + int answer = -1; + + make_exclusive(r, 0); + if (isinreg(r)) { + answer = live.state[r].realreg; + } else { + /* the value is in memory to start with */ + answer = alloc_reg_hinted(r, 1, -1); + } + + live.nat[answer].locked++; + live.nat[answer].touched = touchcnt++; + live.state[r].val = 0; + set_status(r, DIRTY); + return answer; +} + +static int rmw(int r) +{ + int answer = -1; + + if (live.state[r].status == UNDEF) { + jit_log("WARNING: Unexpected read of undefined register %d", r); + } + make_exclusive(r, 1); + + if (isinreg(r)) { + answer = live.state[r].realreg; + } else { + /* the value is in memory to start with */ + answer = alloc_reg_hinted(r, 0, -1); + } + + set_status(r, DIRTY); + + live.nat[answer].locked++; + live.nat[answer].touched = touchcnt++; + + return answer; +} + +/******************************************************************** + * FPU register status handling. EMIT TIME! * + ********************************************************************/ + +static void f_tomem_drop(int r) +{ + if (live.fate[r].status == DIRTY) { + compemu_raw_fmov_mr_drop((uintptr)live.fate[r].mem, live.fate[r].realreg); + live.fate[r].status = INMEM; + } +} + + +static int f_isinreg(int r) +{ + return live.fate[r].status == CLEAN || live.fate[r].status == DIRTY; +} + +static void f_evict(int r) +{ + int rr; + + if (!f_isinreg(r)) + return; + rr = live.fate[r].realreg; + f_tomem_drop(r); + + live.fat[rr].nholds = 0; + live.fate[r].status = INMEM; + live.fate[r].realreg = -1; +} + +static inline void f_free_nreg(int r) +{ + int vr = live.fat[r].holds; + f_evict(vr); +} + + +/* Use with care! */ +static inline void f_isclean(int r) +{ + if (!f_isinreg(r)) + return; + live.fate[r].status = CLEAN; +} + +static inline void f_disassociate(int r) +{ + f_isclean(r); + f_evict(r); +} + +static int f_alloc_reg(int r, int willclobber) +{ + int bestreg; + + if (r < 8) + bestreg = r + 8; // map real Amiga reg to ARM VFP reg 8-15 (call save) + else if (r == FP_RESULT) + bestreg = 6; // map FP_RESULT to ARM VFP reg 6 + else // FS1 + bestreg = 7; // map FS1 to ARM VFP reg 7 + + if (!willclobber) { + if (live.fate[r].status == INMEM) { + compemu_raw_fmov_rm(bestreg, (uintptr)live.fate[r].mem); + live.fate[r].status = CLEAN; + } + } else { + live.fate[r].status = DIRTY; + } + live.fate[r].realreg = bestreg; + live.fat[bestreg].holds = r; + live.fat[bestreg].nholds = 1; + + return bestreg; +} + +static void f_unlock(int r) +{ +} + +static inline int f_readreg(int r) +{ + int answer; + + if (f_isinreg(r)) { + answer = live.fate[r].realreg; + } else { + /* the value is in memory to start with */ + answer = f_alloc_reg(r, 0); + } + + return answer; +} + +static inline int f_writereg(int r) +{ + int answer; + + if (f_isinreg(r)) { + answer = live.fate[r].realreg; + } else { + answer = f_alloc_reg(r, 1); + } + live.fate[r].status = DIRTY; + return answer; +} + +STATIC_INLINE int f_rmw(int r) +{ + int n; + + if (f_isinreg(r)) { + n = live.fate[r].realreg; + } else { + n = f_alloc_reg(r, 0); + } + live.fate[r].status = DIRTY; + return n; +} + +static void fflags_into_flags_internal(void) +{ + int r = f_readreg(FP_RESULT); + raw_fflags_into_flags(r); + f_unlock(r); + live_flags(); +} + +/******************************************************************** + * Support functions, internal * + ********************************************************************/ + +static inline int isinrom(uintptr addr) +{ +#ifdef UAE + return (addr >= uae_p32(kickmem_bank.baseaddr) && + addr < uae_p32(kickmem_bank.baseaddr + 8 * 65536)); +#else + return ((addr >= (uintptr)ROMBaseHost) && (addr < (uintptr)ROMBaseHost + ROMSize)); +#endif +} + +#if defined(UAE) || defined(FLIGHT_RECORDER) +static void flush_all(void) +{ + int i; + + for (i = 0; i < VREGS; i++) { + if (live.state[i].status == DIRTY) { + if (!call_saved[live.state[i].realreg]) { + tomem(i); + } + } + } + + if (f_isinreg(FP_RESULT)) + f_evict(FP_RESULT); + if (f_isinreg(FS1)) + f_evict(FS1); +} + + +/* Make sure all registers that will get clobbered by a call are + save and sound in memory */ +static void prepare_for_call_1(void) +{ + flush_all(); /* If there are registers that don't get clobbered, + * we should be a bit more selective here */ +} + +/* We will call a C routine in a moment. That will clobber all registers, + so we need to disassociate everything */ +static void prepare_for_call_2(void) +{ + int i; + for (i = 0; i < N_REGS; i++) { +#if defined(CPU_AARCH64) + if (live.nat[i].nholds > 0) // in aarch64: first 18 regs not call saved +#else + if (!call_saved[i] && live.nat[i].nholds > 0) +#endif + free_nreg(i); + } + +#ifdef USE_JIT_FPU + for (i = 6; i <= 7; i++) // only FP_RESULT and FS1, FP0-FP7 are call save + if (live.fat[i].nholds > 0) + f_free_nreg(i); +#endif + live.flags_in_flags = TRASH; /* Note: We assume we already rescued the + flags at the very start of the call_r functions! */ +} +#endif + +#if defined(CPU_AARCH64) +#include "compemu_midfunc_arm64.cpp" +#include "compemu_midfunc_arm64_2.cpp" +#elif defined(CPU_arm) +#include "compemu_midfunc_arm.cpp" +#include "compemu_midfunc_arm2.cpp" +#endif + +/******************************************************************** + * Support functions exposed to gencomp. CREATE time * + ********************************************************************/ + +#ifdef __MACH__ +void cache_invalidate(void) { + // Invalidate cache on the JIT cache + sys_icache_invalidate(popallspace, POPALLSPACE_SIZE + MAX_JIT_CACHE * 1024); +} +#endif + +uae_u32 get_const(int r) +{ + Dif(!isconst(r)) { + jit_abort("Register %d should be constant, but isn't", r); + } + return live.state[r].val; +} + +void sync_m68k_pc(void) +{ + if (m68k_pc_offset) { + arm_ADD_l_ri(PC_P, m68k_pc_offset); + comp_pc_p += m68k_pc_offset; + m68k_pc_offset = 0; + } +} + +/******************************************************************** + * Support functions exposed to newcpu * + ********************************************************************/ + +void compiler_init(void) +{ + static bool initialized = false; + if (initialized) + return; + + flush_icache = flush_icache_none; + + flush_icache = lazy_flush ? flush_icache_lazy : flush_icache_hard; + + initialized = true; + +#ifdef PROFILE_UNTRANSLATED_INSNS + jit_log(" : gather statistics on untranslated insns count"); +#endif + +#ifdef PROFILE_COMPILE_TIME + jit_log(" : gather statistics on translation time"); + emul_start_time = clock(); +#endif +} + +void compiler_exit(void) +{ +#ifdef PROFILE_COMPILE_TIME + emul_end_time = clock(); +#endif + +#ifdef UAE +#else +#if DEBUG +#if defined(USE_DATA_BUFFER) + jit_log("data_wasted = %ld bytes", data_wasted); +#endif +#endif + + // Deallocate translation cache + if (compiled_code) { + vm_release(compiled_code, cache_size * 1024); + compiled_code = 0; + } + + // Deallocate popallspace + if (popallspace) { + vm_release(popallspace, POPALLSPACE_SIZE); + popallspace = 0; + } +#endif + +#ifdef PROFILE_COMPILE_TIME + jit_log("### Compile Block statistics"); + jit_log("Number of calls to compile_block : %d", compile_count); + uae_u32 emul_time = emul_end_time - emul_start_time; + jit_log("Total emulation time : %.1f sec", double(emul_time) / double(CLOCKS_PER_SEC)); + jit_log("Total compilation time : %.1f sec (%.1f%%)", double(compile_time) / double(CLOCKS_PER_SEC), 100.0 * double(compile_time) / double(emul_time)); +#endif + +#ifdef PROFILE_UNTRANSLATED_INSNS + uae_u64 untranslated_count = 0; + for (int i = 0; i < 65536; i++) { + opcode_nums[i] = i; + untranslated_count += raw_cputbl_count[i]; + } + bug("Sorting out untranslated instructions count, total %llu...\n", untranslated_count); + qsort(opcode_nums, 65536, sizeof(uae_u16), untranslated_compfn); + jit_log("Rank Opc Count Name\n"); + for (int i = 0; i < untranslated_top_ten; i++) { + uae_u32 count = raw_cputbl_count[opcode_nums[i]]; + struct instr* dp; + struct mnemolookup* lookup; + if (!count) + break; + dp = table68k + opcode_nums[i]; + for (lookup = lookuptab; lookup->mnemo != (instrmnem)dp->mnemo; lookup++) + ; + bug(_T("%03d: %04x %10u %s\n"), i, opcode_nums[i], count, lookup->name); + } +#endif + +#ifdef RECORD_REGISTER_USAGE + int reg_count_ids[16]; + uint64 tot_reg_count = 0; + for (int i = 0; i < 16; i++) { + reg_count_ids[i] = i; + tot_reg_count += reg_count[i]; + } + qsort(reg_count_ids, 16, sizeof(int), reg_count_compare); + uint64 cum_reg_count = 0; + for (int i = 0; i < 16; i++) { + int r = reg_count_ids[i]; + cum_reg_count += reg_count[r]; + jit_log("%c%d : %16ld %2.1f%% [%2.1f]", r < 8 ? 'D' : 'A', r % 8, + reg_count[r], + 100.0 * double(reg_count[r]) / double(tot_reg_count), + 100.0 * double(cum_reg_count) / double(tot_reg_count)); + } +#endif + + exit_table68k(); +} + +static void init_comp(void) +{ + int i; + uae_s8* au = always_used; + + for (i = 0; i < VREGS; i++) { + live.state[i].realreg = -1; + live.state[i].val = 0; + set_status(i, UNDEF); + } + for (i = 0; i < SCRATCH_REGS; ++i) + live.scratch_in_use[i] = 0; + + for (i = 0; i < VFREGS; i++) { + live.fate[i].status = UNDEF; + live.fate[i].realreg = -1; + live.fate[i].needflush = NF_SCRATCH; + } + + for (i = 0; i < VREGS; i++) { + if (i < 16) { /* First 16 registers map to 68k registers */ + live.state[i].mem = ®s.regs[i]; + set_status(i, INMEM); + } else if (i >= S1) { + live.state[i].mem = ®s.scratchregs[i - S1]; + } + } + live.state[PC_P].mem = (uae_u32*)&(regs.pc_p); + set_const(PC_P, (uintptr)comp_pc_p); + + live.state[FLAGX].mem = (uae_u32*)&(regflags.x); + set_status(FLAGX, INMEM); + + live.state[FLAGTMP].mem = (uae_u32*)&(regflags.nzcv); + + set_status(FLAGTMP, INMEM); + flags_carry_inverted = false; + + for (i = 0; i < VFREGS; i++) { + if (i < 8) { /* First 8 registers map to 68k FPU registers */ + live.fate[i].mem = (uae_u32*)(®s.fp[i].fp); + live.fate[i].needflush = NF_TOMEM; + live.fate[i].status = INMEM; + } else if (i == FP_RESULT) { + live.fate[i].mem = (uae_u32*)(®s.fp_result.fp); + live.fate[i].needflush = NF_TOMEM; + live.fate[i].status = INMEM; + } else { + live.fate[i].mem = (uae_u32*)(®s.scratchfregs[i - 8]); + } + } + + for (i = 0; i < N_REGS; i++) { + live.nat[i].touched = 0; + live.nat[i].nholds = 0; + live.nat[i].locked = 0; + if (*au == i) { + live.nat[i].locked = 1; + au++; + } + } + + for (i = 0; i < N_FREGS; i++) { + live.fat[i].nholds = 0; + } + + touchcnt = 1; + m68k_pc_offset = 0; + live.flags_in_flags = TRASH; + live.flags_on_stack = VALID; + live.flags_are_important = 1; + + regs.jit_exception = 0; +} + +/* Only do this if you really mean it! The next call should be to init!*/ +static void flush(int save_regs) +{ + int i; + + log_flush(); + flush_flags(); /* low level */ + sync_m68k_pc(); /* mid level */ + + if (save_regs) { + for (i = 0; i < VFREGS; i++) { + if (live.fate[i].needflush == NF_SCRATCH || live.fate[i].status == CLEAN) { + f_disassociate(i); + } + } + for (i = 0; i <= FLAGTMP; i++) { + switch (live.state[i].status) { + case INMEM: + if (live.state[i].val) { + write_log("JIT: flush INMEM and val != 0!\n"); + } + break; + case CLEAN: + case DIRTY: + tomem(i); + break; + case ISCONST: + if (i != PC_P) + writeback_const(i); + break; + default: + break; + } + } + for (i = 0; i <= FP_RESULT; i++) { + if (live.fate[i].status == DIRTY) { + f_evict(i); + } + } + } +} + +int alloc_scratch(void) +{ + for (int i = 0; i < SCRATCH_REGS; ++i) { + if (live.scratch_in_use[i] == 0) { + live.scratch_in_use[i] = 1; + return S1 + i; + } + } + jit_log("Running out of scratch register."); + abort(); +} + +void release_scratch(int i) +{ + if (i < S1 || i >= S1 + SCRATCH_REGS) + jit_log("release_scratch(): %d is not a scratch reg.", i); + if (live.scratch_in_use[i - S1]) { + forget_about(i); + live.scratch_in_use[i - S1] = 0; + } + else { + jit_log("release_scratch(): %d not in use.", i); + } +} + +static void freescratch(void) +{ + int i; + for (i = 0; i < N_REGS; i++) { +#if defined(CPU_AARCH64) + if (live.nat[i].locked && i > 5 && i < 18) { +#elif defined(CPU_arm) + if (live.nat[i].locked && i != 2 && i != 3 && i != 10 && i != 11 && i != 12) { +#else + if (live.nat[i].locked && i != 4 && i != 12) { +#endif + jit_log("Warning! %d is locked", i); + } + } + + for (i = S1; i < VREGS; i++) + forget_about(i); + for (i = 0; i < SCRATCH_REGS; ++i) + live.scratch_in_use[i] = 0; + +#ifdef USE_JIT_FPU + f_forget_about(FS1); +#endif +} + +/******************************************************************** + * Memory access and related functions, CREATE time * + ********************************************************************/ + +void register_branch(uae_u32 not_taken, uae_u32 taken, uae_u8 cond) +{ + next_pc_p = not_taken; + taken_pc_p = taken; + branch_cc = cond; +} + +void register_possible_exception(void) +{ + may_raise_exception = true; +} + +/* Note: get_handler may fail in 64 Bit environments, if direct_handler_to_use is + * outside 32 bit + */ +static uintptr get_handler(uintptr addr) +{ + blockinfo* bi = get_blockinfo_addr_new((void*)(uintptr)addr); + return (uintptr)bi->direct_handler_to_use; +} + +/* This version assumes that it is writing *real* memory, and *will* fail + * if that assumption is wrong! No branches, no second chances, just + * straight go-for-it attitude */ + +static void writemem_real(int address, int source, int size) +{ + if (currprefs.address_space_24) { + switch (size) { + case 1: jnf_MEM_WRITE24_OFF_b(address, source); break; + case 2: jnf_MEM_WRITE24_OFF_w(address, source); break; + case 4: jnf_MEM_WRITE24_OFF_l(address, source); break; + } + } else { + switch (size) { + case 1: jnf_MEM_WRITE_OFF_b(address, source); break; + case 2: jnf_MEM_WRITE_OFF_w(address, source); break; + case 4: jnf_MEM_WRITE_OFF_l(address, source); break; + } + } +} + +static inline void writemem_special(int address, int source, int offset) +{ + jnf_MEM_WRITEMEMBANK(address, source, offset); +} + +void writebyte(int address, int source) +{ + if (special_mem & S_WRITE) + writemem_special(address, source, SIZEOF_VOID_P * 5); + else + writemem_real(address, source, 1); +} + +void writeword(int address, int source) +{ + if (special_mem & S_WRITE) + writemem_special(address, source, SIZEOF_VOID_P * 4); + else + writemem_real(address, source, 2); +} + +void writelong(int address, int source) +{ + if (special_mem & S_WRITE) + writemem_special(address, source, SIZEOF_VOID_P * 3); + else + writemem_real(address, source, 4); +} + +// Now the same for clobber variant +void writeword_clobber(int address, int source) +{ + if (special_mem & S_WRITE) + writemem_special(address, source, SIZEOF_VOID_P * 4); + else + writemem_real(address, source, 2); + forget_about(source); +} + +void writelong_clobber(int address, int source) +{ + if (special_mem & S_WRITE) + writemem_special(address, source, SIZEOF_VOID_P * 3); + else + writemem_real(address, source, 4); + forget_about(source); +} + + +/* This version assumes that it is reading *real* memory, and *will* fail + * if that assumption is wrong! No branches, no second chances, just + * straight go-for-it attitude */ + +static void readmem_real(int address, int dest, int size) +{ + if (currprefs.address_space_24) { + switch (size) { + case 1: jnf_MEM_READ24_OFF_b(dest, address); break; + case 2: jnf_MEM_READ24_OFF_w(dest, address); break; + case 4: jnf_MEM_READ24_OFF_l(dest, address); break; + } + } else { + switch (size) { + case 1: jnf_MEM_READ_OFF_b(dest, address); break; + case 2: jnf_MEM_READ_OFF_w(dest, address); break; + case 4: jnf_MEM_READ_OFF_l(dest, address); break; + } + } +} + +static inline void readmem_special(int address, int dest, int offset) +{ + jnf_MEM_READMEMBANK(dest, address, offset); +} + +void readbyte(int address, int dest) +{ + if (special_mem & S_READ) + readmem_special(address, dest, SIZEOF_VOID_P * 2); + else + readmem_real(address, dest, 1); +} + +void readword(int address, int dest) +{ + if (special_mem & S_READ) + readmem_special(address, dest, SIZEOF_VOID_P * 1); + else + readmem_real(address, dest, 2); +} + +void readlong(int address, int dest) +{ + if (special_mem & S_READ) + readmem_special(address, dest, SIZEOF_VOID_P * 0); + else + readmem_real(address, dest, 4); +} + +/* This one might appear a bit odd... */ +STATIC_INLINE void get_n_addr_old(int address, int dest) +{ + readmem_special(address, dest, SIZEOF_VOID_P * 6); +} + +STATIC_INLINE void get_n_addr_real(int address, int dest) +{ + if (currprefs.address_space_24) + jnf_MEM_GETADR24_OFF(dest, address); + else + jnf_MEM_GETADR_OFF(dest, address); +} + +void get_n_addr(int address, int dest) +{ + if (special_mem) + get_n_addr_old(address, dest); + else + get_n_addr_real(address, dest); +} + +void get_n_addr_jmp(int address, int dest) +{ + /* For this, we need to get the same address as the rest of UAE + would --- otherwise we end up translating everything twice */ + if (special_mem) + get_n_addr_old(address, dest); + else + get_n_addr_real(address, dest); +} + +/* base is a register, but dp is an actual value. + target is a register */ +void calc_disp_ea_020(int base, uae_u32 dp, int target) +{ + int reg = (dp >> 12) & 15; + int regd_shift = (dp >> 9) & 3; + + if (dp & 0x100) { + int ignorebase = (dp & 0x80); + int ignorereg = (dp & 0x40); + int addbase = 0; + int outer = 0; + + if ((dp & 0x30) == 0x20) + addbase = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset += 2) - 2); + if ((dp & 0x30) == 0x30) + addbase = comp_get_ilong((m68k_pc_offset += 4) - 4); + + if ((dp & 0x3) == 0x2) + outer = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset += 2) - 2); + if ((dp & 0x3) == 0x3) + outer = comp_get_ilong((m68k_pc_offset += 4) - 4); + + if ((dp & 0x4) == 0) { /* add regd *before* the get_long */ + if (!ignorereg) { + disp_ea20_target_mov(target, reg, regd_shift, ((dp & 0x800) == 0)); + } else { + mov_l_ri(target, 0); + } + + /* target is now regd */ + if (!ignorebase) + arm_ADD_l(target, base); + arm_ADD_l_ri(target, addbase); + if (dp & 0x03) + readlong(target, target); + } else { /* do the getlong first, then add regd */ + if (!ignorebase) { + mov_l_rr(target, base); + arm_ADD_l_ri(target, addbase); + } else { + mov_l_ri(target, addbase); + } + if (dp & 0x03) + readlong(target, target); + + if (!ignorereg) { + disp_ea20_target_add(target, reg, regd_shift, ((dp & 0x800) == 0)); + } + } + arm_ADD_l_ri(target, outer); + } else { /* 68000 version */ + if ((dp & 0x800) == 0) { /* Sign extend */ + sign_extend_16_rr(target, reg); + lea_l_brr_indexed(target, base, target, 1 << regd_shift, (uae_s8)dp); + } else { + lea_l_brr_indexed(target, base, reg, 1 << regd_shift, (uae_s8)dp); + } + } +} + +void set_cache_state(int enabled) +{ + if (enabled != cache_enabled) + flush_icache_hard(3); + cache_enabled = enabled; +} + +int get_cache_state(void) +{ + return cache_enabled; +} + +uae_u32 get_jitted_size(void) +{ + if (compiled_code) + return JITPTR current_compile_p - JITPTR compiled_code; + return 0; +} + +static uint8 *do_alloc_code(uint32 size, int depth) +{ + UNUSED(depth); + uint8*code = (uint8 *)vm_acquire(size, VM_MAP_DEFAULT | VM_MAP_32BIT); + return code == VM_MAP_FAILED ? NULL : code; +} + +static inline uint8 *alloc_code(uint32 size) +{ + uint8 *ptr = do_alloc_code(size, 0); + /* allocated code must fit in 32-bit boundaries */ + assert((uintptr)ptr <= 0xffffffff); + return ptr; +} + +void alloc_cache(void) +{ + if (compiled_code) { + flush_icache_hard(3); + vm_release(compiled_code, cache_size * 1024); + compiled_code = 0; + } + + cache_size = currprefs.cachesize; + if (cache_size == 0) + return; + + while (!compiled_code && cache_size) { + if ((compiled_code = alloc_code(cache_size * 1024)) == NULL) { + compiled_code = 0; + cache_size /= 2; + } + } + vm_protect(compiled_code, cache_size * 1024, VM_PAGE_READ | VM_PAGE_WRITE | VM_PAGE_EXECUTE); + + if (compiled_code) { + jit_log(" : actual translation cache size : %d KB at %p-%p\n", cache_size, compiled_code, compiled_code + cache_size * 1024); +#ifdef USE_DATA_BUFFER + max_compile_start = compiled_code + cache_size * 1024 - BYTES_PER_INST - DATA_BUFFER_SIZE; +#else + max_compile_start = compiled_code + cache_size * 1024 - BYTES_PER_INST; +#endif + current_compile_p = compiled_code; + current_cache_size = 0; +#if defined(USE_DATA_BUFFER) + reset_data_buffer(); +#endif + } +} + +static void calc_checksum(blockinfo* bi, uae_u32* c1, uae_u32* c2) +{ + uae_u32 k1 = 0; + uae_u32 k2 = 0; + + checksum_info* csi = bi->csi; + Dif(!csi) abort(); + while (csi) { + uae_s32 len = csi->length; + uintptr tmp = (uintptr)csi->start_p; + uae_u32* pos; + + len += (tmp & 3); + tmp &= ~((uintptr)3); + pos = (uae_u32*)tmp; + + if (len >= 0 && len <= MAX_CHECKSUM_LEN) { + while (len > 0) { + k1 += *pos; + k2 ^= *pos; + pos++; + len -= 4; + } + } + + csi = csi->next; + } + + *c1 = k1; + *c2 = k2; +} + +int check_for_cache_miss(void) +{ + blockinfo* bi = get_blockinfo_addr(regs.pc_p); + + if (bi) { + int cl = cacheline(regs.pc_p); + if (bi != cache_tags[cl + 1].bi) { + raise_in_cl_list(bi); + return 1; + } + } + return 0; +} + + +static void recompile_block(void) +{ + /* An existing block's countdown code has expired. We need to make + sure that execute_normal doesn't refuse to recompile due to a + perceived cache miss... */ + blockinfo* bi = get_blockinfo_addr(regs.pc_p); + + Dif(!bi) + jit_abort("recompile_block"); + raise_in_cl_list(bi); + execute_normal(); +} + +static void cache_miss(void) +{ + blockinfo* bi = get_blockinfo_addr(regs.pc_p); +#if COMP_DEBUG + uae_u32 cl = cacheline(regs.pc_p); + blockinfo* bi2 = get_blockinfo(cl); +#endif + + if (!bi) { + execute_normal(); /* Compile this block now */ + return; + } + Dif(!bi2 || bi == bi2) { + jit_abort("Unexplained cache miss %p %p", bi, bi2); + } + raise_in_cl_list(bi); +} + +static int called_check_checksum(blockinfo* bi); + +static inline int block_check_checksum(blockinfo* bi) +{ + uae_u32 c1, c2; + int isgood; + + if (bi->status != BI_NEED_CHECK) + return 1; /* This block is in a checked state */ + + if (bi->c1 || bi->c2) + calc_checksum(bi, &c1, &c2); + else + c1 = c2 = 1; /* Make sure it doesn't match */ + + isgood = (c1 == bi->c1 && c2 == bi->c2); + + if (isgood) { + /* This block is still OK. So we reactivate. Of course, that + means we have to move it into the needs-to-be-flushed list */ + bi->handler_to_use = bi->handler; + set_dhtu(bi, bi->direct_handler); + bi->status = BI_CHECKING; + isgood = called_check_checksum(bi) != 0; + } + if (isgood) { + jit_log2("reactivate %p/%p (%x %x/%x %x)", bi, bi->pc_p, c1, c2, bi->c1, bi->c2); + remove_from_list(bi); + add_to_active(bi); + raise_in_cl_list(bi); + bi->status = BI_ACTIVE; + } else { + /* This block actually changed. We need to invalidate it, + and set it up to be recompiled */ + jit_log2("discard %p/%p (%x %x/%x %x)", bi, bi->pc_p, c1, c2, bi->c1, bi->c2); + invalidate_block(bi); + raise_in_cl_list(bi); + } + return isgood; +} + +static int called_check_checksum(blockinfo* bi) +{ + int isgood = 1; + int i; + + for (i = 0; i < 2 && isgood; i++) { + if (bi->dep[i].jmp_off) { + isgood = block_check_checksum(bi->dep[i].target); + } + } + return isgood; +} + +static void check_checksum(void) +{ + blockinfo* bi = get_blockinfo_addr(regs.pc_p); + uae_u32 cl = cacheline(regs.pc_p); + blockinfo* bi2 = get_blockinfo(cl); + + /* These are not the droids you are looking for... */ + if (!bi) { + /* Whoever is the primary target is in a dormant state, but + calling it was accidental, and we should just compile this + new block */ + execute_normal(); + return; + } + if (bi != bi2) { + /* The block was hit accidentally, but it does exist. Cache miss */ + cache_miss(); + return; + } + + if (!block_check_checksum(bi)) + execute_normal(); +} + +STATIC_INLINE void match_states(blockinfo* bi) +{ + if (bi->status == BI_NEED_CHECK) { + block_check_checksum(bi); + } +} + +STATIC_INLINE void create_popalls(void) +{ + int i, r; + + if (popallspace == NULL) { + if ((popallspace = alloc_code(POPALLSPACE_SIZE)) == NULL) { + jit_log("WARNING: Could not allocate popallspace!"); + if (currprefs.cachesize > 0) + { + jit_abort("Could not allocate popallspace!"); + } + /* This is not fatal if JIT is not used. If JIT is + * turned on, it will crash, but it would have crashed + * anyway. */ + return; + } + } + vm_protect(popallspace, POPALLSPACE_SIZE, VM_PAGE_READ | VM_PAGE_WRITE); + + current_compile_p = popallspace; + set_target(current_compile_p); + +#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) + reset_data_buffer(); + data_long(0, 0); // Make sure we emit the branch over the first buffer outside pushall_call_handler +#endif + + /* We need to guarantee 16-byte stack alignment on x86 at any point + within the JIT generated code. We have multiple exit points + possible but a single entry. A "jmp" is used so that we don't + have to generate stack alignment in generated code that has to + call external functions (e.g. a generic instruction handler). + + In summary, JIT generated code is not leaf so we have to deal + with it here to maintain correct stack alignment. */ + current_compile_p = get_target(); + pushall_call_handler = get_target(); + raw_push_regs_to_preserve(); +#ifdef JIT_DEBUG + write_log("Address of regs: 0x%016x, regs.pc_p: 0x%016x\n", ®s, ®s.pc_p); + write_log("Address of natmem_offset: 0x%016x, natmem_offset = 0x%016x\n", ®s.natmem_offset, regs.natmem_offset); + write_log("Address of cache_tags: 0x%016x\n", cache_tags); +#endif + compemu_raw_init_r_regstruct((uintptr)®s); + compemu_raw_jmp_pc_tag(); + + /* now the exit points */ + popall_execute_normal_setpc = get_target(); + uintptr idx = (uintptr) & (regs.pc_p) - (uintptr)®s; +#if defined(CPU_AARCH64) + STR_xXi(REG_WORK1, R_REGSTRUCT, idx); +#else + STR_rRI(REG_WORK1, R_REGSTRUCT, idx); +#endif + popall_execute_normal = get_target(); + raw_pop_preserved_regs(); + compemu_raw_jmp((uintptr)execute_normal); + + popall_check_checksum_setpc = get_target(); +#if defined(CPU_AARCH64) + STR_xXi(REG_WORK1, R_REGSTRUCT, idx); +#else + STR_rRI(REG_WORK1, R_REGSTRUCT, idx); +#endif + popall_check_checksum = get_target(); + raw_pop_preserved_regs(); + compemu_raw_jmp((uintptr)check_checksum); + + popall_exec_nostats_setpc = get_target(); +#if defined(CPU_AARCH64) + STR_xXi(REG_WORK1, R_REGSTRUCT, idx); +#else + STR_rRI(REG_WORK1, R_REGSTRUCT, idx); +#endif + raw_pop_preserved_regs(); + compemu_raw_jmp((uintptr)exec_nostats); + + popall_recompile_block = get_target(); + raw_pop_preserved_regs(); + compemu_raw_jmp((uintptr)recompile_block); + + popall_do_nothing = get_target(); + raw_pop_preserved_regs(); + compemu_raw_jmp((uintptr)do_nothing); + + popall_cache_miss = get_target(); + raw_pop_preserved_regs(); + compemu_raw_jmp((uintptr)cache_miss); + + popall_execute_exception = get_target(); + raw_pop_preserved_regs(); + compemu_raw_jmp((uintptr)execute_exception); + +#if defined(USE_DATA_BUFFER) + reset_data_buffer(); +#endif + + // no need to further write into popallspace + vm_protect(popallspace, POPALLSPACE_SIZE, VM_PAGE_READ | VM_PAGE_EXECUTE); + // No need to flush. Initialized and not modified + // flush_cpu_icache((void *)popallspace, (void *)target); +} + +static inline void reset_lists(void) +{ + int i; + + for (i = 0; i < MAX_HOLD_BI; i++) + hold_bi[i] = NULL; + active = NULL; + dormant = NULL; +} + +static void prepare_block(blockinfo* bi) +{ + int i; + + set_target(current_compile_p); + bi->direct_pen = (cpuop_func*)get_target(); + compemu_raw_execute_normal((uintptr) & (bi->pc_p)); + + bi->direct_pcc = (cpuop_func*)get_target(); + compemu_raw_check_checksum((uintptr) & (bi->pc_p)); + + flush_cpu_icache((void*)current_compile_p, (void*)target); + current_compile_p = get_target(); + + bi->deplist = NULL; + for (i = 0; i < 2; i++) { + bi->dep[i].prev_p = NULL; + bi->dep[i].next = NULL; + } + bi->status = BI_INVALID; +} + +void compemu_reset(void) +{ + flush_icache = lazy_flush ? flush_icache_lazy : flush_icache_hard; + set_cache_state(0); +} + +// OPCODE is in big endian format +static inline void reset_compop(int opcode) +{ + compfunctbl[opcode] = NULL; + nfcompfunctbl[opcode] = NULL; +} + +void build_comp(void) +{ + int i, j; + unsigned long opcode; + const struct comptbl* tbl = op_smalltbl_0_comp_ff; + const struct comptbl* nftbl = op_smalltbl_0_comp_nf; + unsigned int cpu_level = (currprefs.cpu_model - 68000) / 10; + if (cpu_level > 4) + cpu_level--; +#ifdef NOFLAGS_SUPPORT_GENCOMP + extern const struct cputbl* uaegetjitcputbl(void); + const struct cputbl* nfctbl = uaegetjitcputbl(); +#endif + + regs.mem_banks = (uintptr)mem_banks; + regs.cache_tags = (uintptr)cache_tags; + + jit_log(" : building compiler function tables"); + + for (opcode = 0; opcode < 65536; opcode++) { + reset_compop(opcode); +#ifdef NOFLAGS_SUPPORT_GENCOMP + nfcpufunctbl[opcode] = op_illg; +#endif + prop[opcode].use_flags = FLAG_ALL; + prop[opcode].set_flags = FLAG_ALL; + prop[opcode].cflow = fl_trap; // ILLEGAL instructions do trap + } + + for (i = 0; tbl[i].opcode < 65536; i++) { + int cflow = table68k[tbl[i].opcode].cflow; + if (follow_const_jumps && (tbl[i].specific & COMP_OPCODE_ISCJUMP)) + cflow = fl_const_jump; + else + cflow &= ~fl_const_jump; + prop[tbl[i].opcode].cflow = cflow; + + bool uses_fpu = (tbl[i].specific & COMP_OPCODE_USES_FPU) != 0; + if (uses_fpu && avoid_fpu) + compfunctbl[tbl[i].opcode] = NULL; + else + compfunctbl[tbl[i].opcode] = tbl[i].handler; + } + + for (i = 0; nftbl[i].opcode < 65536; i++) { + bool uses_fpu = (tbl[i].specific & COMP_OPCODE_USES_FPU) != 0; + if (uses_fpu && avoid_fpu) + nfcompfunctbl[nftbl[i].opcode] = NULL; + else + nfcompfunctbl[nftbl[i].opcode] = nftbl[i].handler; + if (!nfctbl[j].handler_ff && currprefs.cachesize) { + int mnemo = table68k[nftbl[i].opcode].mnemo; + struct mnemolookup* lookup; + for (lookup = lookuptab; lookup->mnemo != mnemo; lookup++) + ; + char* s = ua(lookup->name); + jit_log("%04x (%s) unavailable", nftbl[i].opcode, s); + xfree(s); + } + } + + for (i = 0; nfctbl[i].handler_ff; i++) { + nfcpufunctbl[cft_map(nfctbl[i].opcode)] = nfctbl[i].handler_ff; + } + + for (opcode = 0; opcode < 65536; opcode++) { + compop_func* f; + compop_func* nff; +#ifdef NOFLAGS_SUPPORT_GENCOMP + cpuop_func* nfcf; +#endif + int isaddx, cflow; + + if (table68k[opcode].mnemo == i_ILLG || table68k[opcode].clev > cpu_level) + continue; + + if (table68k[opcode].handler != -1) { + f = compfunctbl[cft_map(table68k[opcode].handler)]; + nff = nfcompfunctbl[cft_map(table68k[opcode].handler)]; +#ifdef NOFLAGS_SUPPORT_GENCOMP + nfcf = nfcpufunctbl[cft_map(table68k[opcode].handler)]; +#endif + isaddx = prop[cft_map(table68k[opcode].handler)].is_addx; + prop[cft_map(opcode)].is_addx = isaddx; + cflow = prop[cft_map(table68k[opcode].handler)].cflow; + prop[cft_map(opcode)].cflow = cflow; + compfunctbl[cft_map(opcode)] = f; + nfcompfunctbl[cft_map(opcode)] = nff; +#ifdef NOFLAGS_SUPPORT_GENCOMP + Dif(nfcf == op_illg) + abort(); + nfcpufunctbl[cft_map(opcode)] = nfcf; +#endif + } + prop[cft_map(opcode)].set_flags = table68k[opcode].flagdead; + prop[cft_map(opcode)].use_flags = table68k[opcode].flaglive; + /* Unconditional jumps don't evaluate condition codes, so they + * don't actually use any flags themselves */ + if (prop[cft_map(opcode)].cflow & fl_const_jump) + prop[cft_map(opcode)].use_flags = 0; + } + + for (i = 0; nfctbl[i].handler_ff != NULL; i++) { + if (nfctbl[i].specific) + nfcpufunctbl[cft_map(tbl[i].opcode)] = nfctbl[i].handler_ff; + } + + int count = 0; + for (opcode = 0; opcode < 65536; opcode++) { + if (compfunctbl[cft_map(opcode)]) + count++; + } + jit_log(" : supposedly %d compileable opcodes!", count); + + /* Initialise state */ + create_popalls(); + alloc_cache(); + reset_lists(); + + for (i = 0; i < TAGSIZE; i += 2) { + cache_tags[i].handler = (cpuop_func*)popall_execute_normal; + cache_tags[i + 1].bi = NULL; + } + compemu_reset(); +} + +static void flush_icache_none(int v) +{ + /* Nothing to do. */ +} + +void flush_icache_hard(int n) +{ + blockinfo* bi, * dbi; + + bi = active; + while (bi) { + cache_tags[cacheline(bi->pc_p)].handler = (cpuop_func*)popall_execute_normal; + cache_tags[cacheline(bi->pc_p) + 1].bi = NULL; + dbi = bi; + bi = bi->next; + free_blockinfo(dbi); + } + bi = dormant; + while (bi) { + cache_tags[cacheline(bi->pc_p)].handler = (cpuop_func*)popall_execute_normal; + cache_tags[cacheline(bi->pc_p) + 1].bi = NULL; + dbi = bi; + bi = bi->next; + free_blockinfo(dbi); + } + + reset_lists(); + if (!compiled_code) + return; + +#if defined(USE_DATA_BUFFER) + reset_data_buffer(); +#endif + + current_compile_p = compiled_code; + set_special(0); /* To get out of compiled code */ +} + +/* "Soft flushing" --- instead of actually throwing everything away, +we simply mark everything as "needs to be checked". +*/ + +static inline void flush_icache_lazy(int v) +{ + blockinfo* bi; + blockinfo* bi2; + + if (!active) + return; + + bi = active; + while (bi) { + uae_u32 cl = cacheline(bi->pc_p); + if (bi->status == BI_INVALID || bi->status == BI_NEED_RECOMP) { + if (bi == cache_tags[cl + 1].bi) + cache_tags[cl].handler = (cpuop_func*)popall_execute_normal; + bi->handler_to_use = (cpuop_func*)popall_execute_normal; + set_dhtu(bi, bi->direct_pen); + bi->status = BI_INVALID; + } else { + if (bi == cache_tags[cl + 1].bi) + cache_tags[cl].handler = (cpuop_func*)popall_check_checksum; + bi->handler_to_use = (cpuop_func*)popall_check_checksum; + set_dhtu(bi, bi->direct_pcc); + bi->status = BI_NEED_CHECK; + } + bi2 = bi; + bi = bi->next; + } + /* bi2 is now the last entry in the active list */ + bi2->next = dormant; + if (dormant) + dormant->prev_p = &(bi2->next); + + dormant = active; + active->prev_p = &dormant; + active = NULL; +} + +int failure; + +static inline unsigned int get_opcode_cft_map(unsigned int f) +{ + return uae_bswap_16(f); +} +#define DO_GET_OPCODE(a) (get_opcode_cft_map((uae_u16)*(a))) + +void compile_block(cpu_history* pc_hist, int blocklen, int totcycles) +{ + if (cache_enabled && compiled_code && currprefs.cpu_model >= 68020) { +#ifdef PROFILE_COMPILE_TIME + compile_count++; + clock_t start_time = clock(); +#endif + + /* OK, here we need to 'compile' a block */ + int i; + int r; + int was_comp = 0; + uae_u8 liveflags[MAXRUN + 1]; + bool trace_in_rom = isinrom((uintptr)pc_hist[0].location) != 0; + uintptr max_pcp = (uintptr)pc_hist[blocklen - 1].location; + uintptr min_pcp = max_pcp; + uae_u32 cl = cacheline(pc_hist[0].location); + void* specflags=(void*)®s.spcflags; + blockinfo* bi = NULL; + blockinfo* bi2; + int extra_len=0; + + redo_current_block = 0; + if (current_compile_p >= MAX_COMPILE_PTR) + flush_icache_hard(3); + + alloc_blockinfos(); + + bi = get_blockinfo_addr_new(pc_hist[0].location); + bi2 = get_blockinfo(cl); + + optlev = bi->optlevel; + if (bi->status != BI_INVALID) { + Dif(bi != bi2) { + /* I don't think it can happen anymore. Shouldn't, in + any case. So let's make sure... */ + jit_abort("WOOOWOO count=%d, ol=%d %p %p", bi->count, bi->optlevel, bi->handler_to_use, cache_tags[cl].handler); + } + + Dif(bi->count != -1 && bi->status != BI_NEED_RECOMP) { + jit_abort("bi->count=%d, bi->status=%d,bi->optlevel=%d", bi->count, bi->status, bi->optlevel); + /* What the heck? We are not supposed to be here! */ + } + } + if (bi->count == -1) { + optlev++; + while (!optcount[optlev]) + optlev++; + bi->count = optcount[optlev] - 1; + } + current_block_pc_p = JITPTR pc_hist[0].location; + + remove_deps(bi); /* We are about to create new code */ + bi->optlevel = optlev; + bi->pc_p = (uae_u8*)pc_hist[0].location; + free_checksum_info_chain(bi->csi); + bi->csi = NULL; + + liveflags[blocklen] = FLAG_ALL; /* All flags needed afterwards */ + i = blocklen; + while (i--) { + uae_u16* currpcp = pc_hist[i].location; + uae_u32 op = DO_GET_OPCODE(currpcp); + + trace_in_rom = trace_in_rom && isinrom((uintptr)currpcp); + if (follow_const_jumps && is_const_jump(op)) { + checksum_info* csi = alloc_checksum_info(); + csi->start_p = (uae_u8*)min_pcp; + csi->length = JITPTR max_pcp - JITPTR min_pcp + LONGEST_68K_INST; + csi->next = bi->csi; + bi->csi = csi; + max_pcp = (uintptr)currpcp; + } + min_pcp = (uintptr)currpcp; + + if (!currprefs.compnf) { + liveflags[i] = FLAG_ALL; + } + else + { + liveflags[i] = ((liveflags[i + 1] & (~prop[op].set_flags)) | prop[op].use_flags); + if (prop[op].is_addx && (liveflags[i + 1] & FLAG_Z) == 0) + liveflags[i] &= ~FLAG_Z; + } + } + + checksum_info* csi = alloc_checksum_info(); + csi->start_p = (uae_u8*)min_pcp; + csi->length = max_pcp - min_pcp + LONGEST_68K_INST; + csi->next = bi->csi; + bi->csi = csi; + + bi->needed_flags = liveflags[0]; + + /* This is the non-direct handler */ + was_comp = 0; + + bi->direct_handler = (cpuop_func*)get_target(); + set_dhtu(bi, bi->direct_handler); + bi->status = BI_COMPILING; + current_block_start_target = (uintptr)get_target(); + + if (bi->count >= 0) { /* Need to generate countdown code */ + compemu_raw_set_pc_i((uintptr)pc_hist[0].location); + compemu_raw_dec_m((uintptr) & (bi->count)); + compemu_raw_maybe_recompile(); + } + if (optlev == 0) { /* No need to actually translate */ + /* Execute normally without keeping stats */ + compemu_raw_exec_nostats((uintptr)pc_hist[0].location); + } else { + reg_alloc_run = 0; + next_pc_p = 0; + taken_pc_p = 0; + branch_cc = 0; // Only to be initialized. Will be set together with next_pc_p + + comp_pc_p = (uae_u8*)pc_hist[0].location; + init_comp(); + was_comp = 1; + + for (i = 0; i < blocklen && get_target() < MAX_COMPILE_PTR; i++) { + may_raise_exception = false; + cpuop_func** cputbl; + compop_func** comptbl; + uae_u32 opcode = DO_GET_OPCODE(pc_hist[i].location); + needed_flags = (liveflags[i + 1] & prop[opcode].set_flags); + special_mem = pc_hist[i].specmem; + if (!needed_flags && currprefs.compnf) { +#ifdef NOFLAGS_SUPPORT_GENCOMP + cputbl = nfcpufunctbl; +#else + cputbl = cpufunctbl; +#endif + comptbl = nfcompfunctbl; + } else { + cputbl = cpufunctbl; + comptbl = compfunctbl; + } + + failure = 1; // gb-- defaults to failure state + if (comptbl[opcode] && optlev > 1) { + failure = 0; + if (!was_comp) { + comp_pc_p = (uae_u8*)pc_hist[i].location; + init_comp(); + } + was_comp = 1; + + comptbl[opcode](opcode); + freescratch(); + if (!(liveflags[i + 1] & FLAG_CZNV)) { + /* We can forget about flags */ + dont_care_flags(); + } + } + + if (failure) { + if (was_comp) { + flush(1); + was_comp = 0; + } + compemu_raw_mov_l_ri(REG_PAR1, (uae_u32)opcode); + compemu_raw_mov_l_rr(REG_PAR2, R_REGSTRUCT); + compemu_raw_set_pc_i((uintptr)pc_hist[i].location); + compemu_raw_call((uintptr)cputbl[opcode]); +#ifdef PROFILE_UNTRANSLATED_INSNS + // raw_cputbl_count[] is indexed with plain opcode (in m68k order) + compemu_raw_inc_opcount(opcode); +#endif + + if (i < blocklen - 1) { + uae_u8* branchadd; + + /* if (SPCFLAGS_TEST(SPCFLAG_ALL)) popall_do_nothing() */ + compemu_raw_mov_l_rm(0, (uintptr)specflags); +#if defined(USE_DATA_BUFFER) + data_check_end(8, 64); +#endif + compemu_raw_maybe_do_nothing(scaled_cycles(totcycles)); + } + } else if (may_raise_exception) { +#if defined(USE_DATA_BUFFER) + data_check_end(8, 64); +#endif + compemu_raw_handle_except(scaled_cycles(totcycles)); + may_raise_exception = false; + } + } +#if 1 /* This isn't completely kosher yet; It really needs to be + integrated into a general inter-block-dependency scheme */ + if (next_pc_p && taken_pc_p && + was_comp && taken_pc_p == current_block_pc_p) + { + blockinfo* bi1 = get_blockinfo_addr_new((void*)next_pc_p); + blockinfo* bi2 = get_blockinfo_addr_new((void*)taken_pc_p); + uae_u8 x = bi1->needed_flags; + + if (x == 0xff || 1) { /* To be on the safe side */ + uae_u16* next = (uae_u16*)next_pc_p; + uae_u32 op = DO_GET_OPCODE(next); + + x = FLAG_ALL; + x &= (~prop[op].set_flags); + x |= prop[op].use_flags; + } + + x |= bi2->needed_flags; + if (!(x & FLAG_CZNV)) { + /* We can forget about flags */ + dont_care_flags(); + extra_len += 2; /* The next instruction now is part of this block */ + } + } +#endif + log_flush(); + + if (next_pc_p) { /* A branch was registered */ + uintptr t1 = next_pc_p; + uintptr t2 = taken_pc_p; + int cc = branch_cc; // this is native (ARM) condition code + + uae_u32* branchadd; + uae_u32* tba; + bigstate tmp; + blockinfo* tbi; + + if (taken_pc_p < next_pc_p) { + /* backward branch. Optimize for the "taken" case --- + which means the raw_jcc should fall through when + the 68k branch is taken. */ + t1 = taken_pc_p; + t2 = next_pc_p; + if (cc < NATIVE_CC_AL) + cc = branch_cc ^ 1; + else if (cc > NATIVE_CC_AL) + cc = 0x10 | (branch_cc ^ 0xf); + } + +#if defined(USE_DATA_BUFFER) + data_check_end(8, 128); +#endif + flush(1); // Emitted code of this call doesn't modify flags + compemu_raw_jcc_l_oponly(cc); // Last emitted opcode is branch to target + branchadd = (uae_u32*)get_target() - 1; + + /* predicted outcome */ + tbi = get_blockinfo_addr_new((void*)t1); + match_states(tbi); + + tba = compemu_raw_endblock_pc_isconst(scaled_cycles(totcycles), t1); + write_jmp_target(tba, get_handler(t1)); + create_jmpdep(bi, 0, tba, t1); + + /* not-predicted outcome */ + write_jmp_target(branchadd, (uintptr)get_target()); + tbi = get_blockinfo_addr_new((void*)t2); + match_states(tbi); + + tba = compemu_raw_endblock_pc_isconst(scaled_cycles(totcycles), t2); + write_jmp_target(tba, get_handler(t2)); + create_jmpdep(bi, 1, tba, t2); + } else { + if (was_comp) { + flush(1); + } + + /* Let's find out where next_handler is... */ + if (was_comp && isinreg(PC_P)) { +#if defined(USE_DATA_BUFFER) + data_check_end(4, 64); +#endif + r = live.state[PC_P].realreg; + compemu_raw_endblock_pc_inreg(r, scaled_cycles(totcycles)); + } else if (was_comp && isconst(PC_P)) { + uintptr v = live.state[PC_P].val; + uae_u32* tba; + blockinfo* tbi; + + tbi = get_blockinfo_addr_new((void*)v); + match_states(tbi); + +#if defined(USE_DATA_BUFFER) + data_check_end(4, 64); +#endif + tba = compemu_raw_endblock_pc_isconst(scaled_cycles(totcycles), v); + write_jmp_target(tba, get_handler(v)); + create_jmpdep(bi, 0, tba, v); + } else { + r = REG_PC_TMP; + compemu_raw_mov_l_rm(r, (uintptr)®s.pc_p); +#if defined(USE_DATA_BUFFER) + data_check_end(4, 64); +#endif + compemu_raw_endblock_pc_inreg(r, scaled_cycles(totcycles)); + } + } + } + + remove_from_list(bi); + if (trace_in_rom) { + // No need to checksum that block trace on cache invalidation + free_checksum_info_chain(bi->csi); + bi->csi = NULL; + add_to_dormant(bi); + } else { + calc_checksum(bi, &(bi->c1), &(bi->c2)); + add_to_active(bi); + } + + current_cache_size += JITPTR get_target() - JITPTR current_compile_p; + + /* This is the non-direct handler */ + bi->handler = bi->handler_to_use = (cpuop_func*)get_target(); + compemu_raw_cmp_pc((uintptr)pc_hist[0].location); + compemu_raw_maybe_cachemiss(); + comp_pc_p = (uae_u8*)pc_hist[0].location; + + bi->status = BI_FINALIZING; + init_comp(); + match_states(bi); + flush(1); + + compemu_raw_jmp((uintptr)bi->direct_handler); + + flush_cpu_icache((void*)current_block_start_target, (void*)target); + current_compile_p = get_target(); + raise_in_cl_list(bi); + bi->nexthandler = current_compile_p; + + /* We will flush soon, anyway, so let's do it now */ + if (current_compile_p >= MAX_COMPILE_PTR) + flush_icache_hard(3); + + bi->status = BI_ACTIVE; + if (redo_current_block) + block_need_recompile(bi); + +#ifdef PROFILE_COMPILE_TIME + compile_time += (clock() - start_time); +#endif + /* Account for compilation time */ + do_extra_cycles(totcycles); + } +} + +#endif /* JIT */ diff --git a/src/jit/arm/compstbl_arm.cpp b/src/jit/arm/compstbl_arm.cpp new file mode 100644 index 000000000..82684e6b4 --- /dev/null +++ b/src/jit/arm/compstbl_arm.cpp @@ -0,0 +1,3748 @@ +#include "sysconfig.h" +#if defined(JIT) +#include "sysdeps.h" +#include "options.h" +#include "uae/memory.h" +#include "readcpu.h" +#include "newcpu.h" +#include "comptbl_arm.h" +#include "debug.h" +extern const struct comptbl op_smalltbl_0_comp_ff[] = { +{ op_0_0_comp_ff, 0x00000002, 0 }, /* OR */ +{ op_10_0_comp_ff, 0x00000002, 16 }, /* OR */ +{ op_18_0_comp_ff, 0x00000002, 24 }, /* OR */ +{ op_20_0_comp_ff, 0x00000002, 32 }, /* OR */ +{ op_28_0_comp_ff, 0x00000002, 40 }, /* OR */ +{ op_30_0_comp_ff, 0x00000002, 48 }, /* OR */ +{ op_38_0_comp_ff, 0x00000002, 56 }, /* OR */ +{ op_39_0_comp_ff, 0x00000002, 57 }, /* OR */ +{ op_3c_0_comp_ff, 0x00000002, 60 }, /* ORSR */ +{ op_40_0_comp_ff, 0x00000002, 64 }, /* OR */ +{ op_50_0_comp_ff, 0x00000002, 80 }, /* OR */ +{ op_58_0_comp_ff, 0x00000002, 88 }, /* OR */ +{ op_60_0_comp_ff, 0x00000002, 96 }, /* OR */ +{ op_68_0_comp_ff, 0x00000002, 104 }, /* OR */ +{ op_70_0_comp_ff, 0x00000002, 112 }, /* OR */ +{ op_78_0_comp_ff, 0x00000002, 120 }, /* OR */ +{ op_79_0_comp_ff, 0x00000002, 121 }, /* OR */ +{ NULL, 0x00000002, 124 }, /* ORSR */ +{ op_80_0_comp_ff, 0x00000002, 128 }, /* OR */ +{ op_90_0_comp_ff, 0x00000002, 144 }, /* OR */ +{ op_98_0_comp_ff, 0x00000002, 152 }, /* OR */ +{ op_a0_0_comp_ff, 0x00000002, 160 }, /* OR */ +{ op_a8_0_comp_ff, 0x00000002, 168 }, /* OR */ +{ op_b0_0_comp_ff, 0x00000002, 176 }, /* OR */ +{ op_b8_0_comp_ff, 0x00000002, 184 }, /* OR */ +{ op_b9_0_comp_ff, 0x00000002, 185 }, /* OR */ +{ NULL, 0x00000001, 208 }, /* CHK2 */ +{ NULL, 0x00000001, 232 }, /* CHK2 */ +{ NULL, 0x00000001, 240 }, /* CHK2 */ +{ NULL, 0x00000001, 248 }, /* CHK2 */ +{ NULL, 0x00000001, 249 }, /* CHK2 */ +{ NULL, 0x00000001, 250 }, /* CHK2 */ +{ NULL, 0x00000001, 251 }, /* CHK2 */ +{ op_100_0_comp_ff, 0x00000000, 256 }, /* BTST */ +{ NULL, 0x00000001, 264 }, /* MVPMR */ +{ op_110_0_comp_ff, 0x00000000, 272 }, /* BTST */ +{ op_118_0_comp_ff, 0x00000000, 280 }, /* BTST */ +{ op_120_0_comp_ff, 0x00000000, 288 }, /* BTST */ +{ op_128_0_comp_ff, 0x00000002, 296 }, /* BTST */ +{ op_130_0_comp_ff, 0x00000002, 304 }, /* BTST */ +{ op_138_0_comp_ff, 0x00000002, 312 }, /* BTST */ +{ op_139_0_comp_ff, 0x00000002, 313 }, /* BTST */ +{ op_13a_0_comp_ff, 0x00000002, 314 }, /* BTST */ +{ op_13b_0_comp_ff, 0x00000002, 315 }, /* BTST */ +{ op_13c_0_comp_ff, 0x00000002, 316 }, /* BTST */ +{ op_140_0_comp_ff, 0x00000000, 320 }, /* BCHG */ +{ NULL, 0x00000001, 328 }, /* MVPMR */ +{ op_150_0_comp_ff, 0x00000000, 336 }, /* BCHG */ +{ op_158_0_comp_ff, 0x00000000, 344 }, /* BCHG */ +{ op_160_0_comp_ff, 0x00000000, 352 }, /* BCHG */ +{ op_168_0_comp_ff, 0x00000002, 360 }, /* BCHG */ +{ op_170_0_comp_ff, 0x00000002, 368 }, /* BCHG */ +{ op_178_0_comp_ff, 0x00000002, 376 }, /* BCHG */ +{ op_179_0_comp_ff, 0x00000002, 377 }, /* BCHG */ +{ op_180_0_comp_ff, 0x00000000, 384 }, /* BCLR */ +{ NULL, 0x00000001, 392 }, /* MVPRM */ +{ op_190_0_comp_ff, 0x00000000, 400 }, /* BCLR */ +{ op_198_0_comp_ff, 0x00000000, 408 }, /* BCLR */ +{ op_1a0_0_comp_ff, 0x00000000, 416 }, /* BCLR */ +{ op_1a8_0_comp_ff, 0x00000002, 424 }, /* BCLR */ +{ op_1b0_0_comp_ff, 0x00000002, 432 }, /* BCLR */ +{ op_1b8_0_comp_ff, 0x00000002, 440 }, /* BCLR */ +{ op_1b9_0_comp_ff, 0x00000002, 441 }, /* BCLR */ +{ op_1c0_0_comp_ff, 0x00000000, 448 }, /* BSET */ +{ NULL, 0x00000001, 456 }, /* MVPRM */ +{ op_1d0_0_comp_ff, 0x00000000, 464 }, /* BSET */ +{ op_1d8_0_comp_ff, 0x00000000, 472 }, /* BSET */ +{ op_1e0_0_comp_ff, 0x00000000, 480 }, /* BSET */ +{ op_1e8_0_comp_ff, 0x00000002, 488 }, /* BSET */ +{ op_1f0_0_comp_ff, 0x00000002, 496 }, /* BSET */ +{ op_1f8_0_comp_ff, 0x00000002, 504 }, /* BSET */ +{ op_1f9_0_comp_ff, 0x00000002, 505 }, /* BSET */ +{ op_200_0_comp_ff, 0x00000002, 512 }, /* AND */ +{ op_210_0_comp_ff, 0x00000002, 528 }, /* AND */ +{ op_218_0_comp_ff, 0x00000002, 536 }, /* AND */ +{ op_220_0_comp_ff, 0x00000002, 544 }, /* AND */ +{ op_228_0_comp_ff, 0x00000002, 552 }, /* AND */ +{ op_230_0_comp_ff, 0x00000002, 560 }, /* AND */ +{ op_238_0_comp_ff, 0x00000002, 568 }, /* AND */ +{ op_239_0_comp_ff, 0x00000002, 569 }, /* AND */ +{ op_23c_0_comp_ff, 0x00000002, 572 }, /* ANDSR */ +{ op_240_0_comp_ff, 0x00000002, 576 }, /* AND */ +{ op_250_0_comp_ff, 0x00000002, 592 }, /* AND */ +{ op_258_0_comp_ff, 0x00000002, 600 }, /* AND */ +{ op_260_0_comp_ff, 0x00000002, 608 }, /* AND */ +{ op_268_0_comp_ff, 0x00000002, 616 }, /* AND */ +{ op_270_0_comp_ff, 0x00000002, 624 }, /* AND */ +{ op_278_0_comp_ff, 0x00000002, 632 }, /* AND */ +{ op_279_0_comp_ff, 0x00000002, 633 }, /* AND */ +{ NULL, 0x00000002, 636 }, /* ANDSR */ +{ op_280_0_comp_ff, 0x00000002, 640 }, /* AND */ +{ op_290_0_comp_ff, 0x00000002, 656 }, /* AND */ +{ op_298_0_comp_ff, 0x00000002, 664 }, /* AND */ +{ op_2a0_0_comp_ff, 0x00000002, 672 }, /* AND */ +{ op_2a8_0_comp_ff, 0x00000002, 680 }, /* AND */ +{ op_2b0_0_comp_ff, 0x00000002, 688 }, /* AND */ +{ op_2b8_0_comp_ff, 0x00000002, 696 }, /* AND */ +{ op_2b9_0_comp_ff, 0x00000002, 697 }, /* AND */ +{ NULL, 0x00000001, 720 }, /* CHK2 */ +{ NULL, 0x00000001, 744 }, /* CHK2 */ +{ NULL, 0x00000001, 752 }, /* CHK2 */ +{ NULL, 0x00000001, 760 }, /* CHK2 */ +{ NULL, 0x00000001, 761 }, /* CHK2 */ +{ NULL, 0x00000001, 762 }, /* CHK2 */ +{ NULL, 0x00000001, 763 }, /* CHK2 */ +{ op_400_0_comp_ff, 0x00000002, 1024 }, /* SUB */ +{ op_410_0_comp_ff, 0x00000002, 1040 }, /* SUB */ +{ op_418_0_comp_ff, 0x00000002, 1048 }, /* SUB */ +{ op_420_0_comp_ff, 0x00000002, 1056 }, /* SUB */ +{ op_428_0_comp_ff, 0x00000002, 1064 }, /* SUB */ +{ op_430_0_comp_ff, 0x00000002, 1072 }, /* SUB */ +{ op_438_0_comp_ff, 0x00000002, 1080 }, /* SUB */ +{ op_439_0_comp_ff, 0x00000002, 1081 }, /* SUB */ +{ op_440_0_comp_ff, 0x00000002, 1088 }, /* SUB */ +{ op_450_0_comp_ff, 0x00000002, 1104 }, /* SUB */ +{ op_458_0_comp_ff, 0x00000002, 1112 }, /* SUB */ +{ op_460_0_comp_ff, 0x00000002, 1120 }, /* SUB */ +{ op_468_0_comp_ff, 0x00000002, 1128 }, /* SUB */ +{ op_470_0_comp_ff, 0x00000002, 1136 }, /* SUB */ +{ op_478_0_comp_ff, 0x00000002, 1144 }, /* SUB */ +{ op_479_0_comp_ff, 0x00000002, 1145 }, /* SUB */ +{ op_480_0_comp_ff, 0x00000002, 1152 }, /* SUB */ +{ op_490_0_comp_ff, 0x00000002, 1168 }, /* SUB */ +{ op_498_0_comp_ff, 0x00000002, 1176 }, /* SUB */ +{ op_4a0_0_comp_ff, 0x00000002, 1184 }, /* SUB */ +{ op_4a8_0_comp_ff, 0x00000002, 1192 }, /* SUB */ +{ op_4b0_0_comp_ff, 0x00000002, 1200 }, /* SUB */ +{ op_4b8_0_comp_ff, 0x00000002, 1208 }, /* SUB */ +{ op_4b9_0_comp_ff, 0x00000002, 1209 }, /* SUB */ +{ NULL, 0x00000001, 1232 }, /* CHK2 */ +{ NULL, 0x00000001, 1256 }, /* CHK2 */ +{ NULL, 0x00000001, 1264 }, /* CHK2 */ +{ NULL, 0x00000001, 1272 }, /* CHK2 */ +{ NULL, 0x00000001, 1273 }, /* CHK2 */ +{ NULL, 0x00000001, 1274 }, /* CHK2 */ +{ NULL, 0x00000001, 1275 }, /* CHK2 */ +{ op_600_0_comp_ff, 0x00000002, 1536 }, /* ADD */ +{ op_610_0_comp_ff, 0x00000002, 1552 }, /* ADD */ +{ op_618_0_comp_ff, 0x00000002, 1560 }, /* ADD */ +{ op_620_0_comp_ff, 0x00000002, 1568 }, /* ADD */ +{ op_628_0_comp_ff, 0x00000002, 1576 }, /* ADD */ +{ op_630_0_comp_ff, 0x00000002, 1584 }, /* ADD */ +{ op_638_0_comp_ff, 0x00000002, 1592 }, /* ADD */ +{ op_639_0_comp_ff, 0x00000002, 1593 }, /* ADD */ +{ op_640_0_comp_ff, 0x00000002, 1600 }, /* ADD */ +{ op_650_0_comp_ff, 0x00000002, 1616 }, /* ADD */ +{ op_658_0_comp_ff, 0x00000002, 1624 }, /* ADD */ +{ op_660_0_comp_ff, 0x00000002, 1632 }, /* ADD */ +{ op_668_0_comp_ff, 0x00000002, 1640 }, /* ADD */ +{ op_670_0_comp_ff, 0x00000002, 1648 }, /* ADD */ +{ op_678_0_comp_ff, 0x00000002, 1656 }, /* ADD */ +{ op_679_0_comp_ff, 0x00000002, 1657 }, /* ADD */ +{ op_680_0_comp_ff, 0x00000002, 1664 }, /* ADD */ +{ op_690_0_comp_ff, 0x00000002, 1680 }, /* ADD */ +{ op_698_0_comp_ff, 0x00000002, 1688 }, /* ADD */ +{ op_6a0_0_comp_ff, 0x00000002, 1696 }, /* ADD */ +{ op_6a8_0_comp_ff, 0x00000002, 1704 }, /* ADD */ +{ op_6b0_0_comp_ff, 0x00000002, 1712 }, /* ADD */ +{ op_6b8_0_comp_ff, 0x00000002, 1720 }, /* ADD */ +{ op_6b9_0_comp_ff, 0x00000002, 1721 }, /* ADD */ +{ NULL, 0x00000001, 1728 }, /* RTM */ +{ NULL, 0x00000001, 1736 }, /* RTM */ +{ NULL, 0x00000001, 1744 }, /* CALLM */ +{ NULL, 0x00000001, 1768 }, /* CALLM */ +{ NULL, 0x00000001, 1776 }, /* CALLM */ +{ NULL, 0x00000001, 1784 }, /* CALLM */ +{ NULL, 0x00000001, 1785 }, /* CALLM */ +{ NULL, 0x00000001, 1786 }, /* CALLM */ +{ NULL, 0x00000001, 1787 }, /* CALLM */ +{ op_800_0_comp_ff, 0x00000002, 2048 }, /* BTST */ +{ op_810_0_comp_ff, 0x00000002, 2064 }, /* BTST */ +{ op_818_0_comp_ff, 0x00000002, 2072 }, /* BTST */ +{ op_820_0_comp_ff, 0x00000002, 2080 }, /* BTST */ +{ op_828_0_comp_ff, 0x00000002, 2088 }, /* BTST */ +{ op_830_0_comp_ff, 0x00000002, 2096 }, /* BTST */ +{ op_838_0_comp_ff, 0x00000002, 2104 }, /* BTST */ +{ op_839_0_comp_ff, 0x00000002, 2105 }, /* BTST */ +{ op_83a_0_comp_ff, 0x00000002, 2106 }, /* BTST */ +{ op_83b_0_comp_ff, 0x00000002, 2107 }, /* BTST */ +{ op_840_0_comp_ff, 0x00000002, 2112 }, /* BCHG */ +{ op_850_0_comp_ff, 0x00000002, 2128 }, /* BCHG */ +{ op_858_0_comp_ff, 0x00000002, 2136 }, /* BCHG */ +{ op_860_0_comp_ff, 0x00000002, 2144 }, /* BCHG */ +{ op_868_0_comp_ff, 0x00000002, 2152 }, /* BCHG */ +{ op_870_0_comp_ff, 0x00000002, 2160 }, /* BCHG */ +{ op_878_0_comp_ff, 0x00000002, 2168 }, /* BCHG */ +{ op_879_0_comp_ff, 0x00000002, 2169 }, /* BCHG */ +{ op_880_0_comp_ff, 0x00000002, 2176 }, /* BCLR */ +{ op_890_0_comp_ff, 0x00000002, 2192 }, /* BCLR */ +{ op_898_0_comp_ff, 0x00000002, 2200 }, /* BCLR */ +{ op_8a0_0_comp_ff, 0x00000002, 2208 }, /* BCLR */ +{ op_8a8_0_comp_ff, 0x00000002, 2216 }, /* BCLR */ +{ op_8b0_0_comp_ff, 0x00000002, 2224 }, /* BCLR */ +{ op_8b8_0_comp_ff, 0x00000002, 2232 }, /* BCLR */ +{ op_8b9_0_comp_ff, 0x00000002, 2233 }, /* BCLR */ +{ op_8c0_0_comp_ff, 0x00000002, 2240 }, /* BSET */ +{ op_8d0_0_comp_ff, 0x00000002, 2256 }, /* BSET */ +{ op_8d8_0_comp_ff, 0x00000002, 2264 }, /* BSET */ +{ op_8e0_0_comp_ff, 0x00000002, 2272 }, /* BSET */ +{ op_8e8_0_comp_ff, 0x00000002, 2280 }, /* BSET */ +{ op_8f0_0_comp_ff, 0x00000002, 2288 }, /* BSET */ +{ op_8f8_0_comp_ff, 0x00000002, 2296 }, /* BSET */ +{ op_8f9_0_comp_ff, 0x00000002, 2297 }, /* BSET */ +{ op_a00_0_comp_ff, 0x00000002, 2560 }, /* EOR */ +{ op_a10_0_comp_ff, 0x00000002, 2576 }, /* EOR */ +{ op_a18_0_comp_ff, 0x00000002, 2584 }, /* EOR */ +{ op_a20_0_comp_ff, 0x00000002, 2592 }, /* EOR */ +{ op_a28_0_comp_ff, 0x00000002, 2600 }, /* EOR */ +{ op_a30_0_comp_ff, 0x00000002, 2608 }, /* EOR */ +{ op_a38_0_comp_ff, 0x00000002, 2616 }, /* EOR */ +{ op_a39_0_comp_ff, 0x00000002, 2617 }, /* EOR */ +{ op_a3c_0_comp_ff, 0x00000002, 2620 }, /* EORSR */ +{ op_a40_0_comp_ff, 0x00000002, 2624 }, /* EOR */ +{ op_a50_0_comp_ff, 0x00000002, 2640 }, /* EOR */ +{ op_a58_0_comp_ff, 0x00000002, 2648 }, /* EOR */ +{ op_a60_0_comp_ff, 0x00000002, 2656 }, /* EOR */ +{ op_a68_0_comp_ff, 0x00000002, 2664 }, /* EOR */ +{ op_a70_0_comp_ff, 0x00000002, 2672 }, /* EOR */ +{ op_a78_0_comp_ff, 0x00000002, 2680 }, /* EOR */ +{ op_a79_0_comp_ff, 0x00000002, 2681 }, /* EOR */ +{ NULL, 0x00000002, 2684 }, /* EORSR */ +{ op_a80_0_comp_ff, 0x00000002, 2688 }, /* EOR */ +{ op_a90_0_comp_ff, 0x00000002, 2704 }, /* EOR */ +{ op_a98_0_comp_ff, 0x00000002, 2712 }, /* EOR */ +{ op_aa0_0_comp_ff, 0x00000002, 2720 }, /* EOR */ +{ op_aa8_0_comp_ff, 0x00000002, 2728 }, /* EOR */ +{ op_ab0_0_comp_ff, 0x00000002, 2736 }, /* EOR */ +{ op_ab8_0_comp_ff, 0x00000002, 2744 }, /* EOR */ +{ op_ab9_0_comp_ff, 0x00000002, 2745 }, /* EOR */ +{ NULL, 0x00000000, 2768 }, /* CAS */ +{ NULL, 0x00000000, 2776 }, /* CAS */ +{ NULL, 0x00000000, 2784 }, /* CAS */ +{ NULL, 0x00000000, 2792 }, /* CAS */ +{ NULL, 0x00000000, 2800 }, /* CAS */ +{ NULL, 0x00000000, 2808 }, /* CAS */ +{ NULL, 0x00000000, 2809 }, /* CAS */ +{ op_c00_0_comp_ff, 0x00000002, 3072 }, /* CMP */ +{ op_c10_0_comp_ff, 0x00000002, 3088 }, /* CMP */ +{ op_c18_0_comp_ff, 0x00000002, 3096 }, /* CMP */ +{ op_c20_0_comp_ff, 0x00000002, 3104 }, /* CMP */ +{ op_c28_0_comp_ff, 0x00000002, 3112 }, /* CMP */ +{ op_c30_0_comp_ff, 0x00000002, 3120 }, /* CMP */ +{ op_c38_0_comp_ff, 0x00000002, 3128 }, /* CMP */ +{ op_c39_0_comp_ff, 0x00000002, 3129 }, /* CMP */ +{ op_c3a_0_comp_ff, 0x00000002, 3130 }, /* CMP */ +{ op_c3b_0_comp_ff, 0x00000002, 3131 }, /* CMP */ +{ op_c40_0_comp_ff, 0x00000002, 3136 }, /* CMP */ +{ op_c50_0_comp_ff, 0x00000002, 3152 }, /* CMP */ +{ op_c58_0_comp_ff, 0x00000002, 3160 }, /* CMP */ +{ op_c60_0_comp_ff, 0x00000002, 3168 }, /* CMP */ +{ op_c68_0_comp_ff, 0x00000002, 3176 }, /* CMP */ +{ op_c70_0_comp_ff, 0x00000002, 3184 }, /* CMP */ +{ op_c78_0_comp_ff, 0x00000002, 3192 }, /* CMP */ +{ op_c79_0_comp_ff, 0x00000002, 3193 }, /* CMP */ +{ op_c7a_0_comp_ff, 0x00000002, 3194 }, /* CMP */ +{ op_c7b_0_comp_ff, 0x00000002, 3195 }, /* CMP */ +{ op_c80_0_comp_ff, 0x00000002, 3200 }, /* CMP */ +{ op_c90_0_comp_ff, 0x00000002, 3216 }, /* CMP */ +{ op_c98_0_comp_ff, 0x00000002, 3224 }, /* CMP */ +{ op_ca0_0_comp_ff, 0x00000002, 3232 }, /* CMP */ +{ op_ca8_0_comp_ff, 0x00000002, 3240 }, /* CMP */ +{ op_cb0_0_comp_ff, 0x00000002, 3248 }, /* CMP */ +{ op_cb8_0_comp_ff, 0x00000002, 3256 }, /* CMP */ +{ op_cb9_0_comp_ff, 0x00000002, 3257 }, /* CMP */ +{ op_cba_0_comp_ff, 0x00000002, 3258 }, /* CMP */ +{ op_cbb_0_comp_ff, 0x00000002, 3259 }, /* CMP */ +{ NULL, 0x00000000, 3280 }, /* CAS */ +{ NULL, 0x00000000, 3288 }, /* CAS */ +{ NULL, 0x00000000, 3296 }, /* CAS */ +{ NULL, 0x00000000, 3304 }, /* CAS */ +{ NULL, 0x00000000, 3312 }, /* CAS */ +{ NULL, 0x00000000, 3320 }, /* CAS */ +{ NULL, 0x00000000, 3321 }, /* CAS */ +{ NULL, 0x00000000, 3324 }, /* CAS2 */ +{ NULL, 0x00000001, 3600 }, /* MOVES */ +{ NULL, 0x00000001, 3608 }, /* MOVES */ +{ NULL, 0x00000001, 3616 }, /* MOVES */ +{ NULL, 0x00000001, 3624 }, /* MOVES */ +{ NULL, 0x00000001, 3632 }, /* MOVES */ +{ NULL, 0x00000001, 3640 }, /* MOVES */ +{ NULL, 0x00000001, 3641 }, /* MOVES */ +{ NULL, 0x00000001, 3664 }, /* MOVES */ +{ NULL, 0x00000001, 3672 }, /* MOVES */ +{ NULL, 0x00000001, 3680 }, /* MOVES */ +{ NULL, 0x00000001, 3688 }, /* MOVES */ +{ NULL, 0x00000001, 3696 }, /* MOVES */ +{ NULL, 0x00000001, 3704 }, /* MOVES */ +{ NULL, 0x00000001, 3705 }, /* MOVES */ +{ NULL, 0x00000001, 3728 }, /* MOVES */ +{ NULL, 0x00000001, 3736 }, /* MOVES */ +{ NULL, 0x00000001, 3744 }, /* MOVES */ +{ NULL, 0x00000001, 3752 }, /* MOVES */ +{ NULL, 0x00000001, 3760 }, /* MOVES */ +{ NULL, 0x00000001, 3768 }, /* MOVES */ +{ NULL, 0x00000001, 3769 }, /* MOVES */ +{ NULL, 0x00000000, 3792 }, /* CAS */ +{ NULL, 0x00000000, 3800 }, /* CAS */ +{ NULL, 0x00000000, 3808 }, /* CAS */ +{ NULL, 0x00000000, 3816 }, /* CAS */ +{ NULL, 0x00000000, 3824 }, /* CAS */ +{ NULL, 0x00000000, 3832 }, /* CAS */ +{ NULL, 0x00000000, 3833 }, /* CAS */ +{ NULL, 0x00000000, 3836 }, /* CAS2 */ +{ op_1000_0_comp_ff, 0x00000000, 4096 }, /* MOVE */ +{ op_1010_0_comp_ff, 0x00000000, 4112 }, /* MOVE */ +{ op_1018_0_comp_ff, 0x00000000, 4120 }, /* MOVE */ +{ op_1020_0_comp_ff, 0x00000000, 4128 }, /* MOVE */ +{ op_1028_0_comp_ff, 0x00000002, 4136 }, /* MOVE */ +{ op_1030_0_comp_ff, 0x00000002, 4144 }, /* MOVE */ +{ op_1038_0_comp_ff, 0x00000002, 4152 }, /* MOVE */ +{ op_1039_0_comp_ff, 0x00000002, 4153 }, /* MOVE */ +{ op_103a_0_comp_ff, 0x00000002, 4154 }, /* MOVE */ +{ op_103b_0_comp_ff, 0x00000002, 4155 }, /* MOVE */ +{ op_103c_0_comp_ff, 0x00000002, 4156 }, /* MOVE */ +{ op_1080_0_comp_ff, 0x00000000, 4224 }, /* MOVE */ +{ op_1090_0_comp_ff, 0x00000000, 4240 }, /* MOVE */ +{ op_1098_0_comp_ff, 0x00000000, 4248 }, /* MOVE */ +{ op_10a0_0_comp_ff, 0x00000000, 4256 }, /* MOVE */ +{ op_10a8_0_comp_ff, 0x00000002, 4264 }, /* MOVE */ +{ op_10b0_0_comp_ff, 0x00000002, 4272 }, /* MOVE */ +{ op_10b8_0_comp_ff, 0x00000002, 4280 }, /* MOVE */ +{ op_10b9_0_comp_ff, 0x00000002, 4281 }, /* MOVE */ +{ op_10ba_0_comp_ff, 0x00000002, 4282 }, /* MOVE */ +{ op_10bb_0_comp_ff, 0x00000002, 4283 }, /* MOVE */ +{ op_10bc_0_comp_ff, 0x00000002, 4284 }, /* MOVE */ +{ op_10c0_0_comp_ff, 0x00000000, 4288 }, /* MOVE */ +{ op_10d0_0_comp_ff, 0x00000000, 4304 }, /* MOVE */ +{ op_10d8_0_comp_ff, 0x00000000, 4312 }, /* MOVE */ +{ op_10e0_0_comp_ff, 0x00000000, 4320 }, /* MOVE */ +{ op_10e8_0_comp_ff, 0x00000002, 4328 }, /* MOVE */ +{ op_10f0_0_comp_ff, 0x00000002, 4336 }, /* MOVE */ +{ op_10f8_0_comp_ff, 0x00000002, 4344 }, /* MOVE */ +{ op_10f9_0_comp_ff, 0x00000002, 4345 }, /* MOVE */ +{ op_10fa_0_comp_ff, 0x00000002, 4346 }, /* MOVE */ +{ op_10fb_0_comp_ff, 0x00000002, 4347 }, /* MOVE */ +{ op_10fc_0_comp_ff, 0x00000002, 4348 }, /* MOVE */ +{ op_1100_0_comp_ff, 0x00000000, 4352 }, /* MOVE */ +{ op_1110_0_comp_ff, 0x00000000, 4368 }, /* MOVE */ +{ op_1118_0_comp_ff, 0x00000000, 4376 }, /* MOVE */ +{ op_1120_0_comp_ff, 0x00000000, 4384 }, /* MOVE */ +{ op_1128_0_comp_ff, 0x00000002, 4392 }, /* MOVE */ +{ op_1130_0_comp_ff, 0x00000002, 4400 }, /* MOVE */ +{ op_1138_0_comp_ff, 0x00000002, 4408 }, /* MOVE */ +{ op_1139_0_comp_ff, 0x00000002, 4409 }, /* MOVE */ +{ op_113a_0_comp_ff, 0x00000002, 4410 }, /* MOVE */ +{ op_113b_0_comp_ff, 0x00000002, 4411 }, /* MOVE */ +{ op_113c_0_comp_ff, 0x00000002, 4412 }, /* MOVE */ +{ op_1140_0_comp_ff, 0x00000002, 4416 }, /* MOVE */ +{ op_1150_0_comp_ff, 0x00000002, 4432 }, /* MOVE */ +{ op_1158_0_comp_ff, 0x00000002, 4440 }, /* MOVE */ +{ op_1160_0_comp_ff, 0x00000002, 4448 }, /* MOVE */ +{ op_1168_0_comp_ff, 0x00000002, 4456 }, /* MOVE */ +{ op_1170_0_comp_ff, 0x00000002, 4464 }, /* MOVE */ +{ op_1178_0_comp_ff, 0x00000002, 4472 }, /* MOVE */ +{ op_1179_0_comp_ff, 0x00000002, 4473 }, /* MOVE */ +{ op_117a_0_comp_ff, 0x00000002, 4474 }, /* MOVE */ +{ op_117b_0_comp_ff, 0x00000002, 4475 }, /* MOVE */ +{ op_117c_0_comp_ff, 0x00000002, 4476 }, /* MOVE */ +{ op_1180_0_comp_ff, 0x00000002, 4480 }, /* MOVE */ +{ op_1190_0_comp_ff, 0x00000002, 4496 }, /* MOVE */ +{ op_1198_0_comp_ff, 0x00000002, 4504 }, /* MOVE */ +{ op_11a0_0_comp_ff, 0x00000002, 4512 }, /* MOVE */ +{ op_11a8_0_comp_ff, 0x00000002, 4520 }, /* MOVE */ +{ op_11b0_0_comp_ff, 0x00000002, 4528 }, /* MOVE */ +{ op_11b8_0_comp_ff, 0x00000002, 4536 }, /* MOVE */ +{ op_11b9_0_comp_ff, 0x00000002, 4537 }, /* MOVE */ +{ op_11ba_0_comp_ff, 0x00000002, 4538 }, /* MOVE */ +{ op_11bb_0_comp_ff, 0x00000002, 4539 }, /* MOVE */ +{ op_11bc_0_comp_ff, 0x00000002, 4540 }, /* MOVE */ +{ op_11c0_0_comp_ff, 0x00000002, 4544 }, /* MOVE */ +{ op_11d0_0_comp_ff, 0x00000002, 4560 }, /* MOVE */ +{ op_11d8_0_comp_ff, 0x00000002, 4568 }, /* MOVE */ +{ op_11e0_0_comp_ff, 0x00000002, 4576 }, /* MOVE */ +{ op_11e8_0_comp_ff, 0x00000002, 4584 }, /* MOVE */ +{ op_11f0_0_comp_ff, 0x00000002, 4592 }, /* MOVE */ +{ op_11f8_0_comp_ff, 0x00000002, 4600 }, /* MOVE */ +{ op_11f9_0_comp_ff, 0x00000002, 4601 }, /* MOVE */ +{ op_11fa_0_comp_ff, 0x00000002, 4602 }, /* MOVE */ +{ op_11fb_0_comp_ff, 0x00000002, 4603 }, /* MOVE */ +{ op_11fc_0_comp_ff, 0x00000002, 4604 }, /* MOVE */ +{ op_13c0_0_comp_ff, 0x00000002, 5056 }, /* MOVE */ +{ op_13d0_0_comp_ff, 0x00000002, 5072 }, /* MOVE */ +{ op_13d8_0_comp_ff, 0x00000002, 5080 }, /* MOVE */ +{ op_13e0_0_comp_ff, 0x00000002, 5088 }, /* MOVE */ +{ op_13e8_0_comp_ff, 0x00000002, 5096 }, /* MOVE */ +{ op_13f0_0_comp_ff, 0x00000002, 5104 }, /* MOVE */ +{ op_13f8_0_comp_ff, 0x00000002, 5112 }, /* MOVE */ +{ op_13f9_0_comp_ff, 0x00000002, 5113 }, /* MOVE */ +{ op_13fa_0_comp_ff, 0x00000002, 5114 }, /* MOVE */ +{ op_13fb_0_comp_ff, 0x00000002, 5115 }, /* MOVE */ +{ op_13fc_0_comp_ff, 0x00000002, 5116 }, /* MOVE */ +{ op_2000_0_comp_ff, 0x00000000, 8192 }, /* MOVE */ +{ op_2008_0_comp_ff, 0x00000000, 8200 }, /* MOVE */ +{ op_2010_0_comp_ff, 0x00000000, 8208 }, /* MOVE */ +{ op_2018_0_comp_ff, 0x00000000, 8216 }, /* MOVE */ +{ op_2020_0_comp_ff, 0x00000000, 8224 }, /* MOVE */ +{ op_2028_0_comp_ff, 0x00000002, 8232 }, /* MOVE */ +{ op_2030_0_comp_ff, 0x00000002, 8240 }, /* MOVE */ +{ op_2038_0_comp_ff, 0x00000002, 8248 }, /* MOVE */ +{ op_2039_0_comp_ff, 0x00000002, 8249 }, /* MOVE */ +{ op_203a_0_comp_ff, 0x00000002, 8250 }, /* MOVE */ +{ op_203b_0_comp_ff, 0x00000002, 8251 }, /* MOVE */ +{ op_203c_0_comp_ff, 0x00000002, 8252 }, /* MOVE */ +{ op_2040_0_comp_ff, 0x00000000, 8256 }, /* MOVEA */ +{ op_2048_0_comp_ff, 0x00000000, 8264 }, /* MOVEA */ +{ op_2050_0_comp_ff, 0x00000000, 8272 }, /* MOVEA */ +{ op_2058_0_comp_ff, 0x00000000, 8280 }, /* MOVEA */ +{ op_2060_0_comp_ff, 0x00000000, 8288 }, /* MOVEA */ +{ op_2068_0_comp_ff, 0x00000002, 8296 }, /* MOVEA */ +{ op_2070_0_comp_ff, 0x00000002, 8304 }, /* MOVEA */ +{ op_2078_0_comp_ff, 0x00000002, 8312 }, /* MOVEA */ +{ op_2079_0_comp_ff, 0x00000002, 8313 }, /* MOVEA */ +{ op_207a_0_comp_ff, 0x00000002, 8314 }, /* MOVEA */ +{ op_207b_0_comp_ff, 0x00000002, 8315 }, /* MOVEA */ +{ op_207c_0_comp_ff, 0x00000002, 8316 }, /* MOVEA */ +{ op_2080_0_comp_ff, 0x00000000, 8320 }, /* MOVE */ +{ op_2088_0_comp_ff, 0x00000000, 8328 }, /* MOVE */ +{ op_2090_0_comp_ff, 0x00000000, 8336 }, /* MOVE */ +{ op_2098_0_comp_ff, 0x00000000, 8344 }, /* MOVE */ +{ op_20a0_0_comp_ff, 0x00000000, 8352 }, /* MOVE */ +{ op_20a8_0_comp_ff, 0x00000002, 8360 }, /* MOVE */ +{ op_20b0_0_comp_ff, 0x00000002, 8368 }, /* MOVE */ +{ op_20b8_0_comp_ff, 0x00000002, 8376 }, /* MOVE */ +{ op_20b9_0_comp_ff, 0x00000002, 8377 }, /* MOVE */ +{ op_20ba_0_comp_ff, 0x00000002, 8378 }, /* MOVE */ +{ op_20bb_0_comp_ff, 0x00000002, 8379 }, /* MOVE */ +{ op_20bc_0_comp_ff, 0x00000002, 8380 }, /* MOVE */ +{ op_20c0_0_comp_ff, 0x00000000, 8384 }, /* MOVE */ +{ op_20c8_0_comp_ff, 0x00000000, 8392 }, /* MOVE */ +{ op_20d0_0_comp_ff, 0x00000000, 8400 }, /* MOVE */ +{ op_20d8_0_comp_ff, 0x00000000, 8408 }, /* MOVE */ +{ op_20e0_0_comp_ff, 0x00000000, 8416 }, /* MOVE */ +{ op_20e8_0_comp_ff, 0x00000002, 8424 }, /* MOVE */ +{ op_20f0_0_comp_ff, 0x00000002, 8432 }, /* MOVE */ +{ op_20f8_0_comp_ff, 0x00000002, 8440 }, /* MOVE */ +{ op_20f9_0_comp_ff, 0x00000002, 8441 }, /* MOVE */ +{ op_20fa_0_comp_ff, 0x00000002, 8442 }, /* MOVE */ +{ op_20fb_0_comp_ff, 0x00000002, 8443 }, /* MOVE */ +{ op_20fc_0_comp_ff, 0x00000002, 8444 }, /* MOVE */ +{ op_2100_0_comp_ff, 0x00000000, 8448 }, /* MOVE */ +{ op_2108_0_comp_ff, 0x00000000, 8456 }, /* MOVE */ +{ op_2110_0_comp_ff, 0x00000000, 8464 }, /* MOVE */ +{ op_2118_0_comp_ff, 0x00000000, 8472 }, /* MOVE */ +{ op_2120_0_comp_ff, 0x00000000, 8480 }, /* MOVE */ +{ op_2128_0_comp_ff, 0x00000002, 8488 }, /* MOVE */ +{ op_2130_0_comp_ff, 0x00000002, 8496 }, /* MOVE */ +{ op_2138_0_comp_ff, 0x00000002, 8504 }, /* MOVE */ +{ op_2139_0_comp_ff, 0x00000002, 8505 }, /* MOVE */ +{ op_213a_0_comp_ff, 0x00000002, 8506 }, /* MOVE */ +{ op_213b_0_comp_ff, 0x00000002, 8507 }, /* MOVE */ +{ op_213c_0_comp_ff, 0x00000002, 8508 }, /* MOVE */ +{ op_2140_0_comp_ff, 0x00000002, 8512 }, /* MOVE */ +{ op_2148_0_comp_ff, 0x00000002, 8520 }, /* MOVE */ +{ op_2150_0_comp_ff, 0x00000002, 8528 }, /* MOVE */ +{ op_2158_0_comp_ff, 0x00000002, 8536 }, /* MOVE */ +{ op_2160_0_comp_ff, 0x00000002, 8544 }, /* MOVE */ +{ op_2168_0_comp_ff, 0x00000002, 8552 }, /* MOVE */ +{ op_2170_0_comp_ff, 0x00000002, 8560 }, /* MOVE */ +{ op_2178_0_comp_ff, 0x00000002, 8568 }, /* MOVE */ +{ op_2179_0_comp_ff, 0x00000002, 8569 }, /* MOVE */ +{ op_217a_0_comp_ff, 0x00000002, 8570 }, /* MOVE */ +{ op_217b_0_comp_ff, 0x00000002, 8571 }, /* MOVE */ +{ op_217c_0_comp_ff, 0x00000002, 8572 }, /* MOVE */ +{ op_2180_0_comp_ff, 0x00000002, 8576 }, /* MOVE */ +{ op_2188_0_comp_ff, 0x00000002, 8584 }, /* MOVE */ +{ op_2190_0_comp_ff, 0x00000002, 8592 }, /* MOVE */ +{ op_2198_0_comp_ff, 0x00000002, 8600 }, /* MOVE */ +{ op_21a0_0_comp_ff, 0x00000002, 8608 }, /* MOVE */ +{ op_21a8_0_comp_ff, 0x00000002, 8616 }, /* MOVE */ +{ op_21b0_0_comp_ff, 0x00000002, 8624 }, /* MOVE */ +{ op_21b8_0_comp_ff, 0x00000002, 8632 }, /* MOVE */ +{ op_21b9_0_comp_ff, 0x00000002, 8633 }, /* MOVE */ +{ op_21ba_0_comp_ff, 0x00000002, 8634 }, /* MOVE */ +{ op_21bb_0_comp_ff, 0x00000002, 8635 }, /* MOVE */ +{ op_21bc_0_comp_ff, 0x00000002, 8636 }, /* MOVE */ +{ op_21c0_0_comp_ff, 0x00000002, 8640 }, /* MOVE */ +{ op_21c8_0_comp_ff, 0x00000002, 8648 }, /* MOVE */ +{ op_21d0_0_comp_ff, 0x00000002, 8656 }, /* MOVE */ +{ op_21d8_0_comp_ff, 0x00000002, 8664 }, /* MOVE */ +{ op_21e0_0_comp_ff, 0x00000002, 8672 }, /* MOVE */ +{ op_21e8_0_comp_ff, 0x00000002, 8680 }, /* MOVE */ +{ op_21f0_0_comp_ff, 0x00000002, 8688 }, /* MOVE */ +{ op_21f8_0_comp_ff, 0x00000002, 8696 }, /* MOVE */ +{ op_21f9_0_comp_ff, 0x00000002, 8697 }, /* MOVE */ +{ op_21fa_0_comp_ff, 0x00000002, 8698 }, /* MOVE */ +{ op_21fb_0_comp_ff, 0x00000002, 8699 }, /* MOVE */ +{ op_21fc_0_comp_ff, 0x00000002, 8700 }, /* MOVE */ +{ op_23c0_0_comp_ff, 0x00000002, 9152 }, /* MOVE */ +{ op_23c8_0_comp_ff, 0x00000002, 9160 }, /* MOVE */ +{ op_23d0_0_comp_ff, 0x00000002, 9168 }, /* MOVE */ +{ op_23d8_0_comp_ff, 0x00000002, 9176 }, /* MOVE */ +{ op_23e0_0_comp_ff, 0x00000002, 9184 }, /* MOVE */ +{ op_23e8_0_comp_ff, 0x00000002, 9192 }, /* MOVE */ +{ op_23f0_0_comp_ff, 0x00000002, 9200 }, /* MOVE */ +{ op_23f8_0_comp_ff, 0x00000002, 9208 }, /* MOVE */ +{ op_23f9_0_comp_ff, 0x00000002, 9209 }, /* MOVE */ +{ op_23fa_0_comp_ff, 0x00000002, 9210 }, /* MOVE */ +{ op_23fb_0_comp_ff, 0x00000002, 9211 }, /* MOVE */ +{ op_23fc_0_comp_ff, 0x00000002, 9212 }, /* MOVE */ +{ op_3000_0_comp_ff, 0x00000000, 12288 }, /* MOVE */ +{ op_3008_0_comp_ff, 0x00000000, 12296 }, /* MOVE */ +{ op_3010_0_comp_ff, 0x00000000, 12304 }, /* MOVE */ +{ op_3018_0_comp_ff, 0x00000000, 12312 }, /* MOVE */ +{ op_3020_0_comp_ff, 0x00000000, 12320 }, /* MOVE */ +{ op_3028_0_comp_ff, 0x00000002, 12328 }, /* MOVE */ +{ op_3030_0_comp_ff, 0x00000002, 12336 }, /* MOVE */ +{ op_3038_0_comp_ff, 0x00000002, 12344 }, /* MOVE */ +{ op_3039_0_comp_ff, 0x00000002, 12345 }, /* MOVE */ +{ op_303a_0_comp_ff, 0x00000002, 12346 }, /* MOVE */ +{ op_303b_0_comp_ff, 0x00000002, 12347 }, /* MOVE */ +{ op_303c_0_comp_ff, 0x00000002, 12348 }, /* MOVE */ +{ op_3040_0_comp_ff, 0x00000000, 12352 }, /* MOVEA */ +{ op_3048_0_comp_ff, 0x00000000, 12360 }, /* MOVEA */ +{ op_3050_0_comp_ff, 0x00000000, 12368 }, /* MOVEA */ +{ op_3058_0_comp_ff, 0x00000000, 12376 }, /* MOVEA */ +{ op_3060_0_comp_ff, 0x00000000, 12384 }, /* MOVEA */ +{ op_3068_0_comp_ff, 0x00000002, 12392 }, /* MOVEA */ +{ op_3070_0_comp_ff, 0x00000002, 12400 }, /* MOVEA */ +{ op_3078_0_comp_ff, 0x00000002, 12408 }, /* MOVEA */ +{ op_3079_0_comp_ff, 0x00000002, 12409 }, /* MOVEA */ +{ op_307a_0_comp_ff, 0x00000002, 12410 }, /* MOVEA */ +{ op_307b_0_comp_ff, 0x00000002, 12411 }, /* MOVEA */ +{ op_307c_0_comp_ff, 0x00000002, 12412 }, /* MOVEA */ +{ op_3080_0_comp_ff, 0x00000000, 12416 }, /* MOVE */ +{ op_3088_0_comp_ff, 0x00000000, 12424 }, /* MOVE */ +{ op_3090_0_comp_ff, 0x00000000, 12432 }, /* MOVE */ +{ op_3098_0_comp_ff, 0x00000000, 12440 }, /* MOVE */ +{ op_30a0_0_comp_ff, 0x00000000, 12448 }, /* MOVE */ +{ op_30a8_0_comp_ff, 0x00000002, 12456 }, /* MOVE */ +{ op_30b0_0_comp_ff, 0x00000002, 12464 }, /* MOVE */ +{ op_30b8_0_comp_ff, 0x00000002, 12472 }, /* MOVE */ +{ op_30b9_0_comp_ff, 0x00000002, 12473 }, /* MOVE */ +{ op_30ba_0_comp_ff, 0x00000002, 12474 }, /* MOVE */ +{ op_30bb_0_comp_ff, 0x00000002, 12475 }, /* MOVE */ +{ op_30bc_0_comp_ff, 0x00000002, 12476 }, /* MOVE */ +{ op_30c0_0_comp_ff, 0x00000000, 12480 }, /* MOVE */ +{ op_30c8_0_comp_ff, 0x00000000, 12488 }, /* MOVE */ +{ op_30d0_0_comp_ff, 0x00000000, 12496 }, /* MOVE */ +{ op_30d8_0_comp_ff, 0x00000000, 12504 }, /* MOVE */ +{ op_30e0_0_comp_ff, 0x00000000, 12512 }, /* MOVE */ +{ op_30e8_0_comp_ff, 0x00000002, 12520 }, /* MOVE */ +{ op_30f0_0_comp_ff, 0x00000002, 12528 }, /* MOVE */ +{ op_30f8_0_comp_ff, 0x00000002, 12536 }, /* MOVE */ +{ op_30f9_0_comp_ff, 0x00000002, 12537 }, /* MOVE */ +{ op_30fa_0_comp_ff, 0x00000002, 12538 }, /* MOVE */ +{ op_30fb_0_comp_ff, 0x00000002, 12539 }, /* MOVE */ +{ op_30fc_0_comp_ff, 0x00000002, 12540 }, /* MOVE */ +{ op_3100_0_comp_ff, 0x00000000, 12544 }, /* MOVE */ +{ op_3108_0_comp_ff, 0x00000000, 12552 }, /* MOVE */ +{ op_3110_0_comp_ff, 0x00000000, 12560 }, /* MOVE */ +{ op_3118_0_comp_ff, 0x00000000, 12568 }, /* MOVE */ +{ op_3120_0_comp_ff, 0x00000000, 12576 }, /* MOVE */ +{ op_3128_0_comp_ff, 0x00000002, 12584 }, /* MOVE */ +{ op_3130_0_comp_ff, 0x00000002, 12592 }, /* MOVE */ +{ op_3138_0_comp_ff, 0x00000002, 12600 }, /* MOVE */ +{ op_3139_0_comp_ff, 0x00000002, 12601 }, /* MOVE */ +{ op_313a_0_comp_ff, 0x00000002, 12602 }, /* MOVE */ +{ op_313b_0_comp_ff, 0x00000002, 12603 }, /* MOVE */ +{ op_313c_0_comp_ff, 0x00000002, 12604 }, /* MOVE */ +{ op_3140_0_comp_ff, 0x00000002, 12608 }, /* MOVE */ +{ op_3148_0_comp_ff, 0x00000002, 12616 }, /* MOVE */ +{ op_3150_0_comp_ff, 0x00000002, 12624 }, /* MOVE */ +{ op_3158_0_comp_ff, 0x00000002, 12632 }, /* MOVE */ +{ op_3160_0_comp_ff, 0x00000002, 12640 }, /* MOVE */ +{ op_3168_0_comp_ff, 0x00000002, 12648 }, /* MOVE */ +{ op_3170_0_comp_ff, 0x00000002, 12656 }, /* MOVE */ +{ op_3178_0_comp_ff, 0x00000002, 12664 }, /* MOVE */ +{ op_3179_0_comp_ff, 0x00000002, 12665 }, /* MOVE */ +{ op_317a_0_comp_ff, 0x00000002, 12666 }, /* MOVE */ +{ op_317b_0_comp_ff, 0x00000002, 12667 }, /* MOVE */ +{ op_317c_0_comp_ff, 0x00000002, 12668 }, /* MOVE */ +{ op_3180_0_comp_ff, 0x00000002, 12672 }, /* MOVE */ +{ op_3188_0_comp_ff, 0x00000002, 12680 }, /* MOVE */ +{ op_3190_0_comp_ff, 0x00000002, 12688 }, /* MOVE */ +{ op_3198_0_comp_ff, 0x00000002, 12696 }, /* MOVE */ +{ op_31a0_0_comp_ff, 0x00000002, 12704 }, /* MOVE */ +{ op_31a8_0_comp_ff, 0x00000002, 12712 }, /* MOVE */ +{ op_31b0_0_comp_ff, 0x00000002, 12720 }, /* MOVE */ +{ op_31b8_0_comp_ff, 0x00000002, 12728 }, /* MOVE */ +{ op_31b9_0_comp_ff, 0x00000002, 12729 }, /* MOVE */ +{ op_31ba_0_comp_ff, 0x00000002, 12730 }, /* MOVE */ +{ op_31bb_0_comp_ff, 0x00000002, 12731 }, /* MOVE */ +{ op_31bc_0_comp_ff, 0x00000002, 12732 }, /* MOVE */ +{ op_31c0_0_comp_ff, 0x00000002, 12736 }, /* MOVE */ +{ op_31c8_0_comp_ff, 0x00000002, 12744 }, /* MOVE */ +{ op_31d0_0_comp_ff, 0x00000002, 12752 }, /* MOVE */ +{ op_31d8_0_comp_ff, 0x00000002, 12760 }, /* MOVE */ +{ op_31e0_0_comp_ff, 0x00000002, 12768 }, /* MOVE */ +{ op_31e8_0_comp_ff, 0x00000002, 12776 }, /* MOVE */ +{ op_31f0_0_comp_ff, 0x00000002, 12784 }, /* MOVE */ +{ op_31f8_0_comp_ff, 0x00000002, 12792 }, /* MOVE */ +{ op_31f9_0_comp_ff, 0x00000002, 12793 }, /* MOVE */ +{ op_31fa_0_comp_ff, 0x00000002, 12794 }, /* MOVE */ +{ op_31fb_0_comp_ff, 0x00000002, 12795 }, /* MOVE */ +{ op_31fc_0_comp_ff, 0x00000002, 12796 }, /* MOVE */ +{ op_33c0_0_comp_ff, 0x00000002, 13248 }, /* MOVE */ +{ op_33c8_0_comp_ff, 0x00000002, 13256 }, /* MOVE */ +{ op_33d0_0_comp_ff, 0x00000002, 13264 }, /* MOVE */ +{ op_33d8_0_comp_ff, 0x00000002, 13272 }, /* MOVE */ +{ op_33e0_0_comp_ff, 0x00000002, 13280 }, /* MOVE */ +{ op_33e8_0_comp_ff, 0x00000002, 13288 }, /* MOVE */ +{ op_33f0_0_comp_ff, 0x00000002, 13296 }, /* MOVE */ +{ op_33f8_0_comp_ff, 0x00000002, 13304 }, /* MOVE */ +{ op_33f9_0_comp_ff, 0x00000002, 13305 }, /* MOVE */ +{ op_33fa_0_comp_ff, 0x00000002, 13306 }, /* MOVE */ +{ op_33fb_0_comp_ff, 0x00000002, 13307 }, /* MOVE */ +{ op_33fc_0_comp_ff, 0x00000002, 13308 }, /* MOVE */ +{ op_4000_0_comp_ff, 0x00000008, 16384 }, /* NEGX */ +{ op_4010_0_comp_ff, 0x00000008, 16400 }, /* NEGX */ +{ op_4018_0_comp_ff, 0x00000008, 16408 }, /* NEGX */ +{ op_4020_0_comp_ff, 0x00000008, 16416 }, /* NEGX */ +{ op_4028_0_comp_ff, 0x0000000a, 16424 }, /* NEGX */ +{ op_4030_0_comp_ff, 0x0000000a, 16432 }, /* NEGX */ +{ op_4038_0_comp_ff, 0x0000000a, 16440 }, /* NEGX */ +{ op_4039_0_comp_ff, 0x0000000a, 16441 }, /* NEGX */ +{ op_4040_0_comp_ff, 0x00000008, 16448 }, /* NEGX */ +{ op_4050_0_comp_ff, 0x00000008, 16464 }, /* NEGX */ +{ op_4058_0_comp_ff, 0x00000008, 16472 }, /* NEGX */ +{ op_4060_0_comp_ff, 0x00000008, 16480 }, /* NEGX */ +{ op_4068_0_comp_ff, 0x0000000a, 16488 }, /* NEGX */ +{ op_4070_0_comp_ff, 0x0000000a, 16496 }, /* NEGX */ +{ op_4078_0_comp_ff, 0x0000000a, 16504 }, /* NEGX */ +{ op_4079_0_comp_ff, 0x0000000a, 16505 }, /* NEGX */ +{ op_4080_0_comp_ff, 0x00000008, 16512 }, /* NEGX */ +{ op_4090_0_comp_ff, 0x00000008, 16528 }, /* NEGX */ +{ op_4098_0_comp_ff, 0x00000008, 16536 }, /* NEGX */ +{ op_40a0_0_comp_ff, 0x00000008, 16544 }, /* NEGX */ +{ op_40a8_0_comp_ff, 0x0000000a, 16552 }, /* NEGX */ +{ op_40b0_0_comp_ff, 0x0000000a, 16560 }, /* NEGX */ +{ op_40b8_0_comp_ff, 0x0000000a, 16568 }, /* NEGX */ +{ op_40b9_0_comp_ff, 0x0000000a, 16569 }, /* NEGX */ +{ NULL, 0x00000001, 16576 }, /* MVSR2 */ +{ NULL, 0x00000001, 16592 }, /* MVSR2 */ +{ NULL, 0x00000001, 16600 }, /* MVSR2 */ +{ NULL, 0x00000001, 16608 }, /* MVSR2 */ +{ NULL, 0x00000001, 16616 }, /* MVSR2 */ +{ NULL, 0x00000001, 16624 }, /* MVSR2 */ +{ NULL, 0x00000001, 16632 }, /* MVSR2 */ +{ NULL, 0x00000001, 16633 }, /* MVSR2 */ +{ NULL, 0x00000001, 16640 }, /* CHK */ +{ NULL, 0x00000001, 16656 }, /* CHK */ +{ NULL, 0x00000001, 16664 }, /* CHK */ +{ NULL, 0x00000001, 16672 }, /* CHK */ +{ NULL, 0x00000001, 16680 }, /* CHK */ +{ NULL, 0x00000001, 16688 }, /* CHK */ +{ NULL, 0x00000001, 16696 }, /* CHK */ +{ NULL, 0x00000001, 16697 }, /* CHK */ +{ NULL, 0x00000001, 16698 }, /* CHK */ +{ NULL, 0x00000001, 16699 }, /* CHK */ +{ NULL, 0x00000001, 16700 }, /* CHK */ +{ NULL, 0x00000001, 16768 }, /* CHK */ +{ NULL, 0x00000001, 16784 }, /* CHK */ +{ NULL, 0x00000001, 16792 }, /* CHK */ +{ NULL, 0x00000001, 16800 }, /* CHK */ +{ NULL, 0x00000001, 16808 }, /* CHK */ +{ NULL, 0x00000001, 16816 }, /* CHK */ +{ NULL, 0x00000001, 16824 }, /* CHK */ +{ NULL, 0x00000001, 16825 }, /* CHK */ +{ NULL, 0x00000001, 16826 }, /* CHK */ +{ NULL, 0x00000001, 16827 }, /* CHK */ +{ NULL, 0x00000001, 16828 }, /* CHK */ +{ op_41d0_0_comp_ff, 0x00000000, 16848 }, /* LEA */ +{ op_41e8_0_comp_ff, 0x00000002, 16872 }, /* LEA */ +{ op_41f0_0_comp_ff, 0x00000002, 16880 }, /* LEA */ +{ op_41f8_0_comp_ff, 0x00000002, 16888 }, /* LEA */ +{ op_41f9_0_comp_ff, 0x00000002, 16889 }, /* LEA */ +{ op_41fa_0_comp_ff, 0x00000002, 16890 }, /* LEA */ +{ op_41fb_0_comp_ff, 0x00000002, 16891 }, /* LEA */ +{ op_4200_0_comp_ff, 0x00000000, 16896 }, /* CLR */ +{ op_4210_0_comp_ff, 0x00000000, 16912 }, /* CLR */ +{ op_4218_0_comp_ff, 0x00000000, 16920 }, /* CLR */ +{ op_4220_0_comp_ff, 0x00000000, 16928 }, /* CLR */ +{ op_4228_0_comp_ff, 0x00000002, 16936 }, /* CLR */ +{ op_4230_0_comp_ff, 0x00000002, 16944 }, /* CLR */ +{ op_4238_0_comp_ff, 0x00000002, 16952 }, /* CLR */ +{ op_4239_0_comp_ff, 0x00000002, 16953 }, /* CLR */ +{ op_4240_0_comp_ff, 0x00000000, 16960 }, /* CLR */ +{ op_4250_0_comp_ff, 0x00000000, 16976 }, /* CLR */ +{ op_4258_0_comp_ff, 0x00000000, 16984 }, /* CLR */ +{ op_4260_0_comp_ff, 0x00000000, 16992 }, /* CLR */ +{ op_4268_0_comp_ff, 0x00000002, 17000 }, /* CLR */ +{ op_4270_0_comp_ff, 0x00000002, 17008 }, /* CLR */ +{ op_4278_0_comp_ff, 0x00000002, 17016 }, /* CLR */ +{ op_4279_0_comp_ff, 0x00000002, 17017 }, /* CLR */ +{ op_4280_0_comp_ff, 0x00000000, 17024 }, /* CLR */ +{ op_4290_0_comp_ff, 0x00000000, 17040 }, /* CLR */ +{ op_4298_0_comp_ff, 0x00000000, 17048 }, /* CLR */ +{ op_42a0_0_comp_ff, 0x00000000, 17056 }, /* CLR */ +{ op_42a8_0_comp_ff, 0x00000002, 17064 }, /* CLR */ +{ op_42b0_0_comp_ff, 0x00000002, 17072 }, /* CLR */ +{ op_42b8_0_comp_ff, 0x00000002, 17080 }, /* CLR */ +{ op_42b9_0_comp_ff, 0x00000002, 17081 }, /* CLR */ +{ NULL, 0x00000001, 17088 }, /* MVSR2 */ +{ NULL, 0x00000001, 17104 }, /* MVSR2 */ +{ NULL, 0x00000001, 17112 }, /* MVSR2 */ +{ NULL, 0x00000001, 17120 }, /* MVSR2 */ +{ NULL, 0x00000001, 17128 }, /* MVSR2 */ +{ NULL, 0x00000001, 17136 }, /* MVSR2 */ +{ NULL, 0x00000001, 17144 }, /* MVSR2 */ +{ NULL, 0x00000001, 17145 }, /* MVSR2 */ +{ op_4400_0_comp_ff, 0x00000000, 17408 }, /* NEG */ +{ op_4410_0_comp_ff, 0x00000000, 17424 }, /* NEG */ +{ op_4418_0_comp_ff, 0x00000000, 17432 }, /* NEG */ +{ op_4420_0_comp_ff, 0x00000000, 17440 }, /* NEG */ +{ op_4428_0_comp_ff, 0x00000002, 17448 }, /* NEG */ +{ op_4430_0_comp_ff, 0x00000002, 17456 }, /* NEG */ +{ op_4438_0_comp_ff, 0x00000002, 17464 }, /* NEG */ +{ op_4439_0_comp_ff, 0x00000002, 17465 }, /* NEG */ +{ op_4440_0_comp_ff, 0x00000000, 17472 }, /* NEG */ +{ op_4450_0_comp_ff, 0x00000000, 17488 }, /* NEG */ +{ op_4458_0_comp_ff, 0x00000000, 17496 }, /* NEG */ +{ op_4460_0_comp_ff, 0x00000000, 17504 }, /* NEG */ +{ op_4468_0_comp_ff, 0x00000002, 17512 }, /* NEG */ +{ op_4470_0_comp_ff, 0x00000002, 17520 }, /* NEG */ +{ op_4478_0_comp_ff, 0x00000002, 17528 }, /* NEG */ +{ op_4479_0_comp_ff, 0x00000002, 17529 }, /* NEG */ +{ op_4480_0_comp_ff, 0x00000000, 17536 }, /* NEG */ +{ op_4490_0_comp_ff, 0x00000000, 17552 }, /* NEG */ +{ op_4498_0_comp_ff, 0x00000000, 17560 }, /* NEG */ +{ op_44a0_0_comp_ff, 0x00000000, 17568 }, /* NEG */ +{ op_44a8_0_comp_ff, 0x00000002, 17576 }, /* NEG */ +{ op_44b0_0_comp_ff, 0x00000002, 17584 }, /* NEG */ +{ op_44b8_0_comp_ff, 0x00000002, 17592 }, /* NEG */ +{ op_44b9_0_comp_ff, 0x00000002, 17593 }, /* NEG */ +{ NULL, 0x00000001, 17600 }, /* MV2SR */ +{ NULL, 0x00000001, 17616 }, /* MV2SR */ +{ NULL, 0x00000001, 17624 }, /* MV2SR */ +{ NULL, 0x00000001, 17632 }, /* MV2SR */ +{ NULL, 0x00000001, 17640 }, /* MV2SR */ +{ NULL, 0x00000001, 17648 }, /* MV2SR */ +{ NULL, 0x00000001, 17656 }, /* MV2SR */ +{ NULL, 0x00000001, 17657 }, /* MV2SR */ +{ NULL, 0x00000001, 17658 }, /* MV2SR */ +{ NULL, 0x00000001, 17659 }, /* MV2SR */ +{ NULL, 0x00000001, 17660 }, /* MV2SR */ +{ op_4600_0_comp_ff, 0x00000000, 17920 }, /* NOT */ +{ op_4610_0_comp_ff, 0x00000000, 17936 }, /* NOT */ +{ op_4618_0_comp_ff, 0x00000000, 17944 }, /* NOT */ +{ op_4620_0_comp_ff, 0x00000000, 17952 }, /* NOT */ +{ op_4628_0_comp_ff, 0x00000002, 17960 }, /* NOT */ +{ op_4630_0_comp_ff, 0x00000002, 17968 }, /* NOT */ +{ op_4638_0_comp_ff, 0x00000002, 17976 }, /* NOT */ +{ op_4639_0_comp_ff, 0x00000002, 17977 }, /* NOT */ +{ op_4640_0_comp_ff, 0x00000000, 17984 }, /* NOT */ +{ op_4650_0_comp_ff, 0x00000000, 18000 }, /* NOT */ +{ op_4658_0_comp_ff, 0x00000000, 18008 }, /* NOT */ +{ op_4660_0_comp_ff, 0x00000000, 18016 }, /* NOT */ +{ op_4668_0_comp_ff, 0x00000002, 18024 }, /* NOT */ +{ op_4670_0_comp_ff, 0x00000002, 18032 }, /* NOT */ +{ op_4678_0_comp_ff, 0x00000002, 18040 }, /* NOT */ +{ op_4679_0_comp_ff, 0x00000002, 18041 }, /* NOT */ +{ op_4680_0_comp_ff, 0x00000000, 18048 }, /* NOT */ +{ op_4690_0_comp_ff, 0x00000000, 18064 }, /* NOT */ +{ op_4698_0_comp_ff, 0x00000000, 18072 }, /* NOT */ +{ op_46a0_0_comp_ff, 0x00000000, 18080 }, /* NOT */ +{ op_46a8_0_comp_ff, 0x00000002, 18088 }, /* NOT */ +{ op_46b0_0_comp_ff, 0x00000002, 18096 }, /* NOT */ +{ op_46b8_0_comp_ff, 0x00000002, 18104 }, /* NOT */ +{ op_46b9_0_comp_ff, 0x00000002, 18105 }, /* NOT */ +{ NULL, 0x00000001, 18112 }, /* MV2SR */ +{ NULL, 0x00000001, 18128 }, /* MV2SR */ +{ NULL, 0x00000001, 18136 }, /* MV2SR */ +{ NULL, 0x00000001, 18144 }, /* MV2SR */ +{ NULL, 0x00000001, 18152 }, /* MV2SR */ +{ NULL, 0x00000001, 18160 }, /* MV2SR */ +{ NULL, 0x00000001, 18168 }, /* MV2SR */ +{ NULL, 0x00000001, 18169 }, /* MV2SR */ +{ NULL, 0x00000001, 18170 }, /* MV2SR */ +{ NULL, 0x00000001, 18171 }, /* MV2SR */ +{ NULL, 0x00000001, 18172 }, /* MV2SR */ +{ NULL, 0x00000000, 18432 }, /* NBCD */ +{ op_4808_0_comp_ff, 0x00000002, 18440 }, /* LINK */ +{ NULL, 0x00000000, 18448 }, /* NBCD */ +{ NULL, 0x00000000, 18456 }, /* NBCD */ +{ NULL, 0x00000000, 18464 }, /* NBCD */ +{ NULL, 0x00000000, 18472 }, /* NBCD */ +{ NULL, 0x00000000, 18480 }, /* NBCD */ +{ NULL, 0x00000000, 18488 }, /* NBCD */ +{ NULL, 0x00000000, 18489 }, /* NBCD */ +{ op_4840_0_comp_ff, 0x00000000, 18496 }, /* SWAP */ +{ NULL, 0x00000001, 18504 }, /* BKPT */ +{ op_4850_0_comp_ff, 0x00000000, 18512 }, /* PEA */ +{ op_4868_0_comp_ff, 0x00000002, 18536 }, /* PEA */ +{ op_4870_0_comp_ff, 0x00000002, 18544 }, /* PEA */ +{ op_4878_0_comp_ff, 0x00000002, 18552 }, /* PEA */ +{ op_4879_0_comp_ff, 0x00000002, 18553 }, /* PEA */ +{ op_487a_0_comp_ff, 0x00000002, 18554 }, /* PEA */ +{ op_487b_0_comp_ff, 0x00000002, 18555 }, /* PEA */ +{ op_4880_0_comp_ff, 0x00000000, 18560 }, /* EXT */ +{ op_4890_0_comp_ff, 0x00000002, 18576 }, /* MVMLE */ +{ op_48a0_0_comp_ff, 0x00000002, 18592 }, /* MVMLE */ +{ op_48a8_0_comp_ff, 0x00000002, 18600 }, /* MVMLE */ +{ op_48b0_0_comp_ff, 0x00000002, 18608 }, /* MVMLE */ +{ op_48b8_0_comp_ff, 0x00000002, 18616 }, /* MVMLE */ +{ op_48b9_0_comp_ff, 0x00000002, 18617 }, /* MVMLE */ +{ op_48c0_0_comp_ff, 0x00000000, 18624 }, /* EXT */ +{ op_48d0_0_comp_ff, 0x00000002, 18640 }, /* MVMLE */ +{ op_48e0_0_comp_ff, 0x00000002, 18656 }, /* MVMLE */ +{ op_48e8_0_comp_ff, 0x00000002, 18664 }, /* MVMLE */ +{ op_48f0_0_comp_ff, 0x00000002, 18672 }, /* MVMLE */ +{ op_48f8_0_comp_ff, 0x00000002, 18680 }, /* MVMLE */ +{ op_48f9_0_comp_ff, 0x00000002, 18681 }, /* MVMLE */ +{ op_49c0_0_comp_ff, 0x00000000, 18880 }, /* EXT */ +{ op_4a00_0_comp_ff, 0x00000000, 18944 }, /* TST */ +{ op_4a10_0_comp_ff, 0x00000000, 18960 }, /* TST */ +{ op_4a18_0_comp_ff, 0x00000000, 18968 }, /* TST */ +{ op_4a20_0_comp_ff, 0x00000000, 18976 }, /* TST */ +{ op_4a28_0_comp_ff, 0x00000002, 18984 }, /* TST */ +{ op_4a30_0_comp_ff, 0x00000002, 18992 }, /* TST */ +{ op_4a38_0_comp_ff, 0x00000002, 19000 }, /* TST */ +{ op_4a39_0_comp_ff, 0x00000002, 19001 }, /* TST */ +{ op_4a3a_0_comp_ff, 0x00000002, 19002 }, /* TST */ +{ op_4a3b_0_comp_ff, 0x00000002, 19003 }, /* TST */ +{ op_4a3c_0_comp_ff, 0x00000002, 19004 }, /* TST */ +{ op_4a40_0_comp_ff, 0x00000000, 19008 }, /* TST */ +{ op_4a48_0_comp_ff, 0x00000000, 19016 }, /* TST */ +{ op_4a50_0_comp_ff, 0x00000000, 19024 }, /* TST */ +{ op_4a58_0_comp_ff, 0x00000000, 19032 }, /* TST */ +{ op_4a60_0_comp_ff, 0x00000000, 19040 }, /* TST */ +{ op_4a68_0_comp_ff, 0x00000002, 19048 }, /* TST */ +{ op_4a70_0_comp_ff, 0x00000002, 19056 }, /* TST */ +{ op_4a78_0_comp_ff, 0x00000002, 19064 }, /* TST */ +{ op_4a79_0_comp_ff, 0x00000002, 19065 }, /* TST */ +{ op_4a7a_0_comp_ff, 0x00000002, 19066 }, /* TST */ +{ op_4a7b_0_comp_ff, 0x00000002, 19067 }, /* TST */ +{ op_4a7c_0_comp_ff, 0x00000002, 19068 }, /* TST */ +{ op_4a80_0_comp_ff, 0x00000000, 19072 }, /* TST */ +{ op_4a88_0_comp_ff, 0x00000000, 19080 }, /* TST */ +{ op_4a90_0_comp_ff, 0x00000000, 19088 }, /* TST */ +{ op_4a98_0_comp_ff, 0x00000000, 19096 }, /* TST */ +{ op_4aa0_0_comp_ff, 0x00000000, 19104 }, /* TST */ +{ op_4aa8_0_comp_ff, 0x00000002, 19112 }, /* TST */ +{ op_4ab0_0_comp_ff, 0x00000002, 19120 }, /* TST */ +{ op_4ab8_0_comp_ff, 0x00000002, 19128 }, /* TST */ +{ op_4ab9_0_comp_ff, 0x00000002, 19129 }, /* TST */ +{ op_4aba_0_comp_ff, 0x00000002, 19130 }, /* TST */ +{ op_4abb_0_comp_ff, 0x00000002, 19131 }, /* TST */ +{ op_4abc_0_comp_ff, 0x00000002, 19132 }, /* TST */ +{ NULL, 0x00000000, 19136 }, /* TAS */ +{ NULL, 0x00000000, 19152 }, /* TAS */ +{ NULL, 0x00000000, 19160 }, /* TAS */ +{ NULL, 0x00000000, 19168 }, /* TAS */ +{ NULL, 0x00000000, 19176 }, /* TAS */ +{ NULL, 0x00000000, 19184 }, /* TAS */ +{ NULL, 0x00000000, 19192 }, /* TAS */ +{ NULL, 0x00000000, 19193 }, /* TAS */ +{ op_4c00_0_comp_ff, 0x00000002, 19456 }, /* MULL */ +{ op_4c10_0_comp_ff, 0x00000002, 19472 }, /* MULL */ +{ op_4c18_0_comp_ff, 0x00000002, 19480 }, /* MULL */ +{ op_4c20_0_comp_ff, 0x00000002, 19488 }, /* MULL */ +{ op_4c28_0_comp_ff, 0x00000002, 19496 }, /* MULL */ +{ op_4c30_0_comp_ff, 0x00000002, 19504 }, /* MULL */ +{ op_4c38_0_comp_ff, 0x00000002, 19512 }, /* MULL */ +{ op_4c39_0_comp_ff, 0x00000002, 19513 }, /* MULL */ +{ op_4c3a_0_comp_ff, 0x00000002, 19514 }, /* MULL */ +{ op_4c3b_0_comp_ff, 0x00000002, 19515 }, /* MULL */ +{ op_4c3c_0_comp_ff, 0x00000002, 19516 }, /* MULL */ +{ op_4c40_0_comp_ff, 0x00000002, 19520 }, /* DIVL */ +{ op_4c50_0_comp_ff, 0x00000002, 19536 }, /* DIVL */ +{ op_4c58_0_comp_ff, 0x00000002, 19544 }, /* DIVL */ +{ op_4c60_0_comp_ff, 0x00000002, 19552 }, /* DIVL */ +{ op_4c68_0_comp_ff, 0x00000002, 19560 }, /* DIVL */ +{ op_4c70_0_comp_ff, 0x00000002, 19568 }, /* DIVL */ +{ op_4c78_0_comp_ff, 0x00000002, 19576 }, /* DIVL */ +{ op_4c79_0_comp_ff, 0x00000002, 19577 }, /* DIVL */ +{ op_4c7a_0_comp_ff, 0x00000002, 19578 }, /* DIVL */ +{ op_4c7b_0_comp_ff, 0x00000002, 19579 }, /* DIVL */ +{ op_4c7c_0_comp_ff, 0x00000002, 19580 }, /* DIVL */ +{ op_4c90_0_comp_ff, 0x00000002, 19600 }, /* MVMEL */ +{ op_4c98_0_comp_ff, 0x00000002, 19608 }, /* MVMEL */ +{ op_4ca8_0_comp_ff, 0x00000002, 19624 }, /* MVMEL */ +{ op_4cb0_0_comp_ff, 0x00000002, 19632 }, /* MVMEL */ +{ op_4cb8_0_comp_ff, 0x00000002, 19640 }, /* MVMEL */ +{ op_4cb9_0_comp_ff, 0x00000002, 19641 }, /* MVMEL */ +{ op_4cba_0_comp_ff, 0x00000002, 19642 }, /* MVMEL */ +{ op_4cbb_0_comp_ff, 0x00000002, 19643 }, /* MVMEL */ +{ op_4cd0_0_comp_ff, 0x00000002, 19664 }, /* MVMEL */ +{ op_4cd8_0_comp_ff, 0x00000002, 19672 }, /* MVMEL */ +{ op_4ce8_0_comp_ff, 0x00000002, 19688 }, /* MVMEL */ +{ op_4cf0_0_comp_ff, 0x00000002, 19696 }, /* MVMEL */ +{ op_4cf8_0_comp_ff, 0x00000002, 19704 }, /* MVMEL */ +{ op_4cf9_0_comp_ff, 0x00000002, 19705 }, /* MVMEL */ +{ op_4cfa_0_comp_ff, 0x00000002, 19706 }, /* MVMEL */ +{ op_4cfb_0_comp_ff, 0x00000002, 19707 }, /* MVMEL */ +{ NULL, 0x00000001, 20032 }, /* TRAP */ +{ op_4e50_0_comp_ff, 0x00000002, 20048 }, /* LINK */ +{ op_4e58_0_comp_ff, 0x00000000, 20056 }, /* UNLK */ +{ NULL, 0x00000001, 20064 }, /* MVR2USP */ +{ NULL, 0x00000001, 20072 }, /* MVUSP2R */ +{ NULL, 0x00000001, 20080 }, /* RESET */ +{ op_4e71_0_comp_ff, 0x00000000, 20081 }, /* NOP */ +{ NULL, 0x00000001, 20082 }, /* STOP */ +{ NULL, 0x00000001, 20083 }, /* RTE */ +{ op_4e74_0_comp_ff, 0x00000003, 20084 }, /* RTD */ +{ op_4e75_0_comp_ff, 0x00000001, 20085 }, /* RTS */ +{ NULL, 0x00000001, 20086 }, /* TRAPV */ +{ NULL, 0x00000001, 20087 }, /* RTR */ +{ NULL, 0x00000001, 20090 }, /* MOVEC2 */ +{ NULL, 0x00000001, 20091 }, /* MOVE2C */ +{ op_4e90_0_comp_ff, 0x00000001, 20112 }, /* JSR */ +{ op_4ea8_0_comp_ff, 0x00000003, 20136 }, /* JSR */ +{ op_4eb0_0_comp_ff, 0x00000003, 20144 }, /* JSR */ +{ op_4eb8_0_comp_ff, 0x00000003, 20152 }, /* JSR */ +{ op_4eb9_0_comp_ff, 0x00000003, 20153 }, /* JSR */ +{ op_4eba_0_comp_ff, 0x00000003, 20154 }, /* JSR */ +{ op_4ebb_0_comp_ff, 0x00000003, 20155 }, /* JSR */ +{ op_4ed0_0_comp_ff, 0x00000001, 20176 }, /* JMP */ +{ op_4ee8_0_comp_ff, 0x00000003, 20200 }, /* JMP */ +{ op_4ef0_0_comp_ff, 0x00000003, 20208 }, /* JMP */ +{ op_4ef8_0_comp_ff, 0x00000003, 20216 }, /* JMP */ +{ op_4ef9_0_comp_ff, 0x00000003, 20217 }, /* JMP */ +{ op_4efa_0_comp_ff, 0x00000003, 20218 }, /* JMP */ +{ op_4efb_0_comp_ff, 0x00000003, 20219 }, /* JMP */ +{ op_5000_0_comp_ff, 0x00000000, 20480 }, /* ADD */ +{ op_5010_0_comp_ff, 0x00000000, 20496 }, /* ADD */ +{ op_5018_0_comp_ff, 0x00000000, 20504 }, /* ADD */ +{ op_5020_0_comp_ff, 0x00000000, 20512 }, /* ADD */ +{ op_5028_0_comp_ff, 0x00000002, 20520 }, /* ADD */ +{ op_5030_0_comp_ff, 0x00000002, 20528 }, /* ADD */ +{ op_5038_0_comp_ff, 0x00000002, 20536 }, /* ADD */ +{ op_5039_0_comp_ff, 0x00000002, 20537 }, /* ADD */ +{ op_5040_0_comp_ff, 0x00000000, 20544 }, /* ADD */ +{ op_5048_0_comp_ff, 0x00000000, 20552 }, /* ADDA */ +{ op_5050_0_comp_ff, 0x00000000, 20560 }, /* ADD */ +{ op_5058_0_comp_ff, 0x00000000, 20568 }, /* ADD */ +{ op_5060_0_comp_ff, 0x00000000, 20576 }, /* ADD */ +{ op_5068_0_comp_ff, 0x00000002, 20584 }, /* ADD */ +{ op_5070_0_comp_ff, 0x00000002, 20592 }, /* ADD */ +{ op_5078_0_comp_ff, 0x00000002, 20600 }, /* ADD */ +{ op_5079_0_comp_ff, 0x00000002, 20601 }, /* ADD */ +{ op_5080_0_comp_ff, 0x00000000, 20608 }, /* ADD */ +{ op_5088_0_comp_ff, 0x00000000, 20616 }, /* ADDA */ +{ op_5090_0_comp_ff, 0x00000000, 20624 }, /* ADD */ +{ op_5098_0_comp_ff, 0x00000000, 20632 }, /* ADD */ +{ op_50a0_0_comp_ff, 0x00000000, 20640 }, /* ADD */ +{ op_50a8_0_comp_ff, 0x00000002, 20648 }, /* ADD */ +{ op_50b0_0_comp_ff, 0x00000002, 20656 }, /* ADD */ +{ op_50b8_0_comp_ff, 0x00000002, 20664 }, /* ADD */ +{ op_50b9_0_comp_ff, 0x00000002, 20665 }, /* ADD */ +{ op_50c0_0_comp_ff, 0x00000000, 20672 }, /* Scc */ +{ op_50c8_0_comp_ff, 0x00000003, 20680 }, /* DBcc */ +{ op_50d0_0_comp_ff, 0x00000000, 20688 }, /* Scc */ +{ op_50d8_0_comp_ff, 0x00000000, 20696 }, /* Scc */ +{ op_50e0_0_comp_ff, 0x00000000, 20704 }, /* Scc */ +{ op_50e8_0_comp_ff, 0x00000002, 20712 }, /* Scc */ +{ op_50f0_0_comp_ff, 0x00000002, 20720 }, /* Scc */ +{ op_50f8_0_comp_ff, 0x00000002, 20728 }, /* Scc */ +{ op_50f9_0_comp_ff, 0x00000002, 20729 }, /* Scc */ +{ NULL, 0x00000001, 20730 }, /* TRAPcc */ +{ NULL, 0x00000001, 20731 }, /* TRAPcc */ +{ NULL, 0x00000001, 20732 }, /* TRAPcc */ +{ op_5100_0_comp_ff, 0x00000000, 20736 }, /* SUB */ +{ op_5110_0_comp_ff, 0x00000000, 20752 }, /* SUB */ +{ op_5118_0_comp_ff, 0x00000000, 20760 }, /* SUB */ +{ op_5120_0_comp_ff, 0x00000000, 20768 }, /* SUB */ +{ op_5128_0_comp_ff, 0x00000002, 20776 }, /* SUB */ +{ op_5130_0_comp_ff, 0x00000002, 20784 }, /* SUB */ +{ op_5138_0_comp_ff, 0x00000002, 20792 }, /* SUB */ +{ op_5139_0_comp_ff, 0x00000002, 20793 }, /* SUB */ +{ op_5140_0_comp_ff, 0x00000000, 20800 }, /* SUB */ +{ op_5148_0_comp_ff, 0x00000000, 20808 }, /* SUBA */ +{ op_5150_0_comp_ff, 0x00000000, 20816 }, /* SUB */ +{ op_5158_0_comp_ff, 0x00000000, 20824 }, /* SUB */ +{ op_5160_0_comp_ff, 0x00000000, 20832 }, /* SUB */ +{ op_5168_0_comp_ff, 0x00000002, 20840 }, /* SUB */ +{ op_5170_0_comp_ff, 0x00000002, 20848 }, /* SUB */ +{ op_5178_0_comp_ff, 0x00000002, 20856 }, /* SUB */ +{ op_5179_0_comp_ff, 0x00000002, 20857 }, /* SUB */ +{ op_5180_0_comp_ff, 0x00000000, 20864 }, /* SUB */ +{ op_5188_0_comp_ff, 0x00000000, 20872 }, /* SUBA */ +{ op_5190_0_comp_ff, 0x00000000, 20880 }, /* SUB */ +{ op_5198_0_comp_ff, 0x00000000, 20888 }, /* SUB */ +{ op_51a0_0_comp_ff, 0x00000000, 20896 }, /* SUB */ +{ op_51a8_0_comp_ff, 0x00000002, 20904 }, /* SUB */ +{ op_51b0_0_comp_ff, 0x00000002, 20912 }, /* SUB */ +{ op_51b8_0_comp_ff, 0x00000002, 20920 }, /* SUB */ +{ op_51b9_0_comp_ff, 0x00000002, 20921 }, /* SUB */ +{ op_51c0_0_comp_ff, 0x00000000, 20928 }, /* Scc */ +{ op_51c8_0_comp_ff, 0x00000003, 20936 }, /* DBcc */ +{ op_51d0_0_comp_ff, 0x00000000, 20944 }, /* Scc */ +{ op_51d8_0_comp_ff, 0x00000000, 20952 }, /* Scc */ +{ op_51e0_0_comp_ff, 0x00000000, 20960 }, /* Scc */ +{ op_51e8_0_comp_ff, 0x00000002, 20968 }, /* Scc */ +{ op_51f0_0_comp_ff, 0x00000002, 20976 }, /* Scc */ +{ op_51f8_0_comp_ff, 0x00000002, 20984 }, /* Scc */ +{ op_51f9_0_comp_ff, 0x00000002, 20985 }, /* Scc */ +{ NULL, 0x00000001, 20986 }, /* TRAPcc */ +{ NULL, 0x00000001, 20987 }, /* TRAPcc */ +{ NULL, 0x00000001, 20988 }, /* TRAPcc */ +{ op_52c0_0_comp_ff, 0x00000000, 21184 }, /* Scc */ +{ op_52c8_0_comp_ff, 0x00000003, 21192 }, /* DBcc */ +{ op_52d0_0_comp_ff, 0x00000000, 21200 }, /* Scc */ +{ op_52d8_0_comp_ff, 0x00000000, 21208 }, /* Scc */ +{ op_52e0_0_comp_ff, 0x00000000, 21216 }, /* Scc */ +{ op_52e8_0_comp_ff, 0x00000002, 21224 }, /* Scc */ +{ op_52f0_0_comp_ff, 0x00000002, 21232 }, /* Scc */ +{ op_52f8_0_comp_ff, 0x00000002, 21240 }, /* Scc */ +{ op_52f9_0_comp_ff, 0x00000002, 21241 }, /* Scc */ +{ NULL, 0x00000001, 21242 }, /* TRAPcc */ +{ NULL, 0x00000001, 21243 }, /* TRAPcc */ +{ NULL, 0x00000001, 21244 }, /* TRAPcc */ +{ op_53c0_0_comp_ff, 0x00000000, 21440 }, /* Scc */ +{ op_53c8_0_comp_ff, 0x00000003, 21448 }, /* DBcc */ +{ op_53d0_0_comp_ff, 0x00000000, 21456 }, /* Scc */ +{ op_53d8_0_comp_ff, 0x00000000, 21464 }, /* Scc */ +{ op_53e0_0_comp_ff, 0x00000000, 21472 }, /* Scc */ +{ op_53e8_0_comp_ff, 0x00000002, 21480 }, /* Scc */ +{ op_53f0_0_comp_ff, 0x00000002, 21488 }, /* Scc */ +{ op_53f8_0_comp_ff, 0x00000002, 21496 }, /* Scc */ +{ op_53f9_0_comp_ff, 0x00000002, 21497 }, /* Scc */ +{ NULL, 0x00000001, 21498 }, /* TRAPcc */ +{ NULL, 0x00000001, 21499 }, /* TRAPcc */ +{ NULL, 0x00000001, 21500 }, /* TRAPcc */ +{ op_54c0_0_comp_ff, 0x00000000, 21696 }, /* Scc */ +{ op_54c8_0_comp_ff, 0x00000003, 21704 }, /* DBcc */ +{ op_54d0_0_comp_ff, 0x00000000, 21712 }, /* Scc */ +{ op_54d8_0_comp_ff, 0x00000000, 21720 }, /* Scc */ +{ op_54e0_0_comp_ff, 0x00000000, 21728 }, /* Scc */ +{ op_54e8_0_comp_ff, 0x00000002, 21736 }, /* Scc */ +{ op_54f0_0_comp_ff, 0x00000002, 21744 }, /* Scc */ +{ op_54f8_0_comp_ff, 0x00000002, 21752 }, /* Scc */ +{ op_54f9_0_comp_ff, 0x00000002, 21753 }, /* Scc */ +{ NULL, 0x00000001, 21754 }, /* TRAPcc */ +{ NULL, 0x00000001, 21755 }, /* TRAPcc */ +{ NULL, 0x00000001, 21756 }, /* TRAPcc */ +{ op_55c0_0_comp_ff, 0x00000000, 21952 }, /* Scc */ +{ op_55c8_0_comp_ff, 0x00000003, 21960 }, /* DBcc */ +{ op_55d0_0_comp_ff, 0x00000000, 21968 }, /* Scc */ +{ op_55d8_0_comp_ff, 0x00000000, 21976 }, /* Scc */ +{ op_55e0_0_comp_ff, 0x00000000, 21984 }, /* Scc */ +{ op_55e8_0_comp_ff, 0x00000002, 21992 }, /* Scc */ +{ op_55f0_0_comp_ff, 0x00000002, 22000 }, /* Scc */ +{ op_55f8_0_comp_ff, 0x00000002, 22008 }, /* Scc */ +{ op_55f9_0_comp_ff, 0x00000002, 22009 }, /* Scc */ +{ NULL, 0x00000001, 22010 }, /* TRAPcc */ +{ NULL, 0x00000001, 22011 }, /* TRAPcc */ +{ NULL, 0x00000001, 22012 }, /* TRAPcc */ +{ op_56c0_0_comp_ff, 0x00000000, 22208 }, /* Scc */ +{ op_56c8_0_comp_ff, 0x00000003, 22216 }, /* DBcc */ +{ op_56d0_0_comp_ff, 0x00000000, 22224 }, /* Scc */ +{ op_56d8_0_comp_ff, 0x00000000, 22232 }, /* Scc */ +{ op_56e0_0_comp_ff, 0x00000000, 22240 }, /* Scc */ +{ op_56e8_0_comp_ff, 0x00000002, 22248 }, /* Scc */ +{ op_56f0_0_comp_ff, 0x00000002, 22256 }, /* Scc */ +{ op_56f8_0_comp_ff, 0x00000002, 22264 }, /* Scc */ +{ op_56f9_0_comp_ff, 0x00000002, 22265 }, /* Scc */ +{ NULL, 0x00000001, 22266 }, /* TRAPcc */ +{ NULL, 0x00000001, 22267 }, /* TRAPcc */ +{ NULL, 0x00000001, 22268 }, /* TRAPcc */ +{ op_57c0_0_comp_ff, 0x00000000, 22464 }, /* Scc */ +{ op_57c8_0_comp_ff, 0x00000003, 22472 }, /* DBcc */ +{ op_57d0_0_comp_ff, 0x00000000, 22480 }, /* Scc */ +{ op_57d8_0_comp_ff, 0x00000000, 22488 }, /* Scc */ +{ op_57e0_0_comp_ff, 0x00000000, 22496 }, /* Scc */ +{ op_57e8_0_comp_ff, 0x00000002, 22504 }, /* Scc */ +{ op_57f0_0_comp_ff, 0x00000002, 22512 }, /* Scc */ +{ op_57f8_0_comp_ff, 0x00000002, 22520 }, /* Scc */ +{ op_57f9_0_comp_ff, 0x00000002, 22521 }, /* Scc */ +{ NULL, 0x00000001, 22522 }, /* TRAPcc */ +{ NULL, 0x00000001, 22523 }, /* TRAPcc */ +{ NULL, 0x00000001, 22524 }, /* TRAPcc */ +{ op_58c0_0_comp_ff, 0x00000000, 22720 }, /* Scc */ +{ op_58c8_0_comp_ff, 0x00000003, 22728 }, /* DBcc */ +{ op_58d0_0_comp_ff, 0x00000000, 22736 }, /* Scc */ +{ op_58d8_0_comp_ff, 0x00000000, 22744 }, /* Scc */ +{ op_58e0_0_comp_ff, 0x00000000, 22752 }, /* Scc */ +{ op_58e8_0_comp_ff, 0x00000002, 22760 }, /* Scc */ +{ op_58f0_0_comp_ff, 0x00000002, 22768 }, /* Scc */ +{ op_58f8_0_comp_ff, 0x00000002, 22776 }, /* Scc */ +{ op_58f9_0_comp_ff, 0x00000002, 22777 }, /* Scc */ +{ NULL, 0x00000001, 22778 }, /* TRAPcc */ +{ NULL, 0x00000001, 22779 }, /* TRAPcc */ +{ NULL, 0x00000001, 22780 }, /* TRAPcc */ +{ op_59c0_0_comp_ff, 0x00000000, 22976 }, /* Scc */ +{ op_59c8_0_comp_ff, 0x00000003, 22984 }, /* DBcc */ +{ op_59d0_0_comp_ff, 0x00000000, 22992 }, /* Scc */ +{ op_59d8_0_comp_ff, 0x00000000, 23000 }, /* Scc */ +{ op_59e0_0_comp_ff, 0x00000000, 23008 }, /* Scc */ +{ op_59e8_0_comp_ff, 0x00000002, 23016 }, /* Scc */ +{ op_59f0_0_comp_ff, 0x00000002, 23024 }, /* Scc */ +{ op_59f8_0_comp_ff, 0x00000002, 23032 }, /* Scc */ +{ op_59f9_0_comp_ff, 0x00000002, 23033 }, /* Scc */ +{ NULL, 0x00000001, 23034 }, /* TRAPcc */ +{ NULL, 0x00000001, 23035 }, /* TRAPcc */ +{ NULL, 0x00000001, 23036 }, /* TRAPcc */ +{ op_5ac0_0_comp_ff, 0x00000000, 23232 }, /* Scc */ +{ op_5ac8_0_comp_ff, 0x00000003, 23240 }, /* DBcc */ +{ op_5ad0_0_comp_ff, 0x00000000, 23248 }, /* Scc */ +{ op_5ad8_0_comp_ff, 0x00000000, 23256 }, /* Scc */ +{ op_5ae0_0_comp_ff, 0x00000000, 23264 }, /* Scc */ +{ op_5ae8_0_comp_ff, 0x00000002, 23272 }, /* Scc */ +{ op_5af0_0_comp_ff, 0x00000002, 23280 }, /* Scc */ +{ op_5af8_0_comp_ff, 0x00000002, 23288 }, /* Scc */ +{ op_5af9_0_comp_ff, 0x00000002, 23289 }, /* Scc */ +{ NULL, 0x00000001, 23290 }, /* TRAPcc */ +{ NULL, 0x00000001, 23291 }, /* TRAPcc */ +{ NULL, 0x00000001, 23292 }, /* TRAPcc */ +{ op_5bc0_0_comp_ff, 0x00000000, 23488 }, /* Scc */ +{ op_5bc8_0_comp_ff, 0x00000003, 23496 }, /* DBcc */ +{ op_5bd0_0_comp_ff, 0x00000000, 23504 }, /* Scc */ +{ op_5bd8_0_comp_ff, 0x00000000, 23512 }, /* Scc */ +{ op_5be0_0_comp_ff, 0x00000000, 23520 }, /* Scc */ +{ op_5be8_0_comp_ff, 0x00000002, 23528 }, /* Scc */ +{ op_5bf0_0_comp_ff, 0x00000002, 23536 }, /* Scc */ +{ op_5bf8_0_comp_ff, 0x00000002, 23544 }, /* Scc */ +{ op_5bf9_0_comp_ff, 0x00000002, 23545 }, /* Scc */ +{ NULL, 0x00000001, 23546 }, /* TRAPcc */ +{ NULL, 0x00000001, 23547 }, /* TRAPcc */ +{ NULL, 0x00000001, 23548 }, /* TRAPcc */ +{ op_5cc0_0_comp_ff, 0x00000000, 23744 }, /* Scc */ +{ op_5cc8_0_comp_ff, 0x00000003, 23752 }, /* DBcc */ +{ op_5cd0_0_comp_ff, 0x00000000, 23760 }, /* Scc */ +{ op_5cd8_0_comp_ff, 0x00000000, 23768 }, /* Scc */ +{ op_5ce0_0_comp_ff, 0x00000000, 23776 }, /* Scc */ +{ op_5ce8_0_comp_ff, 0x00000002, 23784 }, /* Scc */ +{ op_5cf0_0_comp_ff, 0x00000002, 23792 }, /* Scc */ +{ op_5cf8_0_comp_ff, 0x00000002, 23800 }, /* Scc */ +{ op_5cf9_0_comp_ff, 0x00000002, 23801 }, /* Scc */ +{ NULL, 0x00000001, 23802 }, /* TRAPcc */ +{ NULL, 0x00000001, 23803 }, /* TRAPcc */ +{ NULL, 0x00000001, 23804 }, /* TRAPcc */ +{ op_5dc0_0_comp_ff, 0x00000000, 24000 }, /* Scc */ +{ op_5dc8_0_comp_ff, 0x00000003, 24008 }, /* DBcc */ +{ op_5dd0_0_comp_ff, 0x00000000, 24016 }, /* Scc */ +{ op_5dd8_0_comp_ff, 0x00000000, 24024 }, /* Scc */ +{ op_5de0_0_comp_ff, 0x00000000, 24032 }, /* Scc */ +{ op_5de8_0_comp_ff, 0x00000002, 24040 }, /* Scc */ +{ op_5df0_0_comp_ff, 0x00000002, 24048 }, /* Scc */ +{ op_5df8_0_comp_ff, 0x00000002, 24056 }, /* Scc */ +{ op_5df9_0_comp_ff, 0x00000002, 24057 }, /* Scc */ +{ NULL, 0x00000001, 24058 }, /* TRAPcc */ +{ NULL, 0x00000001, 24059 }, /* TRAPcc */ +{ NULL, 0x00000001, 24060 }, /* TRAPcc */ +{ op_5ec0_0_comp_ff, 0x00000000, 24256 }, /* Scc */ +{ op_5ec8_0_comp_ff, 0x00000003, 24264 }, /* DBcc */ +{ op_5ed0_0_comp_ff, 0x00000000, 24272 }, /* Scc */ +{ op_5ed8_0_comp_ff, 0x00000000, 24280 }, /* Scc */ +{ op_5ee0_0_comp_ff, 0x00000000, 24288 }, /* Scc */ +{ op_5ee8_0_comp_ff, 0x00000002, 24296 }, /* Scc */ +{ op_5ef0_0_comp_ff, 0x00000002, 24304 }, /* Scc */ +{ op_5ef8_0_comp_ff, 0x00000002, 24312 }, /* Scc */ +{ op_5ef9_0_comp_ff, 0x00000002, 24313 }, /* Scc */ +{ NULL, 0x00000001, 24314 }, /* TRAPcc */ +{ NULL, 0x00000001, 24315 }, /* TRAPcc */ +{ NULL, 0x00000001, 24316 }, /* TRAPcc */ +{ op_5fc0_0_comp_ff, 0x00000000, 24512 }, /* Scc */ +{ op_5fc8_0_comp_ff, 0x00000003, 24520 }, /* DBcc */ +{ op_5fd0_0_comp_ff, 0x00000000, 24528 }, /* Scc */ +{ op_5fd8_0_comp_ff, 0x00000000, 24536 }, /* Scc */ +{ op_5fe0_0_comp_ff, 0x00000000, 24544 }, /* Scc */ +{ op_5fe8_0_comp_ff, 0x00000002, 24552 }, /* Scc */ +{ op_5ff0_0_comp_ff, 0x00000002, 24560 }, /* Scc */ +{ op_5ff8_0_comp_ff, 0x00000002, 24568 }, /* Scc */ +{ op_5ff9_0_comp_ff, 0x00000002, 24569 }, /* Scc */ +{ NULL, 0x00000001, 24570 }, /* TRAPcc */ +{ NULL, 0x00000001, 24571 }, /* TRAPcc */ +{ NULL, 0x00000001, 24572 }, /* TRAPcc */ +{ op_6000_0_comp_ff, 0x00000012, 24576 }, /* Bcc */ +{ op_6001_0_comp_ff, 0x00000010, 24577 }, /* Bcc */ +{ op_60ff_0_comp_ff, 0x00000012, 24831 }, /* Bcc */ +{ op_6100_0_comp_ff, 0x00000012, 24832 }, /* BSR */ +{ op_6101_0_comp_ff, 0x00000010, 24833 }, /* BSR */ +{ op_61ff_0_comp_ff, 0x00000012, 25087 }, /* BSR */ +{ op_6200_0_comp_ff, 0x00000003, 25088 }, /* Bcc */ +{ op_6201_0_comp_ff, 0x00000001, 25089 }, /* Bcc */ +{ op_62ff_0_comp_ff, 0x00000003, 25343 }, /* Bcc */ +{ op_6300_0_comp_ff, 0x00000003, 25344 }, /* Bcc */ +{ op_6301_0_comp_ff, 0x00000001, 25345 }, /* Bcc */ +{ op_63ff_0_comp_ff, 0x00000003, 25599 }, /* Bcc */ +{ op_6400_0_comp_ff, 0x00000003, 25600 }, /* Bcc */ +{ op_6401_0_comp_ff, 0x00000001, 25601 }, /* Bcc */ +{ op_64ff_0_comp_ff, 0x00000003, 25855 }, /* Bcc */ +{ op_6500_0_comp_ff, 0x00000003, 25856 }, /* Bcc */ +{ op_6501_0_comp_ff, 0x00000001, 25857 }, /* Bcc */ +{ op_65ff_0_comp_ff, 0x00000003, 26111 }, /* Bcc */ +{ op_6600_0_comp_ff, 0x00000003, 26112 }, /* Bcc */ +{ op_6601_0_comp_ff, 0x00000001, 26113 }, /* Bcc */ +{ op_66ff_0_comp_ff, 0x00000003, 26367 }, /* Bcc */ +{ op_6700_0_comp_ff, 0x00000003, 26368 }, /* Bcc */ +{ op_6701_0_comp_ff, 0x00000001, 26369 }, /* Bcc */ +{ op_67ff_0_comp_ff, 0x00000003, 26623 }, /* Bcc */ +{ op_6800_0_comp_ff, 0x00000003, 26624 }, /* Bcc */ +{ op_6801_0_comp_ff, 0x00000001, 26625 }, /* Bcc */ +{ op_68ff_0_comp_ff, 0x00000003, 26879 }, /* Bcc */ +{ op_6900_0_comp_ff, 0x00000003, 26880 }, /* Bcc */ +{ op_6901_0_comp_ff, 0x00000001, 26881 }, /* Bcc */ +{ op_69ff_0_comp_ff, 0x00000003, 27135 }, /* Bcc */ +{ op_6a00_0_comp_ff, 0x00000003, 27136 }, /* Bcc */ +{ op_6a01_0_comp_ff, 0x00000001, 27137 }, /* Bcc */ +{ op_6aff_0_comp_ff, 0x00000003, 27391 }, /* Bcc */ +{ op_6b00_0_comp_ff, 0x00000003, 27392 }, /* Bcc */ +{ op_6b01_0_comp_ff, 0x00000001, 27393 }, /* Bcc */ +{ op_6bff_0_comp_ff, 0x00000003, 27647 }, /* Bcc */ +{ op_6c00_0_comp_ff, 0x00000003, 27648 }, /* Bcc */ +{ op_6c01_0_comp_ff, 0x00000001, 27649 }, /* Bcc */ +{ op_6cff_0_comp_ff, 0x00000003, 27903 }, /* Bcc */ +{ op_6d00_0_comp_ff, 0x00000003, 27904 }, /* Bcc */ +{ op_6d01_0_comp_ff, 0x00000001, 27905 }, /* Bcc */ +{ op_6dff_0_comp_ff, 0x00000003, 28159 }, /* Bcc */ +{ op_6e00_0_comp_ff, 0x00000003, 28160 }, /* Bcc */ +{ op_6e01_0_comp_ff, 0x00000001, 28161 }, /* Bcc */ +{ op_6eff_0_comp_ff, 0x00000003, 28415 }, /* Bcc */ +{ op_6f00_0_comp_ff, 0x00000003, 28416 }, /* Bcc */ +{ op_6f01_0_comp_ff, 0x00000001, 28417 }, /* Bcc */ +{ op_6fff_0_comp_ff, 0x00000003, 28671 }, /* Bcc */ +{ op_7000_0_comp_ff, 0x00000000, 28672 }, /* MOVE */ +{ op_8000_0_comp_ff, 0x00000000, 32768 }, /* OR */ +{ op_8010_0_comp_ff, 0x00000000, 32784 }, /* OR */ +{ op_8018_0_comp_ff, 0x00000000, 32792 }, /* OR */ +{ op_8020_0_comp_ff, 0x00000000, 32800 }, /* OR */ +{ op_8028_0_comp_ff, 0x00000002, 32808 }, /* OR */ +{ op_8030_0_comp_ff, 0x00000002, 32816 }, /* OR */ +{ op_8038_0_comp_ff, 0x00000002, 32824 }, /* OR */ +{ op_8039_0_comp_ff, 0x00000002, 32825 }, /* OR */ +{ op_803a_0_comp_ff, 0x00000002, 32826 }, /* OR */ +{ op_803b_0_comp_ff, 0x00000002, 32827 }, /* OR */ +{ op_803c_0_comp_ff, 0x00000002, 32828 }, /* OR */ +{ op_8040_0_comp_ff, 0x00000000, 32832 }, /* OR */ +{ op_8050_0_comp_ff, 0x00000000, 32848 }, /* OR */ +{ op_8058_0_comp_ff, 0x00000000, 32856 }, /* OR */ +{ op_8060_0_comp_ff, 0x00000000, 32864 }, /* OR */ +{ op_8068_0_comp_ff, 0x00000002, 32872 }, /* OR */ +{ op_8070_0_comp_ff, 0x00000002, 32880 }, /* OR */ +{ op_8078_0_comp_ff, 0x00000002, 32888 }, /* OR */ +{ op_8079_0_comp_ff, 0x00000002, 32889 }, /* OR */ +{ op_807a_0_comp_ff, 0x00000002, 32890 }, /* OR */ +{ op_807b_0_comp_ff, 0x00000002, 32891 }, /* OR */ +{ op_807c_0_comp_ff, 0x00000002, 32892 }, /* OR */ +{ op_8080_0_comp_ff, 0x00000000, 32896 }, /* OR */ +{ op_8090_0_comp_ff, 0x00000000, 32912 }, /* OR */ +{ op_8098_0_comp_ff, 0x00000000, 32920 }, /* OR */ +{ op_80a0_0_comp_ff, 0x00000000, 32928 }, /* OR */ +{ op_80a8_0_comp_ff, 0x00000002, 32936 }, /* OR */ +{ op_80b0_0_comp_ff, 0x00000002, 32944 }, /* OR */ +{ op_80b8_0_comp_ff, 0x00000002, 32952 }, /* OR */ +{ op_80b9_0_comp_ff, 0x00000002, 32953 }, /* OR */ +{ op_80ba_0_comp_ff, 0x00000002, 32954 }, /* OR */ +{ op_80bb_0_comp_ff, 0x00000002, 32955 }, /* OR */ +{ op_80bc_0_comp_ff, 0x00000002, 32956 }, /* OR */ +{ op_80c0_0_comp_ff, 0x00000000, 32960 }, /* DIVU */ +{ op_80d0_0_comp_ff, 0x00000000, 32976 }, /* DIVU */ +{ op_80d8_0_comp_ff, 0x00000000, 32984 }, /* DIVU */ +{ op_80e0_0_comp_ff, 0x00000000, 32992 }, /* DIVU */ +{ op_80e8_0_comp_ff, 0x00000002, 33000 }, /* DIVU */ +{ op_80f0_0_comp_ff, 0x00000002, 33008 }, /* DIVU */ +{ op_80f8_0_comp_ff, 0x00000002, 33016 }, /* DIVU */ +{ op_80f9_0_comp_ff, 0x00000002, 33017 }, /* DIVU */ +{ op_80fa_0_comp_ff, 0x00000002, 33018 }, /* DIVU */ +{ op_80fb_0_comp_ff, 0x00000002, 33019 }, /* DIVU */ +{ op_80fc_0_comp_ff, 0x00000002, 33020 }, /* DIVU */ +{ NULL, 0x00000000, 33024 }, /* SBCD */ +{ NULL, 0x00000000, 33032 }, /* SBCD */ +{ op_8110_0_comp_ff, 0x00000000, 33040 }, /* OR */ +{ op_8118_0_comp_ff, 0x00000000, 33048 }, /* OR */ +{ op_8120_0_comp_ff, 0x00000000, 33056 }, /* OR */ +{ op_8128_0_comp_ff, 0x00000002, 33064 }, /* OR */ +{ op_8130_0_comp_ff, 0x00000002, 33072 }, /* OR */ +{ op_8138_0_comp_ff, 0x00000002, 33080 }, /* OR */ +{ op_8139_0_comp_ff, 0x00000002, 33081 }, /* OR */ +{ NULL, 0x00000000, 33088 }, /* PACK */ +{ NULL, 0x00000000, 33096 }, /* PACK */ +{ op_8150_0_comp_ff, 0x00000000, 33104 }, /* OR */ +{ op_8158_0_comp_ff, 0x00000000, 33112 }, /* OR */ +{ op_8160_0_comp_ff, 0x00000000, 33120 }, /* OR */ +{ op_8168_0_comp_ff, 0x00000002, 33128 }, /* OR */ +{ op_8170_0_comp_ff, 0x00000002, 33136 }, /* OR */ +{ op_8178_0_comp_ff, 0x00000002, 33144 }, /* OR */ +{ op_8179_0_comp_ff, 0x00000002, 33145 }, /* OR */ +{ NULL, 0x00000000, 33152 }, /* UNPK */ +{ NULL, 0x00000000, 33160 }, /* UNPK */ +{ op_8190_0_comp_ff, 0x00000000, 33168 }, /* OR */ +{ op_8198_0_comp_ff, 0x00000000, 33176 }, /* OR */ +{ op_81a0_0_comp_ff, 0x00000000, 33184 }, /* OR */ +{ op_81a8_0_comp_ff, 0x00000002, 33192 }, /* OR */ +{ op_81b0_0_comp_ff, 0x00000002, 33200 }, /* OR */ +{ op_81b8_0_comp_ff, 0x00000002, 33208 }, /* OR */ +{ op_81b9_0_comp_ff, 0x00000002, 33209 }, /* OR */ +{ op_81c0_0_comp_ff, 0x00000000, 33216 }, /* DIVS */ +{ op_81d0_0_comp_ff, 0x00000000, 33232 }, /* DIVS */ +{ op_81d8_0_comp_ff, 0x00000000, 33240 }, /* DIVS */ +{ op_81e0_0_comp_ff, 0x00000000, 33248 }, /* DIVS */ +{ op_81e8_0_comp_ff, 0x00000002, 33256 }, /* DIVS */ +{ op_81f0_0_comp_ff, 0x00000002, 33264 }, /* DIVS */ +{ op_81f8_0_comp_ff, 0x00000002, 33272 }, /* DIVS */ +{ op_81f9_0_comp_ff, 0x00000002, 33273 }, /* DIVS */ +{ op_81fa_0_comp_ff, 0x00000002, 33274 }, /* DIVS */ +{ op_81fb_0_comp_ff, 0x00000002, 33275 }, /* DIVS */ +{ op_81fc_0_comp_ff, 0x00000002, 33276 }, /* DIVS */ +{ op_9000_0_comp_ff, 0x00000000, 36864 }, /* SUB */ +{ op_9010_0_comp_ff, 0x00000000, 36880 }, /* SUB */ +{ op_9018_0_comp_ff, 0x00000000, 36888 }, /* SUB */ +{ op_9020_0_comp_ff, 0x00000000, 36896 }, /* SUB */ +{ op_9028_0_comp_ff, 0x00000002, 36904 }, /* SUB */ +{ op_9030_0_comp_ff, 0x00000002, 36912 }, /* SUB */ +{ op_9038_0_comp_ff, 0x00000002, 36920 }, /* SUB */ +{ op_9039_0_comp_ff, 0x00000002, 36921 }, /* SUB */ +{ op_903a_0_comp_ff, 0x00000002, 36922 }, /* SUB */ +{ op_903b_0_comp_ff, 0x00000002, 36923 }, /* SUB */ +{ op_903c_0_comp_ff, 0x00000002, 36924 }, /* SUB */ +{ op_9040_0_comp_ff, 0x00000000, 36928 }, /* SUB */ +{ op_9048_0_comp_ff, 0x00000000, 36936 }, /* SUB */ +{ op_9050_0_comp_ff, 0x00000000, 36944 }, /* SUB */ +{ op_9058_0_comp_ff, 0x00000000, 36952 }, /* SUB */ +{ op_9060_0_comp_ff, 0x00000000, 36960 }, /* SUB */ +{ op_9068_0_comp_ff, 0x00000002, 36968 }, /* SUB */ +{ op_9070_0_comp_ff, 0x00000002, 36976 }, /* SUB */ +{ op_9078_0_comp_ff, 0x00000002, 36984 }, /* SUB */ +{ op_9079_0_comp_ff, 0x00000002, 36985 }, /* SUB */ +{ op_907a_0_comp_ff, 0x00000002, 36986 }, /* SUB */ +{ op_907b_0_comp_ff, 0x00000002, 36987 }, /* SUB */ +{ op_907c_0_comp_ff, 0x00000002, 36988 }, /* SUB */ +{ op_9080_0_comp_ff, 0x00000000, 36992 }, /* SUB */ +{ op_9088_0_comp_ff, 0x00000000, 37000 }, /* SUB */ +{ op_9090_0_comp_ff, 0x00000000, 37008 }, /* SUB */ +{ op_9098_0_comp_ff, 0x00000000, 37016 }, /* SUB */ +{ op_90a0_0_comp_ff, 0x00000000, 37024 }, /* SUB */ +{ op_90a8_0_comp_ff, 0x00000002, 37032 }, /* SUB */ +{ op_90b0_0_comp_ff, 0x00000002, 37040 }, /* SUB */ +{ op_90b8_0_comp_ff, 0x00000002, 37048 }, /* SUB */ +{ op_90b9_0_comp_ff, 0x00000002, 37049 }, /* SUB */ +{ op_90ba_0_comp_ff, 0x00000002, 37050 }, /* SUB */ +{ op_90bb_0_comp_ff, 0x00000002, 37051 }, /* SUB */ +{ op_90bc_0_comp_ff, 0x00000002, 37052 }, /* SUB */ +{ op_90c0_0_comp_ff, 0x00000000, 37056 }, /* SUBA */ +{ op_90c8_0_comp_ff, 0x00000000, 37064 }, /* SUBA */ +{ op_90d0_0_comp_ff, 0x00000000, 37072 }, /* SUBA */ +{ op_90d8_0_comp_ff, 0x00000000, 37080 }, /* SUBA */ +{ op_90e0_0_comp_ff, 0x00000000, 37088 }, /* SUBA */ +{ op_90e8_0_comp_ff, 0x00000002, 37096 }, /* SUBA */ +{ op_90f0_0_comp_ff, 0x00000002, 37104 }, /* SUBA */ +{ op_90f8_0_comp_ff, 0x00000002, 37112 }, /* SUBA */ +{ op_90f9_0_comp_ff, 0x00000002, 37113 }, /* SUBA */ +{ op_90fa_0_comp_ff, 0x00000002, 37114 }, /* SUBA */ +{ op_90fb_0_comp_ff, 0x00000002, 37115 }, /* SUBA */ +{ op_90fc_0_comp_ff, 0x00000002, 37116 }, /* SUBA */ +{ op_9100_0_comp_ff, 0x00000008, 37120 }, /* SUBX */ +{ op_9108_0_comp_ff, 0x00000008, 37128 }, /* SUBX */ +{ op_9110_0_comp_ff, 0x00000000, 37136 }, /* SUB */ +{ op_9118_0_comp_ff, 0x00000000, 37144 }, /* SUB */ +{ op_9120_0_comp_ff, 0x00000000, 37152 }, /* SUB */ +{ op_9128_0_comp_ff, 0x00000002, 37160 }, /* SUB */ +{ op_9130_0_comp_ff, 0x00000002, 37168 }, /* SUB */ +{ op_9138_0_comp_ff, 0x00000002, 37176 }, /* SUB */ +{ op_9139_0_comp_ff, 0x00000002, 37177 }, /* SUB */ +{ op_9140_0_comp_ff, 0x00000008, 37184 }, /* SUBX */ +{ op_9148_0_comp_ff, 0x00000008, 37192 }, /* SUBX */ +{ op_9150_0_comp_ff, 0x00000000, 37200 }, /* SUB */ +{ op_9158_0_comp_ff, 0x00000000, 37208 }, /* SUB */ +{ op_9160_0_comp_ff, 0x00000000, 37216 }, /* SUB */ +{ op_9168_0_comp_ff, 0x00000002, 37224 }, /* SUB */ +{ op_9170_0_comp_ff, 0x00000002, 37232 }, /* SUB */ +{ op_9178_0_comp_ff, 0x00000002, 37240 }, /* SUB */ +{ op_9179_0_comp_ff, 0x00000002, 37241 }, /* SUB */ +{ op_9180_0_comp_ff, 0x00000008, 37248 }, /* SUBX */ +{ op_9188_0_comp_ff, 0x00000008, 37256 }, /* SUBX */ +{ op_9190_0_comp_ff, 0x00000000, 37264 }, /* SUB */ +{ op_9198_0_comp_ff, 0x00000000, 37272 }, /* SUB */ +{ op_91a0_0_comp_ff, 0x00000000, 37280 }, /* SUB */ +{ op_91a8_0_comp_ff, 0x00000002, 37288 }, /* SUB */ +{ op_91b0_0_comp_ff, 0x00000002, 37296 }, /* SUB */ +{ op_91b8_0_comp_ff, 0x00000002, 37304 }, /* SUB */ +{ op_91b9_0_comp_ff, 0x00000002, 37305 }, /* SUB */ +{ op_91c0_0_comp_ff, 0x00000000, 37312 }, /* SUBA */ +{ op_91c8_0_comp_ff, 0x00000000, 37320 }, /* SUBA */ +{ op_91d0_0_comp_ff, 0x00000000, 37328 }, /* SUBA */ +{ op_91d8_0_comp_ff, 0x00000000, 37336 }, /* SUBA */ +{ op_91e0_0_comp_ff, 0x00000000, 37344 }, /* SUBA */ +{ op_91e8_0_comp_ff, 0x00000002, 37352 }, /* SUBA */ +{ op_91f0_0_comp_ff, 0x00000002, 37360 }, /* SUBA */ +{ op_91f8_0_comp_ff, 0x00000002, 37368 }, /* SUBA */ +{ op_91f9_0_comp_ff, 0x00000002, 37369 }, /* SUBA */ +{ op_91fa_0_comp_ff, 0x00000002, 37370 }, /* SUBA */ +{ op_91fb_0_comp_ff, 0x00000002, 37371 }, /* SUBA */ +{ op_91fc_0_comp_ff, 0x00000002, 37372 }, /* SUBA */ +{ op_b000_0_comp_ff, 0x00000000, 45056 }, /* CMP */ +{ op_b010_0_comp_ff, 0x00000000, 45072 }, /* CMP */ +{ op_b018_0_comp_ff, 0x00000000, 45080 }, /* CMP */ +{ op_b020_0_comp_ff, 0x00000000, 45088 }, /* CMP */ +{ op_b028_0_comp_ff, 0x00000002, 45096 }, /* CMP */ +{ op_b030_0_comp_ff, 0x00000002, 45104 }, /* CMP */ +{ op_b038_0_comp_ff, 0x00000002, 45112 }, /* CMP */ +{ op_b039_0_comp_ff, 0x00000002, 45113 }, /* CMP */ +{ op_b03a_0_comp_ff, 0x00000002, 45114 }, /* CMP */ +{ op_b03b_0_comp_ff, 0x00000002, 45115 }, /* CMP */ +{ op_b03c_0_comp_ff, 0x00000002, 45116 }, /* CMP */ +{ op_b040_0_comp_ff, 0x00000000, 45120 }, /* CMP */ +{ op_b048_0_comp_ff, 0x00000000, 45128 }, /* CMP */ +{ op_b050_0_comp_ff, 0x00000000, 45136 }, /* CMP */ +{ op_b058_0_comp_ff, 0x00000000, 45144 }, /* CMP */ +{ op_b060_0_comp_ff, 0x00000000, 45152 }, /* CMP */ +{ op_b068_0_comp_ff, 0x00000002, 45160 }, /* CMP */ +{ op_b070_0_comp_ff, 0x00000002, 45168 }, /* CMP */ +{ op_b078_0_comp_ff, 0x00000002, 45176 }, /* CMP */ +{ op_b079_0_comp_ff, 0x00000002, 45177 }, /* CMP */ +{ op_b07a_0_comp_ff, 0x00000002, 45178 }, /* CMP */ +{ op_b07b_0_comp_ff, 0x00000002, 45179 }, /* CMP */ +{ op_b07c_0_comp_ff, 0x00000002, 45180 }, /* CMP */ +{ op_b080_0_comp_ff, 0x00000000, 45184 }, /* CMP */ +{ op_b088_0_comp_ff, 0x00000000, 45192 }, /* CMP */ +{ op_b090_0_comp_ff, 0x00000000, 45200 }, /* CMP */ +{ op_b098_0_comp_ff, 0x00000000, 45208 }, /* CMP */ +{ op_b0a0_0_comp_ff, 0x00000000, 45216 }, /* CMP */ +{ op_b0a8_0_comp_ff, 0x00000002, 45224 }, /* CMP */ +{ op_b0b0_0_comp_ff, 0x00000002, 45232 }, /* CMP */ +{ op_b0b8_0_comp_ff, 0x00000002, 45240 }, /* CMP */ +{ op_b0b9_0_comp_ff, 0x00000002, 45241 }, /* CMP */ +{ op_b0ba_0_comp_ff, 0x00000002, 45242 }, /* CMP */ +{ op_b0bb_0_comp_ff, 0x00000002, 45243 }, /* CMP */ +{ op_b0bc_0_comp_ff, 0x00000002, 45244 }, /* CMP */ +{ op_b0c0_0_comp_ff, 0x00000000, 45248 }, /* CMPA */ +{ op_b0c8_0_comp_ff, 0x00000000, 45256 }, /* CMPA */ +{ op_b0d0_0_comp_ff, 0x00000000, 45264 }, /* CMPA */ +{ op_b0d8_0_comp_ff, 0x00000000, 45272 }, /* CMPA */ +{ op_b0e0_0_comp_ff, 0x00000000, 45280 }, /* CMPA */ +{ op_b0e8_0_comp_ff, 0x00000002, 45288 }, /* CMPA */ +{ op_b0f0_0_comp_ff, 0x00000002, 45296 }, /* CMPA */ +{ op_b0f8_0_comp_ff, 0x00000002, 45304 }, /* CMPA */ +{ op_b0f9_0_comp_ff, 0x00000002, 45305 }, /* CMPA */ +{ op_b0fa_0_comp_ff, 0x00000002, 45306 }, /* CMPA */ +{ op_b0fb_0_comp_ff, 0x00000002, 45307 }, /* CMPA */ +{ op_b0fc_0_comp_ff, 0x00000002, 45308 }, /* CMPA */ +{ op_b100_0_comp_ff, 0x00000000, 45312 }, /* EOR */ +{ op_b108_0_comp_ff, 0x00000000, 45320 }, /* CMPM */ +{ op_b110_0_comp_ff, 0x00000000, 45328 }, /* EOR */ +{ op_b118_0_comp_ff, 0x00000000, 45336 }, /* EOR */ +{ op_b120_0_comp_ff, 0x00000000, 45344 }, /* EOR */ +{ op_b128_0_comp_ff, 0x00000002, 45352 }, /* EOR */ +{ op_b130_0_comp_ff, 0x00000002, 45360 }, /* EOR */ +{ op_b138_0_comp_ff, 0x00000002, 45368 }, /* EOR */ +{ op_b139_0_comp_ff, 0x00000002, 45369 }, /* EOR */ +{ op_b140_0_comp_ff, 0x00000000, 45376 }, /* EOR */ +{ op_b148_0_comp_ff, 0x00000000, 45384 }, /* CMPM */ +{ op_b150_0_comp_ff, 0x00000000, 45392 }, /* EOR */ +{ op_b158_0_comp_ff, 0x00000000, 45400 }, /* EOR */ +{ op_b160_0_comp_ff, 0x00000000, 45408 }, /* EOR */ +{ op_b168_0_comp_ff, 0x00000002, 45416 }, /* EOR */ +{ op_b170_0_comp_ff, 0x00000002, 45424 }, /* EOR */ +{ op_b178_0_comp_ff, 0x00000002, 45432 }, /* EOR */ +{ op_b179_0_comp_ff, 0x00000002, 45433 }, /* EOR */ +{ op_b180_0_comp_ff, 0x00000000, 45440 }, /* EOR */ +{ op_b188_0_comp_ff, 0x00000000, 45448 }, /* CMPM */ +{ op_b190_0_comp_ff, 0x00000000, 45456 }, /* EOR */ +{ op_b198_0_comp_ff, 0x00000000, 45464 }, /* EOR */ +{ op_b1a0_0_comp_ff, 0x00000000, 45472 }, /* EOR */ +{ op_b1a8_0_comp_ff, 0x00000002, 45480 }, /* EOR */ +{ op_b1b0_0_comp_ff, 0x00000002, 45488 }, /* EOR */ +{ op_b1b8_0_comp_ff, 0x00000002, 45496 }, /* EOR */ +{ op_b1b9_0_comp_ff, 0x00000002, 45497 }, /* EOR */ +{ op_b1c0_0_comp_ff, 0x00000000, 45504 }, /* CMPA */ +{ op_b1c8_0_comp_ff, 0x00000000, 45512 }, /* CMPA */ +{ op_b1d0_0_comp_ff, 0x00000000, 45520 }, /* CMPA */ +{ op_b1d8_0_comp_ff, 0x00000000, 45528 }, /* CMPA */ +{ op_b1e0_0_comp_ff, 0x00000000, 45536 }, /* CMPA */ +{ op_b1e8_0_comp_ff, 0x00000002, 45544 }, /* CMPA */ +{ op_b1f0_0_comp_ff, 0x00000002, 45552 }, /* CMPA */ +{ op_b1f8_0_comp_ff, 0x00000002, 45560 }, /* CMPA */ +{ op_b1f9_0_comp_ff, 0x00000002, 45561 }, /* CMPA */ +{ op_b1fa_0_comp_ff, 0x00000002, 45562 }, /* CMPA */ +{ op_b1fb_0_comp_ff, 0x00000002, 45563 }, /* CMPA */ +{ op_b1fc_0_comp_ff, 0x00000002, 45564 }, /* CMPA */ +{ op_c000_0_comp_ff, 0x00000000, 49152 }, /* AND */ +{ op_c010_0_comp_ff, 0x00000000, 49168 }, /* AND */ +{ op_c018_0_comp_ff, 0x00000000, 49176 }, /* AND */ +{ op_c020_0_comp_ff, 0x00000000, 49184 }, /* AND */ +{ op_c028_0_comp_ff, 0x00000002, 49192 }, /* AND */ +{ op_c030_0_comp_ff, 0x00000002, 49200 }, /* AND */ +{ op_c038_0_comp_ff, 0x00000002, 49208 }, /* AND */ +{ op_c039_0_comp_ff, 0x00000002, 49209 }, /* AND */ +{ op_c03a_0_comp_ff, 0x00000002, 49210 }, /* AND */ +{ op_c03b_0_comp_ff, 0x00000002, 49211 }, /* AND */ +{ op_c03c_0_comp_ff, 0x00000002, 49212 }, /* AND */ +{ op_c040_0_comp_ff, 0x00000000, 49216 }, /* AND */ +{ op_c050_0_comp_ff, 0x00000000, 49232 }, /* AND */ +{ op_c058_0_comp_ff, 0x00000000, 49240 }, /* AND */ +{ op_c060_0_comp_ff, 0x00000000, 49248 }, /* AND */ +{ op_c068_0_comp_ff, 0x00000002, 49256 }, /* AND */ +{ op_c070_0_comp_ff, 0x00000002, 49264 }, /* AND */ +{ op_c078_0_comp_ff, 0x00000002, 49272 }, /* AND */ +{ op_c079_0_comp_ff, 0x00000002, 49273 }, /* AND */ +{ op_c07a_0_comp_ff, 0x00000002, 49274 }, /* AND */ +{ op_c07b_0_comp_ff, 0x00000002, 49275 }, /* AND */ +{ op_c07c_0_comp_ff, 0x00000002, 49276 }, /* AND */ +{ op_c080_0_comp_ff, 0x00000000, 49280 }, /* AND */ +{ op_c090_0_comp_ff, 0x00000000, 49296 }, /* AND */ +{ op_c098_0_comp_ff, 0x00000000, 49304 }, /* AND */ +{ op_c0a0_0_comp_ff, 0x00000000, 49312 }, /* AND */ +{ op_c0a8_0_comp_ff, 0x00000002, 49320 }, /* AND */ +{ op_c0b0_0_comp_ff, 0x00000002, 49328 }, /* AND */ +{ op_c0b8_0_comp_ff, 0x00000002, 49336 }, /* AND */ +{ op_c0b9_0_comp_ff, 0x00000002, 49337 }, /* AND */ +{ op_c0ba_0_comp_ff, 0x00000002, 49338 }, /* AND */ +{ op_c0bb_0_comp_ff, 0x00000002, 49339 }, /* AND */ +{ op_c0bc_0_comp_ff, 0x00000002, 49340 }, /* AND */ +{ op_c0c0_0_comp_ff, 0x00000000, 49344 }, /* MULU */ +{ op_c0d0_0_comp_ff, 0x00000000, 49360 }, /* MULU */ +{ op_c0d8_0_comp_ff, 0x00000000, 49368 }, /* MULU */ +{ op_c0e0_0_comp_ff, 0x00000000, 49376 }, /* MULU */ +{ op_c0e8_0_comp_ff, 0x00000002, 49384 }, /* MULU */ +{ op_c0f0_0_comp_ff, 0x00000002, 49392 }, /* MULU */ +{ op_c0f8_0_comp_ff, 0x00000002, 49400 }, /* MULU */ +{ op_c0f9_0_comp_ff, 0x00000002, 49401 }, /* MULU */ +{ op_c0fa_0_comp_ff, 0x00000002, 49402 }, /* MULU */ +{ op_c0fb_0_comp_ff, 0x00000002, 49403 }, /* MULU */ +{ op_c0fc_0_comp_ff, 0x00000002, 49404 }, /* MULU */ +{ NULL, 0x00000000, 49408 }, /* ABCD */ +{ NULL, 0x00000000, 49416 }, /* ABCD */ +{ op_c110_0_comp_ff, 0x00000000, 49424 }, /* AND */ +{ op_c118_0_comp_ff, 0x00000000, 49432 }, /* AND */ +{ op_c120_0_comp_ff, 0x00000000, 49440 }, /* AND */ +{ op_c128_0_comp_ff, 0x00000002, 49448 }, /* AND */ +{ op_c130_0_comp_ff, 0x00000002, 49456 }, /* AND */ +{ op_c138_0_comp_ff, 0x00000002, 49464 }, /* AND */ +{ op_c139_0_comp_ff, 0x00000002, 49465 }, /* AND */ +{ op_c140_0_comp_ff, 0x00000000, 49472 }, /* EXG */ +{ op_c148_0_comp_ff, 0x00000000, 49480 }, /* EXG */ +{ op_c150_0_comp_ff, 0x00000000, 49488 }, /* AND */ +{ op_c158_0_comp_ff, 0x00000000, 49496 }, /* AND */ +{ op_c160_0_comp_ff, 0x00000000, 49504 }, /* AND */ +{ op_c168_0_comp_ff, 0x00000002, 49512 }, /* AND */ +{ op_c170_0_comp_ff, 0x00000002, 49520 }, /* AND */ +{ op_c178_0_comp_ff, 0x00000002, 49528 }, /* AND */ +{ op_c179_0_comp_ff, 0x00000002, 49529 }, /* AND */ +{ op_c188_0_comp_ff, 0x00000000, 49544 }, /* EXG */ +{ op_c190_0_comp_ff, 0x00000000, 49552 }, /* AND */ +{ op_c198_0_comp_ff, 0x00000000, 49560 }, /* AND */ +{ op_c1a0_0_comp_ff, 0x00000000, 49568 }, /* AND */ +{ op_c1a8_0_comp_ff, 0x00000002, 49576 }, /* AND */ +{ op_c1b0_0_comp_ff, 0x00000002, 49584 }, /* AND */ +{ op_c1b8_0_comp_ff, 0x00000002, 49592 }, /* AND */ +{ op_c1b9_0_comp_ff, 0x00000002, 49593 }, /* AND */ +{ op_c1c0_0_comp_ff, 0x00000000, 49600 }, /* MULS */ +{ op_c1d0_0_comp_ff, 0x00000000, 49616 }, /* MULS */ +{ op_c1d8_0_comp_ff, 0x00000000, 49624 }, /* MULS */ +{ op_c1e0_0_comp_ff, 0x00000000, 49632 }, /* MULS */ +{ op_c1e8_0_comp_ff, 0x00000002, 49640 }, /* MULS */ +{ op_c1f0_0_comp_ff, 0x00000002, 49648 }, /* MULS */ +{ op_c1f8_0_comp_ff, 0x00000002, 49656 }, /* MULS */ +{ op_c1f9_0_comp_ff, 0x00000002, 49657 }, /* MULS */ +{ op_c1fa_0_comp_ff, 0x00000002, 49658 }, /* MULS */ +{ op_c1fb_0_comp_ff, 0x00000002, 49659 }, /* MULS */ +{ op_c1fc_0_comp_ff, 0x00000002, 49660 }, /* MULS */ +{ op_d000_0_comp_ff, 0x00000000, 53248 }, /* ADD */ +{ op_d010_0_comp_ff, 0x00000000, 53264 }, /* ADD */ +{ op_d018_0_comp_ff, 0x00000000, 53272 }, /* ADD */ +{ op_d020_0_comp_ff, 0x00000000, 53280 }, /* ADD */ +{ op_d028_0_comp_ff, 0x00000002, 53288 }, /* ADD */ +{ op_d030_0_comp_ff, 0x00000002, 53296 }, /* ADD */ +{ op_d038_0_comp_ff, 0x00000002, 53304 }, /* ADD */ +{ op_d039_0_comp_ff, 0x00000002, 53305 }, /* ADD */ +{ op_d03a_0_comp_ff, 0x00000002, 53306 }, /* ADD */ +{ op_d03b_0_comp_ff, 0x00000002, 53307 }, /* ADD */ +{ op_d03c_0_comp_ff, 0x00000002, 53308 }, /* ADD */ +{ op_d040_0_comp_ff, 0x00000000, 53312 }, /* ADD */ +{ op_d048_0_comp_ff, 0x00000000, 53320 }, /* ADD */ +{ op_d050_0_comp_ff, 0x00000000, 53328 }, /* ADD */ +{ op_d058_0_comp_ff, 0x00000000, 53336 }, /* ADD */ +{ op_d060_0_comp_ff, 0x00000000, 53344 }, /* ADD */ +{ op_d068_0_comp_ff, 0x00000002, 53352 }, /* ADD */ +{ op_d070_0_comp_ff, 0x00000002, 53360 }, /* ADD */ +{ op_d078_0_comp_ff, 0x00000002, 53368 }, /* ADD */ +{ op_d079_0_comp_ff, 0x00000002, 53369 }, /* ADD */ +{ op_d07a_0_comp_ff, 0x00000002, 53370 }, /* ADD */ +{ op_d07b_0_comp_ff, 0x00000002, 53371 }, /* ADD */ +{ op_d07c_0_comp_ff, 0x00000002, 53372 }, /* ADD */ +{ op_d080_0_comp_ff, 0x00000000, 53376 }, /* ADD */ +{ op_d088_0_comp_ff, 0x00000000, 53384 }, /* ADD */ +{ op_d090_0_comp_ff, 0x00000000, 53392 }, /* ADD */ +{ op_d098_0_comp_ff, 0x00000000, 53400 }, /* ADD */ +{ op_d0a0_0_comp_ff, 0x00000000, 53408 }, /* ADD */ +{ op_d0a8_0_comp_ff, 0x00000002, 53416 }, /* ADD */ +{ op_d0b0_0_comp_ff, 0x00000002, 53424 }, /* ADD */ +{ op_d0b8_0_comp_ff, 0x00000002, 53432 }, /* ADD */ +{ op_d0b9_0_comp_ff, 0x00000002, 53433 }, /* ADD */ +{ op_d0ba_0_comp_ff, 0x00000002, 53434 }, /* ADD */ +{ op_d0bb_0_comp_ff, 0x00000002, 53435 }, /* ADD */ +{ op_d0bc_0_comp_ff, 0x00000002, 53436 }, /* ADD */ +{ op_d0c0_0_comp_ff, 0x00000000, 53440 }, /* ADDA */ +{ op_d0c8_0_comp_ff, 0x00000000, 53448 }, /* ADDA */ +{ op_d0d0_0_comp_ff, 0x00000000, 53456 }, /* ADDA */ +{ op_d0d8_0_comp_ff, 0x00000000, 53464 }, /* ADDA */ +{ op_d0e0_0_comp_ff, 0x00000000, 53472 }, /* ADDA */ +{ op_d0e8_0_comp_ff, 0x00000002, 53480 }, /* ADDA */ +{ op_d0f0_0_comp_ff, 0x00000002, 53488 }, /* ADDA */ +{ op_d0f8_0_comp_ff, 0x00000002, 53496 }, /* ADDA */ +{ op_d0f9_0_comp_ff, 0x00000002, 53497 }, /* ADDA */ +{ op_d0fa_0_comp_ff, 0x00000002, 53498 }, /* ADDA */ +{ op_d0fb_0_comp_ff, 0x00000002, 53499 }, /* ADDA */ +{ op_d0fc_0_comp_ff, 0x00000002, 53500 }, /* ADDA */ +{ op_d100_0_comp_ff, 0x00000008, 53504 }, /* ADDX */ +{ op_d108_0_comp_ff, 0x00000008, 53512 }, /* ADDX */ +{ op_d110_0_comp_ff, 0x00000000, 53520 }, /* ADD */ +{ op_d118_0_comp_ff, 0x00000000, 53528 }, /* ADD */ +{ op_d120_0_comp_ff, 0x00000000, 53536 }, /* ADD */ +{ op_d128_0_comp_ff, 0x00000002, 53544 }, /* ADD */ +{ op_d130_0_comp_ff, 0x00000002, 53552 }, /* ADD */ +{ op_d138_0_comp_ff, 0x00000002, 53560 }, /* ADD */ +{ op_d139_0_comp_ff, 0x00000002, 53561 }, /* ADD */ +{ op_d140_0_comp_ff, 0x00000008, 53568 }, /* ADDX */ +{ op_d148_0_comp_ff, 0x00000008, 53576 }, /* ADDX */ +{ op_d150_0_comp_ff, 0x00000000, 53584 }, /* ADD */ +{ op_d158_0_comp_ff, 0x00000000, 53592 }, /* ADD */ +{ op_d160_0_comp_ff, 0x00000000, 53600 }, /* ADD */ +{ op_d168_0_comp_ff, 0x00000002, 53608 }, /* ADD */ +{ op_d170_0_comp_ff, 0x00000002, 53616 }, /* ADD */ +{ op_d178_0_comp_ff, 0x00000002, 53624 }, /* ADD */ +{ op_d179_0_comp_ff, 0x00000002, 53625 }, /* ADD */ +{ op_d180_0_comp_ff, 0x00000008, 53632 }, /* ADDX */ +{ op_d188_0_comp_ff, 0x00000008, 53640 }, /* ADDX */ +{ op_d190_0_comp_ff, 0x00000000, 53648 }, /* ADD */ +{ op_d198_0_comp_ff, 0x00000000, 53656 }, /* ADD */ +{ op_d1a0_0_comp_ff, 0x00000000, 53664 }, /* ADD */ +{ op_d1a8_0_comp_ff, 0x00000002, 53672 }, /* ADD */ +{ op_d1b0_0_comp_ff, 0x00000002, 53680 }, /* ADD */ +{ op_d1b8_0_comp_ff, 0x00000002, 53688 }, /* ADD */ +{ op_d1b9_0_comp_ff, 0x00000002, 53689 }, /* ADD */ +{ op_d1c0_0_comp_ff, 0x00000000, 53696 }, /* ADDA */ +{ op_d1c8_0_comp_ff, 0x00000000, 53704 }, /* ADDA */ +{ op_d1d0_0_comp_ff, 0x00000000, 53712 }, /* ADDA */ +{ op_d1d8_0_comp_ff, 0x00000000, 53720 }, /* ADDA */ +{ op_d1e0_0_comp_ff, 0x00000000, 53728 }, /* ADDA */ +{ op_d1e8_0_comp_ff, 0x00000002, 53736 }, /* ADDA */ +{ op_d1f0_0_comp_ff, 0x00000002, 53744 }, /* ADDA */ +{ op_d1f8_0_comp_ff, 0x00000002, 53752 }, /* ADDA */ +{ op_d1f9_0_comp_ff, 0x00000002, 53753 }, /* ADDA */ +{ op_d1fa_0_comp_ff, 0x00000002, 53754 }, /* ADDA */ +{ op_d1fb_0_comp_ff, 0x00000002, 53755 }, /* ADDA */ +{ op_d1fc_0_comp_ff, 0x00000002, 53756 }, /* ADDA */ +{ op_e000_0_comp_ff, 0x00000000, 57344 }, /* ASR */ +{ op_e008_0_comp_ff, 0x00000000, 57352 }, /* LSR */ +{ op_e010_0_comp_ff, 0x00000008, 57360 }, /* ROXR */ +{ op_e018_0_comp_ff, 0x00000000, 57368 }, /* ROR */ +{ op_e020_0_comp_ff, 0x00000000, 57376 }, /* ASR */ +{ op_e028_0_comp_ff, 0x00000000, 57384 }, /* LSR */ +{ op_e030_0_comp_ff, 0x00000008, 57392 }, /* ROXR */ +{ op_e038_0_comp_ff, 0x00000000, 57400 }, /* ROR */ +{ op_e040_0_comp_ff, 0x00000000, 57408 }, /* ASR */ +{ op_e048_0_comp_ff, 0x00000000, 57416 }, /* LSR */ +{ op_e050_0_comp_ff, 0x00000008, 57424 }, /* ROXR */ +{ op_e058_0_comp_ff, 0x00000000, 57432 }, /* ROR */ +{ op_e060_0_comp_ff, 0x00000000, 57440 }, /* ASR */ +{ op_e068_0_comp_ff, 0x00000000, 57448 }, /* LSR */ +{ op_e070_0_comp_ff, 0x00000008, 57456 }, /* ROXR */ +{ op_e078_0_comp_ff, 0x00000000, 57464 }, /* ROR */ +{ op_e080_0_comp_ff, 0x00000000, 57472 }, /* ASR */ +{ op_e088_0_comp_ff, 0x00000000, 57480 }, /* LSR */ +{ op_e090_0_comp_ff, 0x00000008, 57488 }, /* ROXR */ +{ op_e098_0_comp_ff, 0x00000000, 57496 }, /* ROR */ +{ op_e0a0_0_comp_ff, 0x00000000, 57504 }, /* ASR */ +{ op_e0a8_0_comp_ff, 0x00000000, 57512 }, /* LSR */ +{ op_e0b0_0_comp_ff, 0x00000008, 57520 }, /* ROXR */ +{ op_e0b8_0_comp_ff, 0x00000000, 57528 }, /* ROR */ +{ op_e0d0_0_comp_ff, 0x00000000, 57552 }, /* ASRW */ +{ op_e0d8_0_comp_ff, 0x00000000, 57560 }, /* ASRW */ +{ op_e0e0_0_comp_ff, 0x00000000, 57568 }, /* ASRW */ +{ op_e0e8_0_comp_ff, 0x00000002, 57576 }, /* ASRW */ +{ op_e0f0_0_comp_ff, 0x00000002, 57584 }, /* ASRW */ +{ op_e0f8_0_comp_ff, 0x00000002, 57592 }, /* ASRW */ +{ op_e0f9_0_comp_ff, 0x00000002, 57593 }, /* ASRW */ +{ op_e100_0_comp_ff, 0x00000000, 57600 }, /* ASL */ +{ op_e108_0_comp_ff, 0x00000000, 57608 }, /* LSL */ +{ op_e110_0_comp_ff, 0x00000008, 57616 }, /* ROXL */ +{ op_e118_0_comp_ff, 0x00000000, 57624 }, /* ROL */ +{ op_e120_0_comp_ff, 0x00000000, 57632 }, /* ASL */ +{ op_e128_0_comp_ff, 0x00000000, 57640 }, /* LSL */ +{ op_e130_0_comp_ff, 0x00000008, 57648 }, /* ROXL */ +{ op_e138_0_comp_ff, 0x00000000, 57656 }, /* ROL */ +{ op_e140_0_comp_ff, 0x00000000, 57664 }, /* ASL */ +{ op_e148_0_comp_ff, 0x00000000, 57672 }, /* LSL */ +{ op_e150_0_comp_ff, 0x00000008, 57680 }, /* ROXL */ +{ op_e158_0_comp_ff, 0x00000000, 57688 }, /* ROL */ +{ op_e160_0_comp_ff, 0x00000000, 57696 }, /* ASL */ +{ op_e168_0_comp_ff, 0x00000000, 57704 }, /* LSL */ +{ op_e170_0_comp_ff, 0x00000008, 57712 }, /* ROXL */ +{ op_e178_0_comp_ff, 0x00000000, 57720 }, /* ROL */ +{ op_e180_0_comp_ff, 0x00000000, 57728 }, /* ASL */ +{ op_e188_0_comp_ff, 0x00000000, 57736 }, /* LSL */ +{ op_e190_0_comp_ff, 0x00000008, 57744 }, /* ROXL */ +{ op_e198_0_comp_ff, 0x00000000, 57752 }, /* ROL */ +{ op_e1a0_0_comp_ff, 0x00000000, 57760 }, /* ASL */ +{ op_e1a8_0_comp_ff, 0x00000000, 57768 }, /* LSL */ +{ op_e1b0_0_comp_ff, 0x00000008, 57776 }, /* ROXL */ +{ op_e1b8_0_comp_ff, 0x00000000, 57784 }, /* ROL */ +{ op_e1d0_0_comp_ff, 0x00000000, 57808 }, /* ASLW */ +{ op_e1d8_0_comp_ff, 0x00000000, 57816 }, /* ASLW */ +{ op_e1e0_0_comp_ff, 0x00000000, 57824 }, /* ASLW */ +{ op_e1e8_0_comp_ff, 0x00000002, 57832 }, /* ASLW */ +{ op_e1f0_0_comp_ff, 0x00000002, 57840 }, /* ASLW */ +{ op_e1f8_0_comp_ff, 0x00000002, 57848 }, /* ASLW */ +{ op_e1f9_0_comp_ff, 0x00000002, 57849 }, /* ASLW */ +{ op_e2d0_0_comp_ff, 0x00000000, 58064 }, /* LSRW */ +{ op_e2d8_0_comp_ff, 0x00000000, 58072 }, /* LSRW */ +{ op_e2e0_0_comp_ff, 0x00000000, 58080 }, /* LSRW */ +{ op_e2e8_0_comp_ff, 0x00000002, 58088 }, /* LSRW */ +{ op_e2f0_0_comp_ff, 0x00000002, 58096 }, /* LSRW */ +{ op_e2f8_0_comp_ff, 0x00000002, 58104 }, /* LSRW */ +{ op_e2f9_0_comp_ff, 0x00000002, 58105 }, /* LSRW */ +{ op_e3d0_0_comp_ff, 0x00000000, 58320 }, /* LSLW */ +{ op_e3d8_0_comp_ff, 0x00000000, 58328 }, /* LSLW */ +{ op_e3e0_0_comp_ff, 0x00000000, 58336 }, /* LSLW */ +{ op_e3e8_0_comp_ff, 0x00000002, 58344 }, /* LSLW */ +{ op_e3f0_0_comp_ff, 0x00000002, 58352 }, /* LSLW */ +{ op_e3f8_0_comp_ff, 0x00000002, 58360 }, /* LSLW */ +{ op_e3f9_0_comp_ff, 0x00000002, 58361 }, /* LSLW */ +{ NULL, 0x00000008, 58576 }, /* ROXRW */ +{ NULL, 0x00000008, 58584 }, /* ROXRW */ +{ NULL, 0x00000008, 58592 }, /* ROXRW */ +{ NULL, 0x0000000a, 58600 }, /* ROXRW */ +{ NULL, 0x0000000a, 58608 }, /* ROXRW */ +{ NULL, 0x0000000a, 58616 }, /* ROXRW */ +{ NULL, 0x0000000a, 58617 }, /* ROXRW */ +{ NULL, 0x00000008, 58832 }, /* ROXLW */ +{ NULL, 0x00000008, 58840 }, /* ROXLW */ +{ NULL, 0x00000008, 58848 }, /* ROXLW */ +{ NULL, 0x0000000a, 58856 }, /* ROXLW */ +{ NULL, 0x0000000a, 58864 }, /* ROXLW */ +{ NULL, 0x0000000a, 58872 }, /* ROXLW */ +{ NULL, 0x0000000a, 58873 }, /* ROXLW */ +{ op_e6d0_0_comp_ff, 0x00000000, 59088 }, /* RORW */ +{ op_e6d8_0_comp_ff, 0x00000000, 59096 }, /* RORW */ +{ op_e6e0_0_comp_ff, 0x00000000, 59104 }, /* RORW */ +{ op_e6e8_0_comp_ff, 0x00000002, 59112 }, /* RORW */ +{ op_e6f0_0_comp_ff, 0x00000002, 59120 }, /* RORW */ +{ op_e6f8_0_comp_ff, 0x00000002, 59128 }, /* RORW */ +{ op_e6f9_0_comp_ff, 0x00000002, 59129 }, /* RORW */ +{ op_e7d0_0_comp_ff, 0x00000000, 59344 }, /* ROLW */ +{ op_e7d8_0_comp_ff, 0x00000000, 59352 }, /* ROLW */ +{ op_e7e0_0_comp_ff, 0x00000000, 59360 }, /* ROLW */ +{ op_e7e8_0_comp_ff, 0x00000002, 59368 }, /* ROLW */ +{ op_e7f0_0_comp_ff, 0x00000002, 59376 }, /* ROLW */ +{ op_e7f8_0_comp_ff, 0x00000002, 59384 }, /* ROLW */ +{ op_e7f9_0_comp_ff, 0x00000002, 59385 }, /* ROLW */ +{ NULL, 0x00000000, 59584 }, /* BFTST */ +{ NULL, 0x00000000, 59600 }, /* BFTST */ +{ NULL, 0x00000000, 59624 }, /* BFTST */ +{ NULL, 0x00000000, 59632 }, /* BFTST */ +{ NULL, 0x00000000, 59640 }, /* BFTST */ +{ NULL, 0x00000000, 59641 }, /* BFTST */ +{ NULL, 0x00000000, 59642 }, /* BFTST */ +{ NULL, 0x00000000, 59643 }, /* BFTST */ +{ NULL, 0x00000000, 59840 }, /* BFEXTU */ +{ NULL, 0x00000000, 59856 }, /* BFEXTU */ +{ NULL, 0x00000000, 59880 }, /* BFEXTU */ +{ NULL, 0x00000000, 59888 }, /* BFEXTU */ +{ NULL, 0x00000000, 59896 }, /* BFEXTU */ +{ NULL, 0x00000000, 59897 }, /* BFEXTU */ +{ NULL, 0x00000000, 59898 }, /* BFEXTU */ +{ NULL, 0x00000000, 59899 }, /* BFEXTU */ +{ NULL, 0x00000000, 60096 }, /* BFCHG */ +{ NULL, 0x00000000, 60112 }, /* BFCHG */ +{ NULL, 0x00000000, 60136 }, /* BFCHG */ +{ NULL, 0x00000000, 60144 }, /* BFCHG */ +{ NULL, 0x00000000, 60152 }, /* BFCHG */ +{ NULL, 0x00000000, 60153 }, /* BFCHG */ +{ NULL, 0x00000000, 60352 }, /* BFEXTS */ +{ NULL, 0x00000000, 60368 }, /* BFEXTS */ +{ NULL, 0x00000000, 60392 }, /* BFEXTS */ +{ NULL, 0x00000000, 60400 }, /* BFEXTS */ +{ NULL, 0x00000000, 60408 }, /* BFEXTS */ +{ NULL, 0x00000000, 60409 }, /* BFEXTS */ +{ NULL, 0x00000000, 60410 }, /* BFEXTS */ +{ NULL, 0x00000000, 60411 }, /* BFEXTS */ +{ NULL, 0x00000000, 60608 }, /* BFCLR */ +{ NULL, 0x00000000, 60624 }, /* BFCLR */ +{ NULL, 0x00000000, 60648 }, /* BFCLR */ +{ NULL, 0x00000000, 60656 }, /* BFCLR */ +{ NULL, 0x00000000, 60664 }, /* BFCLR */ +{ NULL, 0x00000000, 60665 }, /* BFCLR */ +{ NULL, 0x00000000, 60864 }, /* BFFFO */ +{ NULL, 0x00000000, 60880 }, /* BFFFO */ +{ NULL, 0x00000000, 60904 }, /* BFFFO */ +{ NULL, 0x00000000, 60912 }, /* BFFFO */ +{ NULL, 0x00000000, 60920 }, /* BFFFO */ +{ NULL, 0x00000000, 60921 }, /* BFFFO */ +{ NULL, 0x00000000, 60922 }, /* BFFFO */ +{ NULL, 0x00000000, 60923 }, /* BFFFO */ +{ NULL, 0x00000000, 61120 }, /* BFSET */ +{ NULL, 0x00000000, 61136 }, /* BFSET */ +{ NULL, 0x00000000, 61160 }, /* BFSET */ +{ NULL, 0x00000000, 61168 }, /* BFSET */ +{ NULL, 0x00000000, 61176 }, /* BFSET */ +{ NULL, 0x00000000, 61177 }, /* BFSET */ +{ op_efc0_0_comp_ff, 0x00000002, 61376 }, /* BFINS */ +{ op_efd0_0_comp_ff, 0x00000002, 61392 }, /* BFINS */ +{ op_efe8_0_comp_ff, 0x00000002, 61416 }, /* BFINS */ +{ op_eff0_0_comp_ff, 0x00000002, 61424 }, /* BFINS */ +{ op_eff8_0_comp_ff, 0x00000002, 61432 }, /* BFINS */ +{ op_eff9_0_comp_ff, 0x00000002, 61433 }, /* BFINS */ +{ NULL, 0x00000001, 61440 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61448 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61456 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61464 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61472 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61480 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61488 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61496 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61497 }, /* MMUOP030 */ +{ op_f200_0_comp_ff, 0x00000022, 61952 }, /* FPP */ +{ op_f208_0_comp_ff, 0x00000022, 61960 }, /* FPP */ +{ op_f210_0_comp_ff, 0x00000022, 61968 }, /* FPP */ +{ op_f218_0_comp_ff, 0x00000022, 61976 }, /* FPP */ +{ op_f220_0_comp_ff, 0x00000022, 61984 }, /* FPP */ +{ op_f228_0_comp_ff, 0x00000022, 61992 }, /* FPP */ +{ op_f230_0_comp_ff, 0x00000022, 62000 }, /* FPP */ +{ op_f238_0_comp_ff, 0x00000022, 62008 }, /* FPP */ +{ op_f239_0_comp_ff, 0x00000022, 62009 }, /* FPP */ +{ op_f23a_0_comp_ff, 0x00000022, 62010 }, /* FPP */ +{ op_f23b_0_comp_ff, 0x00000022, 62011 }, /* FPP */ +{ op_f23c_0_comp_ff, 0x00000022, 62012 }, /* FPP */ +{ op_f240_0_comp_ff, 0x00000006, 62016 }, /* FScc */ +{ NULL, 0x00000021, 62024 }, /* FDBcc */ +{ op_f250_0_comp_ff, 0x00000006, 62032 }, /* FScc */ +{ op_f258_0_comp_ff, 0x00000006, 62040 }, /* FScc */ +{ op_f260_0_comp_ff, 0x00000006, 62048 }, /* FScc */ +{ op_f268_0_comp_ff, 0x00000006, 62056 }, /* FScc */ +{ op_f270_0_comp_ff, 0x00000006, 62064 }, /* FScc */ +{ op_f278_0_comp_ff, 0x00000006, 62072 }, /* FScc */ +{ op_f279_0_comp_ff, 0x00000006, 62073 }, /* FScc */ +{ NULL, 0x00000021, 62074 }, /* FTRAPcc */ +{ NULL, 0x00000021, 62075 }, /* FTRAPcc */ +{ NULL, 0x00000021, 62076 }, /* FTRAPcc */ +{ op_f280_0_comp_ff, 0x00000005, 62080 }, /* FBcc */ +{ op_f2c0_0_comp_ff, 0x00000005, 62144 }, /* FBcc */ +{ NULL, 0x00000020, 62224 }, /* FSAVE */ +{ NULL, 0x00000020, 62240 }, /* FSAVE */ +{ NULL, 0x00000020, 62248 }, /* FSAVE */ +{ NULL, 0x00000020, 62256 }, /* FSAVE */ +{ NULL, 0x00000020, 62264 }, /* FSAVE */ +{ NULL, 0x00000020, 62265 }, /* FSAVE */ +{ NULL, 0x00000020, 62288 }, /* FRESTORE */ +{ NULL, 0x00000020, 62296 }, /* FRESTORE */ +{ NULL, 0x00000020, 62312 }, /* FRESTORE */ +{ NULL, 0x00000020, 62320 }, /* FRESTORE */ +{ NULL, 0x00000020, 62328 }, /* FRESTORE */ +{ NULL, 0x00000020, 62329 }, /* FRESTORE */ +{ NULL, 0x00000020, 62330 }, /* FRESTORE */ +{ NULL, 0x00000020, 62331 }, /* FRESTORE */ +{ NULL, 0x00000001, 62472 }, /* CINVL */ +{ NULL, 0x00000001, 62480 }, /* CINVP */ +{ NULL, 0x00000001, 62488 }, /* CINVA */ +{ NULL, 0x00000001, 62489 }, /* CINVA */ +{ NULL, 0x00000001, 62490 }, /* CINVA */ +{ NULL, 0x00000001, 62491 }, /* CINVA */ +{ NULL, 0x00000001, 62492 }, /* CINVA */ +{ NULL, 0x00000001, 62493 }, /* CINVA */ +{ NULL, 0x00000001, 62494 }, /* CINVA */ +{ NULL, 0x00000001, 62495 }, /* CINVA */ +{ NULL, 0x00000001, 62504 }, /* CPUSHL */ +{ NULL, 0x00000001, 62512 }, /* CPUSHP */ +{ NULL, 0x00000001, 62520 }, /* CPUSHA */ +{ NULL, 0x00000001, 62521 }, /* CPUSHA */ +{ NULL, 0x00000001, 62522 }, /* CPUSHA */ +{ NULL, 0x00000001, 62523 }, /* CPUSHA */ +{ NULL, 0x00000001, 62524 }, /* CPUSHA */ +{ NULL, 0x00000001, 62525 }, /* CPUSHA */ +{ NULL, 0x00000001, 62526 }, /* CPUSHA */ +{ NULL, 0x00000001, 62527 }, /* CPUSHA */ +{ NULL, 0x00000001, 62720 }, /* PFLUSHN */ +{ NULL, 0x00000001, 62728 }, /* PFLUSH */ +{ NULL, 0x00000001, 62736 }, /* PFLUSHAN */ +{ NULL, 0x00000001, 62744 }, /* PFLUSHA */ +{ NULL, 0x00000001, 62792 }, /* PTESTW */ +{ NULL, 0x00000001, 62824 }, /* PTESTR */ +{ op_f600_0_comp_ff, 0x00000002, 62976 }, /* MOVE16 */ +{ op_f608_0_comp_ff, 0x00000002, 62984 }, /* MOVE16 */ +{ op_f610_0_comp_ff, 0x00000002, 62992 }, /* MOVE16 */ +{ op_f618_0_comp_ff, 0x00000002, 63000 }, /* MOVE16 */ +{ op_f620_0_comp_ff, 0x00000002, 63008 }, /* MOVE16 */ +{ 0, 0,65536 }}; +extern const struct comptbl op_smalltbl_0_comp_nf[] = { +{ op_0_0_comp_nf, 0x00000002, 0 }, /* OR */ +{ op_10_0_comp_nf, 0x00000002, 16 }, /* OR */ +{ op_18_0_comp_nf, 0x00000002, 24 }, /* OR */ +{ op_20_0_comp_nf, 0x00000002, 32 }, /* OR */ +{ op_28_0_comp_nf, 0x00000002, 40 }, /* OR */ +{ op_30_0_comp_nf, 0x00000002, 48 }, /* OR */ +{ op_38_0_comp_nf, 0x00000002, 56 }, /* OR */ +{ op_39_0_comp_nf, 0x00000002, 57 }, /* OR */ +{ op_3c_0_comp_nf, 0x00000002, 60 }, /* ORSR */ +{ op_40_0_comp_nf, 0x00000002, 64 }, /* OR */ +{ op_50_0_comp_nf, 0x00000002, 80 }, /* OR */ +{ op_58_0_comp_nf, 0x00000002, 88 }, /* OR */ +{ op_60_0_comp_nf, 0x00000002, 96 }, /* OR */ +{ op_68_0_comp_nf, 0x00000002, 104 }, /* OR */ +{ op_70_0_comp_nf, 0x00000002, 112 }, /* OR */ +{ op_78_0_comp_nf, 0x00000002, 120 }, /* OR */ +{ op_79_0_comp_nf, 0x00000002, 121 }, /* OR */ +{ NULL, 0x00000002, 124 }, /* ORSR */ +{ op_80_0_comp_nf, 0x00000002, 128 }, /* OR */ +{ op_90_0_comp_nf, 0x00000002, 144 }, /* OR */ +{ op_98_0_comp_nf, 0x00000002, 152 }, /* OR */ +{ op_a0_0_comp_nf, 0x00000002, 160 }, /* OR */ +{ op_a8_0_comp_nf, 0x00000002, 168 }, /* OR */ +{ op_b0_0_comp_nf, 0x00000002, 176 }, /* OR */ +{ op_b8_0_comp_nf, 0x00000002, 184 }, /* OR */ +{ op_b9_0_comp_nf, 0x00000002, 185 }, /* OR */ +{ NULL, 0x00000001, 208 }, /* CHK2 */ +{ NULL, 0x00000001, 232 }, /* CHK2 */ +{ NULL, 0x00000001, 240 }, /* CHK2 */ +{ NULL, 0x00000001, 248 }, /* CHK2 */ +{ NULL, 0x00000001, 249 }, /* CHK2 */ +{ NULL, 0x00000001, 250 }, /* CHK2 */ +{ NULL, 0x00000001, 251 }, /* CHK2 */ +{ op_100_0_comp_nf, 0x00000000, 256 }, /* BTST */ +{ NULL, 0x00000001, 264 }, /* MVPMR */ +{ op_110_0_comp_nf, 0x00000000, 272 }, /* BTST */ +{ op_118_0_comp_nf, 0x00000000, 280 }, /* BTST */ +{ op_120_0_comp_nf, 0x00000000, 288 }, /* BTST */ +{ op_128_0_comp_nf, 0x00000002, 296 }, /* BTST */ +{ op_130_0_comp_nf, 0x00000002, 304 }, /* BTST */ +{ op_138_0_comp_nf, 0x00000002, 312 }, /* BTST */ +{ op_139_0_comp_nf, 0x00000002, 313 }, /* BTST */ +{ op_13a_0_comp_nf, 0x00000002, 314 }, /* BTST */ +{ op_13b_0_comp_nf, 0x00000002, 315 }, /* BTST */ +{ op_13c_0_comp_nf, 0x00000002, 316 }, /* BTST */ +{ op_140_0_comp_nf, 0x00000000, 320 }, /* BCHG */ +{ NULL, 0x00000001, 328 }, /* MVPMR */ +{ op_150_0_comp_nf, 0x00000000, 336 }, /* BCHG */ +{ op_158_0_comp_nf, 0x00000000, 344 }, /* BCHG */ +{ op_160_0_comp_nf, 0x00000000, 352 }, /* BCHG */ +{ op_168_0_comp_nf, 0x00000002, 360 }, /* BCHG */ +{ op_170_0_comp_nf, 0x00000002, 368 }, /* BCHG */ +{ op_178_0_comp_nf, 0x00000002, 376 }, /* BCHG */ +{ op_179_0_comp_nf, 0x00000002, 377 }, /* BCHG */ +{ op_180_0_comp_nf, 0x00000000, 384 }, /* BCLR */ +{ NULL, 0x00000001, 392 }, /* MVPRM */ +{ op_190_0_comp_nf, 0x00000000, 400 }, /* BCLR */ +{ op_198_0_comp_nf, 0x00000000, 408 }, /* BCLR */ +{ op_1a0_0_comp_nf, 0x00000000, 416 }, /* BCLR */ +{ op_1a8_0_comp_nf, 0x00000002, 424 }, /* BCLR */ +{ op_1b0_0_comp_nf, 0x00000002, 432 }, /* BCLR */ +{ op_1b8_0_comp_nf, 0x00000002, 440 }, /* BCLR */ +{ op_1b9_0_comp_nf, 0x00000002, 441 }, /* BCLR */ +{ op_1c0_0_comp_nf, 0x00000000, 448 }, /* BSET */ +{ NULL, 0x00000001, 456 }, /* MVPRM */ +{ op_1d0_0_comp_nf, 0x00000000, 464 }, /* BSET */ +{ op_1d8_0_comp_nf, 0x00000000, 472 }, /* BSET */ +{ op_1e0_0_comp_nf, 0x00000000, 480 }, /* BSET */ +{ op_1e8_0_comp_nf, 0x00000002, 488 }, /* BSET */ +{ op_1f0_0_comp_nf, 0x00000002, 496 }, /* BSET */ +{ op_1f8_0_comp_nf, 0x00000002, 504 }, /* BSET */ +{ op_1f9_0_comp_nf, 0x00000002, 505 }, /* BSET */ +{ op_200_0_comp_nf, 0x00000002, 512 }, /* AND */ +{ op_210_0_comp_nf, 0x00000002, 528 }, /* AND */ +{ op_218_0_comp_nf, 0x00000002, 536 }, /* AND */ +{ op_220_0_comp_nf, 0x00000002, 544 }, /* AND */ +{ op_228_0_comp_nf, 0x00000002, 552 }, /* AND */ +{ op_230_0_comp_nf, 0x00000002, 560 }, /* AND */ +{ op_238_0_comp_nf, 0x00000002, 568 }, /* AND */ +{ op_239_0_comp_nf, 0x00000002, 569 }, /* AND */ +{ op_23c_0_comp_nf, 0x00000002, 572 }, /* ANDSR */ +{ op_240_0_comp_nf, 0x00000002, 576 }, /* AND */ +{ op_250_0_comp_nf, 0x00000002, 592 }, /* AND */ +{ op_258_0_comp_nf, 0x00000002, 600 }, /* AND */ +{ op_260_0_comp_nf, 0x00000002, 608 }, /* AND */ +{ op_268_0_comp_nf, 0x00000002, 616 }, /* AND */ +{ op_270_0_comp_nf, 0x00000002, 624 }, /* AND */ +{ op_278_0_comp_nf, 0x00000002, 632 }, /* AND */ +{ op_279_0_comp_nf, 0x00000002, 633 }, /* AND */ +{ NULL, 0x00000002, 636 }, /* ANDSR */ +{ op_280_0_comp_nf, 0x00000002, 640 }, /* AND */ +{ op_290_0_comp_nf, 0x00000002, 656 }, /* AND */ +{ op_298_0_comp_nf, 0x00000002, 664 }, /* AND */ +{ op_2a0_0_comp_nf, 0x00000002, 672 }, /* AND */ +{ op_2a8_0_comp_nf, 0x00000002, 680 }, /* AND */ +{ op_2b0_0_comp_nf, 0x00000002, 688 }, /* AND */ +{ op_2b8_0_comp_nf, 0x00000002, 696 }, /* AND */ +{ op_2b9_0_comp_nf, 0x00000002, 697 }, /* AND */ +{ NULL, 0x00000001, 720 }, /* CHK2 */ +{ NULL, 0x00000001, 744 }, /* CHK2 */ +{ NULL, 0x00000001, 752 }, /* CHK2 */ +{ NULL, 0x00000001, 760 }, /* CHK2 */ +{ NULL, 0x00000001, 761 }, /* CHK2 */ +{ NULL, 0x00000001, 762 }, /* CHK2 */ +{ NULL, 0x00000001, 763 }, /* CHK2 */ +{ op_400_0_comp_nf, 0x00000002, 1024 }, /* SUB */ +{ op_410_0_comp_nf, 0x00000002, 1040 }, /* SUB */ +{ op_418_0_comp_nf, 0x00000002, 1048 }, /* SUB */ +{ op_420_0_comp_nf, 0x00000002, 1056 }, /* SUB */ +{ op_428_0_comp_nf, 0x00000002, 1064 }, /* SUB */ +{ op_430_0_comp_nf, 0x00000002, 1072 }, /* SUB */ +{ op_438_0_comp_nf, 0x00000002, 1080 }, /* SUB */ +{ op_439_0_comp_nf, 0x00000002, 1081 }, /* SUB */ +{ op_440_0_comp_nf, 0x00000002, 1088 }, /* SUB */ +{ op_450_0_comp_nf, 0x00000002, 1104 }, /* SUB */ +{ op_458_0_comp_nf, 0x00000002, 1112 }, /* SUB */ +{ op_460_0_comp_nf, 0x00000002, 1120 }, /* SUB */ +{ op_468_0_comp_nf, 0x00000002, 1128 }, /* SUB */ +{ op_470_0_comp_nf, 0x00000002, 1136 }, /* SUB */ +{ op_478_0_comp_nf, 0x00000002, 1144 }, /* SUB */ +{ op_479_0_comp_nf, 0x00000002, 1145 }, /* SUB */ +{ op_480_0_comp_nf, 0x00000002, 1152 }, /* SUB */ +{ op_490_0_comp_nf, 0x00000002, 1168 }, /* SUB */ +{ op_498_0_comp_nf, 0x00000002, 1176 }, /* SUB */ +{ op_4a0_0_comp_nf, 0x00000002, 1184 }, /* SUB */ +{ op_4a8_0_comp_nf, 0x00000002, 1192 }, /* SUB */ +{ op_4b0_0_comp_nf, 0x00000002, 1200 }, /* SUB */ +{ op_4b8_0_comp_nf, 0x00000002, 1208 }, /* SUB */ +{ op_4b9_0_comp_nf, 0x00000002, 1209 }, /* SUB */ +{ NULL, 0x00000001, 1232 }, /* CHK2 */ +{ NULL, 0x00000001, 1256 }, /* CHK2 */ +{ NULL, 0x00000001, 1264 }, /* CHK2 */ +{ NULL, 0x00000001, 1272 }, /* CHK2 */ +{ NULL, 0x00000001, 1273 }, /* CHK2 */ +{ NULL, 0x00000001, 1274 }, /* CHK2 */ +{ NULL, 0x00000001, 1275 }, /* CHK2 */ +{ op_600_0_comp_nf, 0x00000002, 1536 }, /* ADD */ +{ op_610_0_comp_nf, 0x00000002, 1552 }, /* ADD */ +{ op_618_0_comp_nf, 0x00000002, 1560 }, /* ADD */ +{ op_620_0_comp_nf, 0x00000002, 1568 }, /* ADD */ +{ op_628_0_comp_nf, 0x00000002, 1576 }, /* ADD */ +{ op_630_0_comp_nf, 0x00000002, 1584 }, /* ADD */ +{ op_638_0_comp_nf, 0x00000002, 1592 }, /* ADD */ +{ op_639_0_comp_nf, 0x00000002, 1593 }, /* ADD */ +{ op_640_0_comp_nf, 0x00000002, 1600 }, /* ADD */ +{ op_650_0_comp_nf, 0x00000002, 1616 }, /* ADD */ +{ op_658_0_comp_nf, 0x00000002, 1624 }, /* ADD */ +{ op_660_0_comp_nf, 0x00000002, 1632 }, /* ADD */ +{ op_668_0_comp_nf, 0x00000002, 1640 }, /* ADD */ +{ op_670_0_comp_nf, 0x00000002, 1648 }, /* ADD */ +{ op_678_0_comp_nf, 0x00000002, 1656 }, /* ADD */ +{ op_679_0_comp_nf, 0x00000002, 1657 }, /* ADD */ +{ op_680_0_comp_nf, 0x00000002, 1664 }, /* ADD */ +{ op_690_0_comp_nf, 0x00000002, 1680 }, /* ADD */ +{ op_698_0_comp_nf, 0x00000002, 1688 }, /* ADD */ +{ op_6a0_0_comp_nf, 0x00000002, 1696 }, /* ADD */ +{ op_6a8_0_comp_nf, 0x00000002, 1704 }, /* ADD */ +{ op_6b0_0_comp_nf, 0x00000002, 1712 }, /* ADD */ +{ op_6b8_0_comp_nf, 0x00000002, 1720 }, /* ADD */ +{ op_6b9_0_comp_nf, 0x00000002, 1721 }, /* ADD */ +{ NULL, 0x00000001, 1728 }, /* RTM */ +{ NULL, 0x00000001, 1736 }, /* RTM */ +{ NULL, 0x00000001, 1744 }, /* CALLM */ +{ NULL, 0x00000001, 1768 }, /* CALLM */ +{ NULL, 0x00000001, 1776 }, /* CALLM */ +{ NULL, 0x00000001, 1784 }, /* CALLM */ +{ NULL, 0x00000001, 1785 }, /* CALLM */ +{ NULL, 0x00000001, 1786 }, /* CALLM */ +{ NULL, 0x00000001, 1787 }, /* CALLM */ +{ op_800_0_comp_nf, 0x00000002, 2048 }, /* BTST */ +{ op_810_0_comp_nf, 0x00000002, 2064 }, /* BTST */ +{ op_818_0_comp_nf, 0x00000002, 2072 }, /* BTST */ +{ op_820_0_comp_nf, 0x00000002, 2080 }, /* BTST */ +{ op_828_0_comp_nf, 0x00000002, 2088 }, /* BTST */ +{ op_830_0_comp_nf, 0x00000002, 2096 }, /* BTST */ +{ op_838_0_comp_nf, 0x00000002, 2104 }, /* BTST */ +{ op_839_0_comp_nf, 0x00000002, 2105 }, /* BTST */ +{ op_83a_0_comp_nf, 0x00000002, 2106 }, /* BTST */ +{ op_83b_0_comp_nf, 0x00000002, 2107 }, /* BTST */ +{ op_840_0_comp_nf, 0x00000002, 2112 }, /* BCHG */ +{ op_850_0_comp_nf, 0x00000002, 2128 }, /* BCHG */ +{ op_858_0_comp_nf, 0x00000002, 2136 }, /* BCHG */ +{ op_860_0_comp_nf, 0x00000002, 2144 }, /* BCHG */ +{ op_868_0_comp_nf, 0x00000002, 2152 }, /* BCHG */ +{ op_870_0_comp_nf, 0x00000002, 2160 }, /* BCHG */ +{ op_878_0_comp_nf, 0x00000002, 2168 }, /* BCHG */ +{ op_879_0_comp_nf, 0x00000002, 2169 }, /* BCHG */ +{ op_880_0_comp_nf, 0x00000002, 2176 }, /* BCLR */ +{ op_890_0_comp_nf, 0x00000002, 2192 }, /* BCLR */ +{ op_898_0_comp_nf, 0x00000002, 2200 }, /* BCLR */ +{ op_8a0_0_comp_nf, 0x00000002, 2208 }, /* BCLR */ +{ op_8a8_0_comp_nf, 0x00000002, 2216 }, /* BCLR */ +{ op_8b0_0_comp_nf, 0x00000002, 2224 }, /* BCLR */ +{ op_8b8_0_comp_nf, 0x00000002, 2232 }, /* BCLR */ +{ op_8b9_0_comp_nf, 0x00000002, 2233 }, /* BCLR */ +{ op_8c0_0_comp_nf, 0x00000002, 2240 }, /* BSET */ +{ op_8d0_0_comp_nf, 0x00000002, 2256 }, /* BSET */ +{ op_8d8_0_comp_nf, 0x00000002, 2264 }, /* BSET */ +{ op_8e0_0_comp_nf, 0x00000002, 2272 }, /* BSET */ +{ op_8e8_0_comp_nf, 0x00000002, 2280 }, /* BSET */ +{ op_8f0_0_comp_nf, 0x00000002, 2288 }, /* BSET */ +{ op_8f8_0_comp_nf, 0x00000002, 2296 }, /* BSET */ +{ op_8f9_0_comp_nf, 0x00000002, 2297 }, /* BSET */ +{ op_a00_0_comp_nf, 0x00000002, 2560 }, /* EOR */ +{ op_a10_0_comp_nf, 0x00000002, 2576 }, /* EOR */ +{ op_a18_0_comp_nf, 0x00000002, 2584 }, /* EOR */ +{ op_a20_0_comp_nf, 0x00000002, 2592 }, /* EOR */ +{ op_a28_0_comp_nf, 0x00000002, 2600 }, /* EOR */ +{ op_a30_0_comp_nf, 0x00000002, 2608 }, /* EOR */ +{ op_a38_0_comp_nf, 0x00000002, 2616 }, /* EOR */ +{ op_a39_0_comp_nf, 0x00000002, 2617 }, /* EOR */ +{ op_a3c_0_comp_nf, 0x00000002, 2620 }, /* EORSR */ +{ op_a40_0_comp_nf, 0x00000002, 2624 }, /* EOR */ +{ op_a50_0_comp_nf, 0x00000002, 2640 }, /* EOR */ +{ op_a58_0_comp_nf, 0x00000002, 2648 }, /* EOR */ +{ op_a60_0_comp_nf, 0x00000002, 2656 }, /* EOR */ +{ op_a68_0_comp_nf, 0x00000002, 2664 }, /* EOR */ +{ op_a70_0_comp_nf, 0x00000002, 2672 }, /* EOR */ +{ op_a78_0_comp_nf, 0x00000002, 2680 }, /* EOR */ +{ op_a79_0_comp_nf, 0x00000002, 2681 }, /* EOR */ +{ NULL, 0x00000002, 2684 }, /* EORSR */ +{ op_a80_0_comp_nf, 0x00000002, 2688 }, /* EOR */ +{ op_a90_0_comp_nf, 0x00000002, 2704 }, /* EOR */ +{ op_a98_0_comp_nf, 0x00000002, 2712 }, /* EOR */ +{ op_aa0_0_comp_nf, 0x00000002, 2720 }, /* EOR */ +{ op_aa8_0_comp_nf, 0x00000002, 2728 }, /* EOR */ +{ op_ab0_0_comp_nf, 0x00000002, 2736 }, /* EOR */ +{ op_ab8_0_comp_nf, 0x00000002, 2744 }, /* EOR */ +{ op_ab9_0_comp_nf, 0x00000002, 2745 }, /* EOR */ +{ NULL, 0x00000000, 2768 }, /* CAS */ +{ NULL, 0x00000000, 2776 }, /* CAS */ +{ NULL, 0x00000000, 2784 }, /* CAS */ +{ NULL, 0x00000000, 2792 }, /* CAS */ +{ NULL, 0x00000000, 2800 }, /* CAS */ +{ NULL, 0x00000000, 2808 }, /* CAS */ +{ NULL, 0x00000000, 2809 }, /* CAS */ +{ op_c00_0_comp_nf, 0x00000002, 3072 }, /* CMP */ +{ op_c10_0_comp_nf, 0x00000002, 3088 }, /* CMP */ +{ op_c18_0_comp_nf, 0x00000002, 3096 }, /* CMP */ +{ op_c20_0_comp_nf, 0x00000002, 3104 }, /* CMP */ +{ op_c28_0_comp_nf, 0x00000002, 3112 }, /* CMP */ +{ op_c30_0_comp_nf, 0x00000002, 3120 }, /* CMP */ +{ op_c38_0_comp_nf, 0x00000002, 3128 }, /* CMP */ +{ op_c39_0_comp_nf, 0x00000002, 3129 }, /* CMP */ +{ op_c3a_0_comp_nf, 0x00000002, 3130 }, /* CMP */ +{ op_c3b_0_comp_nf, 0x00000002, 3131 }, /* CMP */ +{ op_c40_0_comp_nf, 0x00000002, 3136 }, /* CMP */ +{ op_c50_0_comp_nf, 0x00000002, 3152 }, /* CMP */ +{ op_c58_0_comp_nf, 0x00000002, 3160 }, /* CMP */ +{ op_c60_0_comp_nf, 0x00000002, 3168 }, /* CMP */ +{ op_c68_0_comp_nf, 0x00000002, 3176 }, /* CMP */ +{ op_c70_0_comp_nf, 0x00000002, 3184 }, /* CMP */ +{ op_c78_0_comp_nf, 0x00000002, 3192 }, /* CMP */ +{ op_c79_0_comp_nf, 0x00000002, 3193 }, /* CMP */ +{ op_c7a_0_comp_nf, 0x00000002, 3194 }, /* CMP */ +{ op_c7b_0_comp_nf, 0x00000002, 3195 }, /* CMP */ +{ op_c80_0_comp_nf, 0x00000002, 3200 }, /* CMP */ +{ op_c90_0_comp_nf, 0x00000002, 3216 }, /* CMP */ +{ op_c98_0_comp_nf, 0x00000002, 3224 }, /* CMP */ +{ op_ca0_0_comp_nf, 0x00000002, 3232 }, /* CMP */ +{ op_ca8_0_comp_nf, 0x00000002, 3240 }, /* CMP */ +{ op_cb0_0_comp_nf, 0x00000002, 3248 }, /* CMP */ +{ op_cb8_0_comp_nf, 0x00000002, 3256 }, /* CMP */ +{ op_cb9_0_comp_nf, 0x00000002, 3257 }, /* CMP */ +{ op_cba_0_comp_nf, 0x00000002, 3258 }, /* CMP */ +{ op_cbb_0_comp_nf, 0x00000002, 3259 }, /* CMP */ +{ NULL, 0x00000000, 3280 }, /* CAS */ +{ NULL, 0x00000000, 3288 }, /* CAS */ +{ NULL, 0x00000000, 3296 }, /* CAS */ +{ NULL, 0x00000000, 3304 }, /* CAS */ +{ NULL, 0x00000000, 3312 }, /* CAS */ +{ NULL, 0x00000000, 3320 }, /* CAS */ +{ NULL, 0x00000000, 3321 }, /* CAS */ +{ NULL, 0x00000000, 3324 }, /* CAS2 */ +{ NULL, 0x00000001, 3600 }, /* MOVES */ +{ NULL, 0x00000001, 3608 }, /* MOVES */ +{ NULL, 0x00000001, 3616 }, /* MOVES */ +{ NULL, 0x00000001, 3624 }, /* MOVES */ +{ NULL, 0x00000001, 3632 }, /* MOVES */ +{ NULL, 0x00000001, 3640 }, /* MOVES */ +{ NULL, 0x00000001, 3641 }, /* MOVES */ +{ NULL, 0x00000001, 3664 }, /* MOVES */ +{ NULL, 0x00000001, 3672 }, /* MOVES */ +{ NULL, 0x00000001, 3680 }, /* MOVES */ +{ NULL, 0x00000001, 3688 }, /* MOVES */ +{ NULL, 0x00000001, 3696 }, /* MOVES */ +{ NULL, 0x00000001, 3704 }, /* MOVES */ +{ NULL, 0x00000001, 3705 }, /* MOVES */ +{ NULL, 0x00000001, 3728 }, /* MOVES */ +{ NULL, 0x00000001, 3736 }, /* MOVES */ +{ NULL, 0x00000001, 3744 }, /* MOVES */ +{ NULL, 0x00000001, 3752 }, /* MOVES */ +{ NULL, 0x00000001, 3760 }, /* MOVES */ +{ NULL, 0x00000001, 3768 }, /* MOVES */ +{ NULL, 0x00000001, 3769 }, /* MOVES */ +{ NULL, 0x00000000, 3792 }, /* CAS */ +{ NULL, 0x00000000, 3800 }, /* CAS */ +{ NULL, 0x00000000, 3808 }, /* CAS */ +{ NULL, 0x00000000, 3816 }, /* CAS */ +{ NULL, 0x00000000, 3824 }, /* CAS */ +{ NULL, 0x00000000, 3832 }, /* CAS */ +{ NULL, 0x00000000, 3833 }, /* CAS */ +{ NULL, 0x00000000, 3836 }, /* CAS2 */ +{ op_1000_0_comp_nf, 0x00000000, 4096 }, /* MOVE */ +{ op_1010_0_comp_nf, 0x00000000, 4112 }, /* MOVE */ +{ op_1018_0_comp_nf, 0x00000000, 4120 }, /* MOVE */ +{ op_1020_0_comp_nf, 0x00000000, 4128 }, /* MOVE */ +{ op_1028_0_comp_nf, 0x00000002, 4136 }, /* MOVE */ +{ op_1030_0_comp_nf, 0x00000002, 4144 }, /* MOVE */ +{ op_1038_0_comp_nf, 0x00000002, 4152 }, /* MOVE */ +{ op_1039_0_comp_nf, 0x00000002, 4153 }, /* MOVE */ +{ op_103a_0_comp_nf, 0x00000002, 4154 }, /* MOVE */ +{ op_103b_0_comp_nf, 0x00000002, 4155 }, /* MOVE */ +{ op_103c_0_comp_nf, 0x00000002, 4156 }, /* MOVE */ +{ op_1080_0_comp_nf, 0x00000000, 4224 }, /* MOVE */ +{ op_1090_0_comp_nf, 0x00000000, 4240 }, /* MOVE */ +{ op_1098_0_comp_nf, 0x00000000, 4248 }, /* MOVE */ +{ op_10a0_0_comp_nf, 0x00000000, 4256 }, /* MOVE */ +{ op_10a8_0_comp_nf, 0x00000002, 4264 }, /* MOVE */ +{ op_10b0_0_comp_nf, 0x00000002, 4272 }, /* MOVE */ +{ op_10b8_0_comp_nf, 0x00000002, 4280 }, /* MOVE */ +{ op_10b9_0_comp_nf, 0x00000002, 4281 }, /* MOVE */ +{ op_10ba_0_comp_nf, 0x00000002, 4282 }, /* MOVE */ +{ op_10bb_0_comp_nf, 0x00000002, 4283 }, /* MOVE */ +{ op_10bc_0_comp_nf, 0x00000002, 4284 }, /* MOVE */ +{ op_10c0_0_comp_nf, 0x00000000, 4288 }, /* MOVE */ +{ op_10d0_0_comp_nf, 0x00000000, 4304 }, /* MOVE */ +{ op_10d8_0_comp_nf, 0x00000000, 4312 }, /* MOVE */ +{ op_10e0_0_comp_nf, 0x00000000, 4320 }, /* MOVE */ +{ op_10e8_0_comp_nf, 0x00000002, 4328 }, /* MOVE */ +{ op_10f0_0_comp_nf, 0x00000002, 4336 }, /* MOVE */ +{ op_10f8_0_comp_nf, 0x00000002, 4344 }, /* MOVE */ +{ op_10f9_0_comp_nf, 0x00000002, 4345 }, /* MOVE */ +{ op_10fa_0_comp_nf, 0x00000002, 4346 }, /* MOVE */ +{ op_10fb_0_comp_nf, 0x00000002, 4347 }, /* MOVE */ +{ op_10fc_0_comp_nf, 0x00000002, 4348 }, /* MOVE */ +{ op_1100_0_comp_nf, 0x00000000, 4352 }, /* MOVE */ +{ op_1110_0_comp_nf, 0x00000000, 4368 }, /* MOVE */ +{ op_1118_0_comp_nf, 0x00000000, 4376 }, /* MOVE */ +{ op_1120_0_comp_nf, 0x00000000, 4384 }, /* MOVE */ +{ op_1128_0_comp_nf, 0x00000002, 4392 }, /* MOVE */ +{ op_1130_0_comp_nf, 0x00000002, 4400 }, /* MOVE */ +{ op_1138_0_comp_nf, 0x00000002, 4408 }, /* MOVE */ +{ op_1139_0_comp_nf, 0x00000002, 4409 }, /* MOVE */ +{ op_113a_0_comp_nf, 0x00000002, 4410 }, /* MOVE */ +{ op_113b_0_comp_nf, 0x00000002, 4411 }, /* MOVE */ +{ op_113c_0_comp_nf, 0x00000002, 4412 }, /* MOVE */ +{ op_1140_0_comp_nf, 0x00000002, 4416 }, /* MOVE */ +{ op_1150_0_comp_nf, 0x00000002, 4432 }, /* MOVE */ +{ op_1158_0_comp_nf, 0x00000002, 4440 }, /* MOVE */ +{ op_1160_0_comp_nf, 0x00000002, 4448 }, /* MOVE */ +{ op_1168_0_comp_nf, 0x00000002, 4456 }, /* MOVE */ +{ op_1170_0_comp_nf, 0x00000002, 4464 }, /* MOVE */ +{ op_1178_0_comp_nf, 0x00000002, 4472 }, /* MOVE */ +{ op_1179_0_comp_nf, 0x00000002, 4473 }, /* MOVE */ +{ op_117a_0_comp_nf, 0x00000002, 4474 }, /* MOVE */ +{ op_117b_0_comp_nf, 0x00000002, 4475 }, /* MOVE */ +{ op_117c_0_comp_nf, 0x00000002, 4476 }, /* MOVE */ +{ op_1180_0_comp_nf, 0x00000002, 4480 }, /* MOVE */ +{ op_1190_0_comp_nf, 0x00000002, 4496 }, /* MOVE */ +{ op_1198_0_comp_nf, 0x00000002, 4504 }, /* MOVE */ +{ op_11a0_0_comp_nf, 0x00000002, 4512 }, /* MOVE */ +{ op_11a8_0_comp_nf, 0x00000002, 4520 }, /* MOVE */ +{ op_11b0_0_comp_nf, 0x00000002, 4528 }, /* MOVE */ +{ op_11b8_0_comp_nf, 0x00000002, 4536 }, /* MOVE */ +{ op_11b9_0_comp_nf, 0x00000002, 4537 }, /* MOVE */ +{ op_11ba_0_comp_nf, 0x00000002, 4538 }, /* MOVE */ +{ op_11bb_0_comp_nf, 0x00000002, 4539 }, /* MOVE */ +{ op_11bc_0_comp_nf, 0x00000002, 4540 }, /* MOVE */ +{ op_11c0_0_comp_nf, 0x00000002, 4544 }, /* MOVE */ +{ op_11d0_0_comp_nf, 0x00000002, 4560 }, /* MOVE */ +{ op_11d8_0_comp_nf, 0x00000002, 4568 }, /* MOVE */ +{ op_11e0_0_comp_nf, 0x00000002, 4576 }, /* MOVE */ +{ op_11e8_0_comp_nf, 0x00000002, 4584 }, /* MOVE */ +{ op_11f0_0_comp_nf, 0x00000002, 4592 }, /* MOVE */ +{ op_11f8_0_comp_nf, 0x00000002, 4600 }, /* MOVE */ +{ op_11f9_0_comp_nf, 0x00000002, 4601 }, /* MOVE */ +{ op_11fa_0_comp_nf, 0x00000002, 4602 }, /* MOVE */ +{ op_11fb_0_comp_nf, 0x00000002, 4603 }, /* MOVE */ +{ op_11fc_0_comp_nf, 0x00000002, 4604 }, /* MOVE */ +{ op_13c0_0_comp_nf, 0x00000002, 5056 }, /* MOVE */ +{ op_13d0_0_comp_nf, 0x00000002, 5072 }, /* MOVE */ +{ op_13d8_0_comp_nf, 0x00000002, 5080 }, /* MOVE */ +{ op_13e0_0_comp_nf, 0x00000002, 5088 }, /* MOVE */ +{ op_13e8_0_comp_nf, 0x00000002, 5096 }, /* MOVE */ +{ op_13f0_0_comp_nf, 0x00000002, 5104 }, /* MOVE */ +{ op_13f8_0_comp_nf, 0x00000002, 5112 }, /* MOVE */ +{ op_13f9_0_comp_nf, 0x00000002, 5113 }, /* MOVE */ +{ op_13fa_0_comp_nf, 0x00000002, 5114 }, /* MOVE */ +{ op_13fb_0_comp_nf, 0x00000002, 5115 }, /* MOVE */ +{ op_13fc_0_comp_nf, 0x00000002, 5116 }, /* MOVE */ +{ op_2000_0_comp_nf, 0x00000000, 8192 }, /* MOVE */ +{ op_2008_0_comp_nf, 0x00000000, 8200 }, /* MOVE */ +{ op_2010_0_comp_nf, 0x00000000, 8208 }, /* MOVE */ +{ op_2018_0_comp_nf, 0x00000000, 8216 }, /* MOVE */ +{ op_2020_0_comp_nf, 0x00000000, 8224 }, /* MOVE */ +{ op_2028_0_comp_nf, 0x00000002, 8232 }, /* MOVE */ +{ op_2030_0_comp_nf, 0x00000002, 8240 }, /* MOVE */ +{ op_2038_0_comp_nf, 0x00000002, 8248 }, /* MOVE */ +{ op_2039_0_comp_nf, 0x00000002, 8249 }, /* MOVE */ +{ op_203a_0_comp_nf, 0x00000002, 8250 }, /* MOVE */ +{ op_203b_0_comp_nf, 0x00000002, 8251 }, /* MOVE */ +{ op_203c_0_comp_nf, 0x00000002, 8252 }, /* MOVE */ +{ op_2040_0_comp_nf, 0x00000000, 8256 }, /* MOVEA */ +{ op_2048_0_comp_nf, 0x00000000, 8264 }, /* MOVEA */ +{ op_2050_0_comp_nf, 0x00000000, 8272 }, /* MOVEA */ +{ op_2058_0_comp_nf, 0x00000000, 8280 }, /* MOVEA */ +{ op_2060_0_comp_nf, 0x00000000, 8288 }, /* MOVEA */ +{ op_2068_0_comp_nf, 0x00000002, 8296 }, /* MOVEA */ +{ op_2070_0_comp_nf, 0x00000002, 8304 }, /* MOVEA */ +{ op_2078_0_comp_nf, 0x00000002, 8312 }, /* MOVEA */ +{ op_2079_0_comp_nf, 0x00000002, 8313 }, /* MOVEA */ +{ op_207a_0_comp_nf, 0x00000002, 8314 }, /* MOVEA */ +{ op_207b_0_comp_nf, 0x00000002, 8315 }, /* MOVEA */ +{ op_207c_0_comp_nf, 0x00000002, 8316 }, /* MOVEA */ +{ op_2080_0_comp_nf, 0x00000000, 8320 }, /* MOVE */ +{ op_2088_0_comp_nf, 0x00000000, 8328 }, /* MOVE */ +{ op_2090_0_comp_nf, 0x00000000, 8336 }, /* MOVE */ +{ op_2098_0_comp_nf, 0x00000000, 8344 }, /* MOVE */ +{ op_20a0_0_comp_nf, 0x00000000, 8352 }, /* MOVE */ +{ op_20a8_0_comp_nf, 0x00000002, 8360 }, /* MOVE */ +{ op_20b0_0_comp_nf, 0x00000002, 8368 }, /* MOVE */ +{ op_20b8_0_comp_nf, 0x00000002, 8376 }, /* MOVE */ +{ op_20b9_0_comp_nf, 0x00000002, 8377 }, /* MOVE */ +{ op_20ba_0_comp_nf, 0x00000002, 8378 }, /* MOVE */ +{ op_20bb_0_comp_nf, 0x00000002, 8379 }, /* MOVE */ +{ op_20bc_0_comp_nf, 0x00000002, 8380 }, /* MOVE */ +{ op_20c0_0_comp_nf, 0x00000000, 8384 }, /* MOVE */ +{ op_20c8_0_comp_nf, 0x00000000, 8392 }, /* MOVE */ +{ op_20d0_0_comp_nf, 0x00000000, 8400 }, /* MOVE */ +{ op_20d8_0_comp_nf, 0x00000000, 8408 }, /* MOVE */ +{ op_20e0_0_comp_nf, 0x00000000, 8416 }, /* MOVE */ +{ op_20e8_0_comp_nf, 0x00000002, 8424 }, /* MOVE */ +{ op_20f0_0_comp_nf, 0x00000002, 8432 }, /* MOVE */ +{ op_20f8_0_comp_nf, 0x00000002, 8440 }, /* MOVE */ +{ op_20f9_0_comp_nf, 0x00000002, 8441 }, /* MOVE */ +{ op_20fa_0_comp_nf, 0x00000002, 8442 }, /* MOVE */ +{ op_20fb_0_comp_nf, 0x00000002, 8443 }, /* MOVE */ +{ op_20fc_0_comp_nf, 0x00000002, 8444 }, /* MOVE */ +{ op_2100_0_comp_nf, 0x00000000, 8448 }, /* MOVE */ +{ op_2108_0_comp_nf, 0x00000000, 8456 }, /* MOVE */ +{ op_2110_0_comp_nf, 0x00000000, 8464 }, /* MOVE */ +{ op_2118_0_comp_nf, 0x00000000, 8472 }, /* MOVE */ +{ op_2120_0_comp_nf, 0x00000000, 8480 }, /* MOVE */ +{ op_2128_0_comp_nf, 0x00000002, 8488 }, /* MOVE */ +{ op_2130_0_comp_nf, 0x00000002, 8496 }, /* MOVE */ +{ op_2138_0_comp_nf, 0x00000002, 8504 }, /* MOVE */ +{ op_2139_0_comp_nf, 0x00000002, 8505 }, /* MOVE */ +{ op_213a_0_comp_nf, 0x00000002, 8506 }, /* MOVE */ +{ op_213b_0_comp_nf, 0x00000002, 8507 }, /* MOVE */ +{ op_213c_0_comp_nf, 0x00000002, 8508 }, /* MOVE */ +{ op_2140_0_comp_nf, 0x00000002, 8512 }, /* MOVE */ +{ op_2148_0_comp_nf, 0x00000002, 8520 }, /* MOVE */ +{ op_2150_0_comp_nf, 0x00000002, 8528 }, /* MOVE */ +{ op_2158_0_comp_nf, 0x00000002, 8536 }, /* MOVE */ +{ op_2160_0_comp_nf, 0x00000002, 8544 }, /* MOVE */ +{ op_2168_0_comp_nf, 0x00000002, 8552 }, /* MOVE */ +{ op_2170_0_comp_nf, 0x00000002, 8560 }, /* MOVE */ +{ op_2178_0_comp_nf, 0x00000002, 8568 }, /* MOVE */ +{ op_2179_0_comp_nf, 0x00000002, 8569 }, /* MOVE */ +{ op_217a_0_comp_nf, 0x00000002, 8570 }, /* MOVE */ +{ op_217b_0_comp_nf, 0x00000002, 8571 }, /* MOVE */ +{ op_217c_0_comp_nf, 0x00000002, 8572 }, /* MOVE */ +{ op_2180_0_comp_nf, 0x00000002, 8576 }, /* MOVE */ +{ op_2188_0_comp_nf, 0x00000002, 8584 }, /* MOVE */ +{ op_2190_0_comp_nf, 0x00000002, 8592 }, /* MOVE */ +{ op_2198_0_comp_nf, 0x00000002, 8600 }, /* MOVE */ +{ op_21a0_0_comp_nf, 0x00000002, 8608 }, /* MOVE */ +{ op_21a8_0_comp_nf, 0x00000002, 8616 }, /* MOVE */ +{ op_21b0_0_comp_nf, 0x00000002, 8624 }, /* MOVE */ +{ op_21b8_0_comp_nf, 0x00000002, 8632 }, /* MOVE */ +{ op_21b9_0_comp_nf, 0x00000002, 8633 }, /* MOVE */ +{ op_21ba_0_comp_nf, 0x00000002, 8634 }, /* MOVE */ +{ op_21bb_0_comp_nf, 0x00000002, 8635 }, /* MOVE */ +{ op_21bc_0_comp_nf, 0x00000002, 8636 }, /* MOVE */ +{ op_21c0_0_comp_nf, 0x00000002, 8640 }, /* MOVE */ +{ op_21c8_0_comp_nf, 0x00000002, 8648 }, /* MOVE */ +{ op_21d0_0_comp_nf, 0x00000002, 8656 }, /* MOVE */ +{ op_21d8_0_comp_nf, 0x00000002, 8664 }, /* MOVE */ +{ op_21e0_0_comp_nf, 0x00000002, 8672 }, /* MOVE */ +{ op_21e8_0_comp_nf, 0x00000002, 8680 }, /* MOVE */ +{ op_21f0_0_comp_nf, 0x00000002, 8688 }, /* MOVE */ +{ op_21f8_0_comp_nf, 0x00000002, 8696 }, /* MOVE */ +{ op_21f9_0_comp_nf, 0x00000002, 8697 }, /* MOVE */ +{ op_21fa_0_comp_nf, 0x00000002, 8698 }, /* MOVE */ +{ op_21fb_0_comp_nf, 0x00000002, 8699 }, /* MOVE */ +{ op_21fc_0_comp_nf, 0x00000002, 8700 }, /* MOVE */ +{ op_23c0_0_comp_nf, 0x00000002, 9152 }, /* MOVE */ +{ op_23c8_0_comp_nf, 0x00000002, 9160 }, /* MOVE */ +{ op_23d0_0_comp_nf, 0x00000002, 9168 }, /* MOVE */ +{ op_23d8_0_comp_nf, 0x00000002, 9176 }, /* MOVE */ +{ op_23e0_0_comp_nf, 0x00000002, 9184 }, /* MOVE */ +{ op_23e8_0_comp_nf, 0x00000002, 9192 }, /* MOVE */ +{ op_23f0_0_comp_nf, 0x00000002, 9200 }, /* MOVE */ +{ op_23f8_0_comp_nf, 0x00000002, 9208 }, /* MOVE */ +{ op_23f9_0_comp_nf, 0x00000002, 9209 }, /* MOVE */ +{ op_23fa_0_comp_nf, 0x00000002, 9210 }, /* MOVE */ +{ op_23fb_0_comp_nf, 0x00000002, 9211 }, /* MOVE */ +{ op_23fc_0_comp_nf, 0x00000002, 9212 }, /* MOVE */ +{ op_3000_0_comp_nf, 0x00000000, 12288 }, /* MOVE */ +{ op_3008_0_comp_nf, 0x00000000, 12296 }, /* MOVE */ +{ op_3010_0_comp_nf, 0x00000000, 12304 }, /* MOVE */ +{ op_3018_0_comp_nf, 0x00000000, 12312 }, /* MOVE */ +{ op_3020_0_comp_nf, 0x00000000, 12320 }, /* MOVE */ +{ op_3028_0_comp_nf, 0x00000002, 12328 }, /* MOVE */ +{ op_3030_0_comp_nf, 0x00000002, 12336 }, /* MOVE */ +{ op_3038_0_comp_nf, 0x00000002, 12344 }, /* MOVE */ +{ op_3039_0_comp_nf, 0x00000002, 12345 }, /* MOVE */ +{ op_303a_0_comp_nf, 0x00000002, 12346 }, /* MOVE */ +{ op_303b_0_comp_nf, 0x00000002, 12347 }, /* MOVE */ +{ op_303c_0_comp_nf, 0x00000002, 12348 }, /* MOVE */ +{ op_3040_0_comp_nf, 0x00000000, 12352 }, /* MOVEA */ +{ op_3048_0_comp_nf, 0x00000000, 12360 }, /* MOVEA */ +{ op_3050_0_comp_nf, 0x00000000, 12368 }, /* MOVEA */ +{ op_3058_0_comp_nf, 0x00000000, 12376 }, /* MOVEA */ +{ op_3060_0_comp_nf, 0x00000000, 12384 }, /* MOVEA */ +{ op_3068_0_comp_nf, 0x00000002, 12392 }, /* MOVEA */ +{ op_3070_0_comp_nf, 0x00000002, 12400 }, /* MOVEA */ +{ op_3078_0_comp_nf, 0x00000002, 12408 }, /* MOVEA */ +{ op_3079_0_comp_nf, 0x00000002, 12409 }, /* MOVEA */ +{ op_307a_0_comp_nf, 0x00000002, 12410 }, /* MOVEA */ +{ op_307b_0_comp_nf, 0x00000002, 12411 }, /* MOVEA */ +{ op_307c_0_comp_nf, 0x00000002, 12412 }, /* MOVEA */ +{ op_3080_0_comp_nf, 0x00000000, 12416 }, /* MOVE */ +{ op_3088_0_comp_nf, 0x00000000, 12424 }, /* MOVE */ +{ op_3090_0_comp_nf, 0x00000000, 12432 }, /* MOVE */ +{ op_3098_0_comp_nf, 0x00000000, 12440 }, /* MOVE */ +{ op_30a0_0_comp_nf, 0x00000000, 12448 }, /* MOVE */ +{ op_30a8_0_comp_nf, 0x00000002, 12456 }, /* MOVE */ +{ op_30b0_0_comp_nf, 0x00000002, 12464 }, /* MOVE */ +{ op_30b8_0_comp_nf, 0x00000002, 12472 }, /* MOVE */ +{ op_30b9_0_comp_nf, 0x00000002, 12473 }, /* MOVE */ +{ op_30ba_0_comp_nf, 0x00000002, 12474 }, /* MOVE */ +{ op_30bb_0_comp_nf, 0x00000002, 12475 }, /* MOVE */ +{ op_30bc_0_comp_nf, 0x00000002, 12476 }, /* MOVE */ +{ op_30c0_0_comp_nf, 0x00000000, 12480 }, /* MOVE */ +{ op_30c8_0_comp_nf, 0x00000000, 12488 }, /* MOVE */ +{ op_30d0_0_comp_nf, 0x00000000, 12496 }, /* MOVE */ +{ op_30d8_0_comp_nf, 0x00000000, 12504 }, /* MOVE */ +{ op_30e0_0_comp_nf, 0x00000000, 12512 }, /* MOVE */ +{ op_30e8_0_comp_nf, 0x00000002, 12520 }, /* MOVE */ +{ op_30f0_0_comp_nf, 0x00000002, 12528 }, /* MOVE */ +{ op_30f8_0_comp_nf, 0x00000002, 12536 }, /* MOVE */ +{ op_30f9_0_comp_nf, 0x00000002, 12537 }, /* MOVE */ +{ op_30fa_0_comp_nf, 0x00000002, 12538 }, /* MOVE */ +{ op_30fb_0_comp_nf, 0x00000002, 12539 }, /* MOVE */ +{ op_30fc_0_comp_nf, 0x00000002, 12540 }, /* MOVE */ +{ op_3100_0_comp_nf, 0x00000000, 12544 }, /* MOVE */ +{ op_3108_0_comp_nf, 0x00000000, 12552 }, /* MOVE */ +{ op_3110_0_comp_nf, 0x00000000, 12560 }, /* MOVE */ +{ op_3118_0_comp_nf, 0x00000000, 12568 }, /* MOVE */ +{ op_3120_0_comp_nf, 0x00000000, 12576 }, /* MOVE */ +{ op_3128_0_comp_nf, 0x00000002, 12584 }, /* MOVE */ +{ op_3130_0_comp_nf, 0x00000002, 12592 }, /* MOVE */ +{ op_3138_0_comp_nf, 0x00000002, 12600 }, /* MOVE */ +{ op_3139_0_comp_nf, 0x00000002, 12601 }, /* MOVE */ +{ op_313a_0_comp_nf, 0x00000002, 12602 }, /* MOVE */ +{ op_313b_0_comp_nf, 0x00000002, 12603 }, /* MOVE */ +{ op_313c_0_comp_nf, 0x00000002, 12604 }, /* MOVE */ +{ op_3140_0_comp_nf, 0x00000002, 12608 }, /* MOVE */ +{ op_3148_0_comp_nf, 0x00000002, 12616 }, /* MOVE */ +{ op_3150_0_comp_nf, 0x00000002, 12624 }, /* MOVE */ +{ op_3158_0_comp_nf, 0x00000002, 12632 }, /* MOVE */ +{ op_3160_0_comp_nf, 0x00000002, 12640 }, /* MOVE */ +{ op_3168_0_comp_nf, 0x00000002, 12648 }, /* MOVE */ +{ op_3170_0_comp_nf, 0x00000002, 12656 }, /* MOVE */ +{ op_3178_0_comp_nf, 0x00000002, 12664 }, /* MOVE */ +{ op_3179_0_comp_nf, 0x00000002, 12665 }, /* MOVE */ +{ op_317a_0_comp_nf, 0x00000002, 12666 }, /* MOVE */ +{ op_317b_0_comp_nf, 0x00000002, 12667 }, /* MOVE */ +{ op_317c_0_comp_nf, 0x00000002, 12668 }, /* MOVE */ +{ op_3180_0_comp_nf, 0x00000002, 12672 }, /* MOVE */ +{ op_3188_0_comp_nf, 0x00000002, 12680 }, /* MOVE */ +{ op_3190_0_comp_nf, 0x00000002, 12688 }, /* MOVE */ +{ op_3198_0_comp_nf, 0x00000002, 12696 }, /* MOVE */ +{ op_31a0_0_comp_nf, 0x00000002, 12704 }, /* MOVE */ +{ op_31a8_0_comp_nf, 0x00000002, 12712 }, /* MOVE */ +{ op_31b0_0_comp_nf, 0x00000002, 12720 }, /* MOVE */ +{ op_31b8_0_comp_nf, 0x00000002, 12728 }, /* MOVE */ +{ op_31b9_0_comp_nf, 0x00000002, 12729 }, /* MOVE */ +{ op_31ba_0_comp_nf, 0x00000002, 12730 }, /* MOVE */ +{ op_31bb_0_comp_nf, 0x00000002, 12731 }, /* MOVE */ +{ op_31bc_0_comp_nf, 0x00000002, 12732 }, /* MOVE */ +{ op_31c0_0_comp_nf, 0x00000002, 12736 }, /* MOVE */ +{ op_31c8_0_comp_nf, 0x00000002, 12744 }, /* MOVE */ +{ op_31d0_0_comp_nf, 0x00000002, 12752 }, /* MOVE */ +{ op_31d8_0_comp_nf, 0x00000002, 12760 }, /* MOVE */ +{ op_31e0_0_comp_nf, 0x00000002, 12768 }, /* MOVE */ +{ op_31e8_0_comp_nf, 0x00000002, 12776 }, /* MOVE */ +{ op_31f0_0_comp_nf, 0x00000002, 12784 }, /* MOVE */ +{ op_31f8_0_comp_nf, 0x00000002, 12792 }, /* MOVE */ +{ op_31f9_0_comp_nf, 0x00000002, 12793 }, /* MOVE */ +{ op_31fa_0_comp_nf, 0x00000002, 12794 }, /* MOVE */ +{ op_31fb_0_comp_nf, 0x00000002, 12795 }, /* MOVE */ +{ op_31fc_0_comp_nf, 0x00000002, 12796 }, /* MOVE */ +{ op_33c0_0_comp_nf, 0x00000002, 13248 }, /* MOVE */ +{ op_33c8_0_comp_nf, 0x00000002, 13256 }, /* MOVE */ +{ op_33d0_0_comp_nf, 0x00000002, 13264 }, /* MOVE */ +{ op_33d8_0_comp_nf, 0x00000002, 13272 }, /* MOVE */ +{ op_33e0_0_comp_nf, 0x00000002, 13280 }, /* MOVE */ +{ op_33e8_0_comp_nf, 0x00000002, 13288 }, /* MOVE */ +{ op_33f0_0_comp_nf, 0x00000002, 13296 }, /* MOVE */ +{ op_33f8_0_comp_nf, 0x00000002, 13304 }, /* MOVE */ +{ op_33f9_0_comp_nf, 0x00000002, 13305 }, /* MOVE */ +{ op_33fa_0_comp_nf, 0x00000002, 13306 }, /* MOVE */ +{ op_33fb_0_comp_nf, 0x00000002, 13307 }, /* MOVE */ +{ op_33fc_0_comp_nf, 0x00000002, 13308 }, /* MOVE */ +{ op_4000_0_comp_nf, 0x00000008, 16384 }, /* NEGX */ +{ op_4010_0_comp_nf, 0x00000008, 16400 }, /* NEGX */ +{ op_4018_0_comp_nf, 0x00000008, 16408 }, /* NEGX */ +{ op_4020_0_comp_nf, 0x00000008, 16416 }, /* NEGX */ +{ op_4028_0_comp_nf, 0x0000000a, 16424 }, /* NEGX */ +{ op_4030_0_comp_nf, 0x0000000a, 16432 }, /* NEGX */ +{ op_4038_0_comp_nf, 0x0000000a, 16440 }, /* NEGX */ +{ op_4039_0_comp_nf, 0x0000000a, 16441 }, /* NEGX */ +{ op_4040_0_comp_nf, 0x00000008, 16448 }, /* NEGX */ +{ op_4050_0_comp_nf, 0x00000008, 16464 }, /* NEGX */ +{ op_4058_0_comp_nf, 0x00000008, 16472 }, /* NEGX */ +{ op_4060_0_comp_nf, 0x00000008, 16480 }, /* NEGX */ +{ op_4068_0_comp_nf, 0x0000000a, 16488 }, /* NEGX */ +{ op_4070_0_comp_nf, 0x0000000a, 16496 }, /* NEGX */ +{ op_4078_0_comp_nf, 0x0000000a, 16504 }, /* NEGX */ +{ op_4079_0_comp_nf, 0x0000000a, 16505 }, /* NEGX */ +{ op_4080_0_comp_nf, 0x00000008, 16512 }, /* NEGX */ +{ op_4090_0_comp_nf, 0x00000008, 16528 }, /* NEGX */ +{ op_4098_0_comp_nf, 0x00000008, 16536 }, /* NEGX */ +{ op_40a0_0_comp_nf, 0x00000008, 16544 }, /* NEGX */ +{ op_40a8_0_comp_nf, 0x0000000a, 16552 }, /* NEGX */ +{ op_40b0_0_comp_nf, 0x0000000a, 16560 }, /* NEGX */ +{ op_40b8_0_comp_nf, 0x0000000a, 16568 }, /* NEGX */ +{ op_40b9_0_comp_nf, 0x0000000a, 16569 }, /* NEGX */ +{ NULL, 0x00000001, 16576 }, /* MVSR2 */ +{ NULL, 0x00000001, 16592 }, /* MVSR2 */ +{ NULL, 0x00000001, 16600 }, /* MVSR2 */ +{ NULL, 0x00000001, 16608 }, /* MVSR2 */ +{ NULL, 0x00000001, 16616 }, /* MVSR2 */ +{ NULL, 0x00000001, 16624 }, /* MVSR2 */ +{ NULL, 0x00000001, 16632 }, /* MVSR2 */ +{ NULL, 0x00000001, 16633 }, /* MVSR2 */ +{ NULL, 0x00000001, 16640 }, /* CHK */ +{ NULL, 0x00000001, 16656 }, /* CHK */ +{ NULL, 0x00000001, 16664 }, /* CHK */ +{ NULL, 0x00000001, 16672 }, /* CHK */ +{ NULL, 0x00000001, 16680 }, /* CHK */ +{ NULL, 0x00000001, 16688 }, /* CHK */ +{ NULL, 0x00000001, 16696 }, /* CHK */ +{ NULL, 0x00000001, 16697 }, /* CHK */ +{ NULL, 0x00000001, 16698 }, /* CHK */ +{ NULL, 0x00000001, 16699 }, /* CHK */ +{ NULL, 0x00000001, 16700 }, /* CHK */ +{ NULL, 0x00000001, 16768 }, /* CHK */ +{ NULL, 0x00000001, 16784 }, /* CHK */ +{ NULL, 0x00000001, 16792 }, /* CHK */ +{ NULL, 0x00000001, 16800 }, /* CHK */ +{ NULL, 0x00000001, 16808 }, /* CHK */ +{ NULL, 0x00000001, 16816 }, /* CHK */ +{ NULL, 0x00000001, 16824 }, /* CHK */ +{ NULL, 0x00000001, 16825 }, /* CHK */ +{ NULL, 0x00000001, 16826 }, /* CHK */ +{ NULL, 0x00000001, 16827 }, /* CHK */ +{ NULL, 0x00000001, 16828 }, /* CHK */ +{ op_41d0_0_comp_nf, 0x00000000, 16848 }, /* LEA */ +{ op_41e8_0_comp_nf, 0x00000002, 16872 }, /* LEA */ +{ op_41f0_0_comp_nf, 0x00000002, 16880 }, /* LEA */ +{ op_41f8_0_comp_nf, 0x00000002, 16888 }, /* LEA */ +{ op_41f9_0_comp_nf, 0x00000002, 16889 }, /* LEA */ +{ op_41fa_0_comp_nf, 0x00000002, 16890 }, /* LEA */ +{ op_41fb_0_comp_nf, 0x00000002, 16891 }, /* LEA */ +{ op_4200_0_comp_nf, 0x00000000, 16896 }, /* CLR */ +{ op_4210_0_comp_nf, 0x00000000, 16912 }, /* CLR */ +{ op_4218_0_comp_nf, 0x00000000, 16920 }, /* CLR */ +{ op_4220_0_comp_nf, 0x00000000, 16928 }, /* CLR */ +{ op_4228_0_comp_nf, 0x00000002, 16936 }, /* CLR */ +{ op_4230_0_comp_nf, 0x00000002, 16944 }, /* CLR */ +{ op_4238_0_comp_nf, 0x00000002, 16952 }, /* CLR */ +{ op_4239_0_comp_nf, 0x00000002, 16953 }, /* CLR */ +{ op_4240_0_comp_nf, 0x00000000, 16960 }, /* CLR */ +{ op_4250_0_comp_nf, 0x00000000, 16976 }, /* CLR */ +{ op_4258_0_comp_nf, 0x00000000, 16984 }, /* CLR */ +{ op_4260_0_comp_nf, 0x00000000, 16992 }, /* CLR */ +{ op_4268_0_comp_nf, 0x00000002, 17000 }, /* CLR */ +{ op_4270_0_comp_nf, 0x00000002, 17008 }, /* CLR */ +{ op_4278_0_comp_nf, 0x00000002, 17016 }, /* CLR */ +{ op_4279_0_comp_nf, 0x00000002, 17017 }, /* CLR */ +{ op_4280_0_comp_nf, 0x00000000, 17024 }, /* CLR */ +{ op_4290_0_comp_nf, 0x00000000, 17040 }, /* CLR */ +{ op_4298_0_comp_nf, 0x00000000, 17048 }, /* CLR */ +{ op_42a0_0_comp_nf, 0x00000000, 17056 }, /* CLR */ +{ op_42a8_0_comp_nf, 0x00000002, 17064 }, /* CLR */ +{ op_42b0_0_comp_nf, 0x00000002, 17072 }, /* CLR */ +{ op_42b8_0_comp_nf, 0x00000002, 17080 }, /* CLR */ +{ op_42b9_0_comp_nf, 0x00000002, 17081 }, /* CLR */ +{ NULL, 0x00000001, 17088 }, /* MVSR2 */ +{ NULL, 0x00000001, 17104 }, /* MVSR2 */ +{ NULL, 0x00000001, 17112 }, /* MVSR2 */ +{ NULL, 0x00000001, 17120 }, /* MVSR2 */ +{ NULL, 0x00000001, 17128 }, /* MVSR2 */ +{ NULL, 0x00000001, 17136 }, /* MVSR2 */ +{ NULL, 0x00000001, 17144 }, /* MVSR2 */ +{ NULL, 0x00000001, 17145 }, /* MVSR2 */ +{ op_4400_0_comp_nf, 0x00000000, 17408 }, /* NEG */ +{ op_4410_0_comp_nf, 0x00000000, 17424 }, /* NEG */ +{ op_4418_0_comp_nf, 0x00000000, 17432 }, /* NEG */ +{ op_4420_0_comp_nf, 0x00000000, 17440 }, /* NEG */ +{ op_4428_0_comp_nf, 0x00000002, 17448 }, /* NEG */ +{ op_4430_0_comp_nf, 0x00000002, 17456 }, /* NEG */ +{ op_4438_0_comp_nf, 0x00000002, 17464 }, /* NEG */ +{ op_4439_0_comp_nf, 0x00000002, 17465 }, /* NEG */ +{ op_4440_0_comp_nf, 0x00000000, 17472 }, /* NEG */ +{ op_4450_0_comp_nf, 0x00000000, 17488 }, /* NEG */ +{ op_4458_0_comp_nf, 0x00000000, 17496 }, /* NEG */ +{ op_4460_0_comp_nf, 0x00000000, 17504 }, /* NEG */ +{ op_4468_0_comp_nf, 0x00000002, 17512 }, /* NEG */ +{ op_4470_0_comp_nf, 0x00000002, 17520 }, /* NEG */ +{ op_4478_0_comp_nf, 0x00000002, 17528 }, /* NEG */ +{ op_4479_0_comp_nf, 0x00000002, 17529 }, /* NEG */ +{ op_4480_0_comp_nf, 0x00000000, 17536 }, /* NEG */ +{ op_4490_0_comp_nf, 0x00000000, 17552 }, /* NEG */ +{ op_4498_0_comp_nf, 0x00000000, 17560 }, /* NEG */ +{ op_44a0_0_comp_nf, 0x00000000, 17568 }, /* NEG */ +{ op_44a8_0_comp_nf, 0x00000002, 17576 }, /* NEG */ +{ op_44b0_0_comp_nf, 0x00000002, 17584 }, /* NEG */ +{ op_44b8_0_comp_nf, 0x00000002, 17592 }, /* NEG */ +{ op_44b9_0_comp_nf, 0x00000002, 17593 }, /* NEG */ +{ NULL, 0x00000001, 17600 }, /* MV2SR */ +{ NULL, 0x00000001, 17616 }, /* MV2SR */ +{ NULL, 0x00000001, 17624 }, /* MV2SR */ +{ NULL, 0x00000001, 17632 }, /* MV2SR */ +{ NULL, 0x00000001, 17640 }, /* MV2SR */ +{ NULL, 0x00000001, 17648 }, /* MV2SR */ +{ NULL, 0x00000001, 17656 }, /* MV2SR */ +{ NULL, 0x00000001, 17657 }, /* MV2SR */ +{ NULL, 0x00000001, 17658 }, /* MV2SR */ +{ NULL, 0x00000001, 17659 }, /* MV2SR */ +{ NULL, 0x00000001, 17660 }, /* MV2SR */ +{ op_4600_0_comp_nf, 0x00000000, 17920 }, /* NOT */ +{ op_4610_0_comp_nf, 0x00000000, 17936 }, /* NOT */ +{ op_4618_0_comp_nf, 0x00000000, 17944 }, /* NOT */ +{ op_4620_0_comp_nf, 0x00000000, 17952 }, /* NOT */ +{ op_4628_0_comp_nf, 0x00000002, 17960 }, /* NOT */ +{ op_4630_0_comp_nf, 0x00000002, 17968 }, /* NOT */ +{ op_4638_0_comp_nf, 0x00000002, 17976 }, /* NOT */ +{ op_4639_0_comp_nf, 0x00000002, 17977 }, /* NOT */ +{ op_4640_0_comp_nf, 0x00000000, 17984 }, /* NOT */ +{ op_4650_0_comp_nf, 0x00000000, 18000 }, /* NOT */ +{ op_4658_0_comp_nf, 0x00000000, 18008 }, /* NOT */ +{ op_4660_0_comp_nf, 0x00000000, 18016 }, /* NOT */ +{ op_4668_0_comp_nf, 0x00000002, 18024 }, /* NOT */ +{ op_4670_0_comp_nf, 0x00000002, 18032 }, /* NOT */ +{ op_4678_0_comp_nf, 0x00000002, 18040 }, /* NOT */ +{ op_4679_0_comp_nf, 0x00000002, 18041 }, /* NOT */ +{ op_4680_0_comp_nf, 0x00000000, 18048 }, /* NOT */ +{ op_4690_0_comp_nf, 0x00000000, 18064 }, /* NOT */ +{ op_4698_0_comp_nf, 0x00000000, 18072 }, /* NOT */ +{ op_46a0_0_comp_nf, 0x00000000, 18080 }, /* NOT */ +{ op_46a8_0_comp_nf, 0x00000002, 18088 }, /* NOT */ +{ op_46b0_0_comp_nf, 0x00000002, 18096 }, /* NOT */ +{ op_46b8_0_comp_nf, 0x00000002, 18104 }, /* NOT */ +{ op_46b9_0_comp_nf, 0x00000002, 18105 }, /* NOT */ +{ NULL, 0x00000001, 18112 }, /* MV2SR */ +{ NULL, 0x00000001, 18128 }, /* MV2SR */ +{ NULL, 0x00000001, 18136 }, /* MV2SR */ +{ NULL, 0x00000001, 18144 }, /* MV2SR */ +{ NULL, 0x00000001, 18152 }, /* MV2SR */ +{ NULL, 0x00000001, 18160 }, /* MV2SR */ +{ NULL, 0x00000001, 18168 }, /* MV2SR */ +{ NULL, 0x00000001, 18169 }, /* MV2SR */ +{ NULL, 0x00000001, 18170 }, /* MV2SR */ +{ NULL, 0x00000001, 18171 }, /* MV2SR */ +{ NULL, 0x00000001, 18172 }, /* MV2SR */ +{ NULL, 0x00000000, 18432 }, /* NBCD */ +{ op_4808_0_comp_nf, 0x00000002, 18440 }, /* LINK */ +{ NULL, 0x00000000, 18448 }, /* NBCD */ +{ NULL, 0x00000000, 18456 }, /* NBCD */ +{ NULL, 0x00000000, 18464 }, /* NBCD */ +{ NULL, 0x00000000, 18472 }, /* NBCD */ +{ NULL, 0x00000000, 18480 }, /* NBCD */ +{ NULL, 0x00000000, 18488 }, /* NBCD */ +{ NULL, 0x00000000, 18489 }, /* NBCD */ +{ op_4840_0_comp_nf, 0x00000000, 18496 }, /* SWAP */ +{ NULL, 0x00000001, 18504 }, /* BKPT */ +{ op_4850_0_comp_nf, 0x00000000, 18512 }, /* PEA */ +{ op_4868_0_comp_nf, 0x00000002, 18536 }, /* PEA */ +{ op_4870_0_comp_nf, 0x00000002, 18544 }, /* PEA */ +{ op_4878_0_comp_nf, 0x00000002, 18552 }, /* PEA */ +{ op_4879_0_comp_nf, 0x00000002, 18553 }, /* PEA */ +{ op_487a_0_comp_nf, 0x00000002, 18554 }, /* PEA */ +{ op_487b_0_comp_nf, 0x00000002, 18555 }, /* PEA */ +{ op_4880_0_comp_nf, 0x00000000, 18560 }, /* EXT */ +{ op_4890_0_comp_nf, 0x00000002, 18576 }, /* MVMLE */ +{ op_48a0_0_comp_nf, 0x00000002, 18592 }, /* MVMLE */ +{ op_48a8_0_comp_nf, 0x00000002, 18600 }, /* MVMLE */ +{ op_48b0_0_comp_nf, 0x00000002, 18608 }, /* MVMLE */ +{ op_48b8_0_comp_nf, 0x00000002, 18616 }, /* MVMLE */ +{ op_48b9_0_comp_nf, 0x00000002, 18617 }, /* MVMLE */ +{ op_48c0_0_comp_nf, 0x00000000, 18624 }, /* EXT */ +{ op_48d0_0_comp_nf, 0x00000002, 18640 }, /* MVMLE */ +{ op_48e0_0_comp_nf, 0x00000002, 18656 }, /* MVMLE */ +{ op_48e8_0_comp_nf, 0x00000002, 18664 }, /* MVMLE */ +{ op_48f0_0_comp_nf, 0x00000002, 18672 }, /* MVMLE */ +{ op_48f8_0_comp_nf, 0x00000002, 18680 }, /* MVMLE */ +{ op_48f9_0_comp_nf, 0x00000002, 18681 }, /* MVMLE */ +{ op_49c0_0_comp_nf, 0x00000000, 18880 }, /* EXT */ +{ op_4a00_0_comp_nf, 0x00000000, 18944 }, /* TST */ +{ op_4a10_0_comp_nf, 0x00000000, 18960 }, /* TST */ +{ op_4a18_0_comp_nf, 0x00000000, 18968 }, /* TST */ +{ op_4a20_0_comp_nf, 0x00000000, 18976 }, /* TST */ +{ op_4a28_0_comp_nf, 0x00000002, 18984 }, /* TST */ +{ op_4a30_0_comp_nf, 0x00000002, 18992 }, /* TST */ +{ op_4a38_0_comp_nf, 0x00000002, 19000 }, /* TST */ +{ op_4a39_0_comp_nf, 0x00000002, 19001 }, /* TST */ +{ op_4a3a_0_comp_nf, 0x00000002, 19002 }, /* TST */ +{ op_4a3b_0_comp_nf, 0x00000002, 19003 }, /* TST */ +{ op_4a3c_0_comp_nf, 0x00000002, 19004 }, /* TST */ +{ op_4a40_0_comp_nf, 0x00000000, 19008 }, /* TST */ +{ op_4a48_0_comp_nf, 0x00000000, 19016 }, /* TST */ +{ op_4a50_0_comp_nf, 0x00000000, 19024 }, /* TST */ +{ op_4a58_0_comp_nf, 0x00000000, 19032 }, /* TST */ +{ op_4a60_0_comp_nf, 0x00000000, 19040 }, /* TST */ +{ op_4a68_0_comp_nf, 0x00000002, 19048 }, /* TST */ +{ op_4a70_0_comp_nf, 0x00000002, 19056 }, /* TST */ +{ op_4a78_0_comp_nf, 0x00000002, 19064 }, /* TST */ +{ op_4a79_0_comp_nf, 0x00000002, 19065 }, /* TST */ +{ op_4a7a_0_comp_nf, 0x00000002, 19066 }, /* TST */ +{ op_4a7b_0_comp_nf, 0x00000002, 19067 }, /* TST */ +{ op_4a7c_0_comp_nf, 0x00000002, 19068 }, /* TST */ +{ op_4a80_0_comp_nf, 0x00000000, 19072 }, /* TST */ +{ op_4a88_0_comp_nf, 0x00000000, 19080 }, /* TST */ +{ op_4a90_0_comp_nf, 0x00000000, 19088 }, /* TST */ +{ op_4a98_0_comp_nf, 0x00000000, 19096 }, /* TST */ +{ op_4aa0_0_comp_nf, 0x00000000, 19104 }, /* TST */ +{ op_4aa8_0_comp_nf, 0x00000002, 19112 }, /* TST */ +{ op_4ab0_0_comp_nf, 0x00000002, 19120 }, /* TST */ +{ op_4ab8_0_comp_nf, 0x00000002, 19128 }, /* TST */ +{ op_4ab9_0_comp_nf, 0x00000002, 19129 }, /* TST */ +{ op_4aba_0_comp_nf, 0x00000002, 19130 }, /* TST */ +{ op_4abb_0_comp_nf, 0x00000002, 19131 }, /* TST */ +{ op_4abc_0_comp_nf, 0x00000002, 19132 }, /* TST */ +{ NULL, 0x00000000, 19136 }, /* TAS */ +{ NULL, 0x00000000, 19152 }, /* TAS */ +{ NULL, 0x00000000, 19160 }, /* TAS */ +{ NULL, 0x00000000, 19168 }, /* TAS */ +{ NULL, 0x00000000, 19176 }, /* TAS */ +{ NULL, 0x00000000, 19184 }, /* TAS */ +{ NULL, 0x00000000, 19192 }, /* TAS */ +{ NULL, 0x00000000, 19193 }, /* TAS */ +{ op_4c00_0_comp_nf, 0x00000002, 19456 }, /* MULL */ +{ op_4c10_0_comp_nf, 0x00000002, 19472 }, /* MULL */ +{ op_4c18_0_comp_nf, 0x00000002, 19480 }, /* MULL */ +{ op_4c20_0_comp_nf, 0x00000002, 19488 }, /* MULL */ +{ op_4c28_0_comp_nf, 0x00000002, 19496 }, /* MULL */ +{ op_4c30_0_comp_nf, 0x00000002, 19504 }, /* MULL */ +{ op_4c38_0_comp_nf, 0x00000002, 19512 }, /* MULL */ +{ op_4c39_0_comp_nf, 0x00000002, 19513 }, /* MULL */ +{ op_4c3a_0_comp_nf, 0x00000002, 19514 }, /* MULL */ +{ op_4c3b_0_comp_nf, 0x00000002, 19515 }, /* MULL */ +{ op_4c3c_0_comp_nf, 0x00000002, 19516 }, /* MULL */ +{ op_4c40_0_comp_nf, 0x00000002, 19520 }, /* DIVL */ +{ op_4c50_0_comp_nf, 0x00000002, 19536 }, /* DIVL */ +{ op_4c58_0_comp_nf, 0x00000002, 19544 }, /* DIVL */ +{ op_4c60_0_comp_nf, 0x00000002, 19552 }, /* DIVL */ +{ op_4c68_0_comp_nf, 0x00000002, 19560 }, /* DIVL */ +{ op_4c70_0_comp_nf, 0x00000002, 19568 }, /* DIVL */ +{ op_4c78_0_comp_nf, 0x00000002, 19576 }, /* DIVL */ +{ op_4c79_0_comp_nf, 0x00000002, 19577 }, /* DIVL */ +{ op_4c7a_0_comp_nf, 0x00000002, 19578 }, /* DIVL */ +{ op_4c7b_0_comp_nf, 0x00000002, 19579 }, /* DIVL */ +{ op_4c7c_0_comp_nf, 0x00000002, 19580 }, /* DIVL */ +{ op_4c90_0_comp_nf, 0x00000002, 19600 }, /* MVMEL */ +{ op_4c98_0_comp_nf, 0x00000002, 19608 }, /* MVMEL */ +{ op_4ca8_0_comp_nf, 0x00000002, 19624 }, /* MVMEL */ +{ op_4cb0_0_comp_nf, 0x00000002, 19632 }, /* MVMEL */ +{ op_4cb8_0_comp_nf, 0x00000002, 19640 }, /* MVMEL */ +{ op_4cb9_0_comp_nf, 0x00000002, 19641 }, /* MVMEL */ +{ op_4cba_0_comp_nf, 0x00000002, 19642 }, /* MVMEL */ +{ op_4cbb_0_comp_nf, 0x00000002, 19643 }, /* MVMEL */ +{ op_4cd0_0_comp_nf, 0x00000002, 19664 }, /* MVMEL */ +{ op_4cd8_0_comp_nf, 0x00000002, 19672 }, /* MVMEL */ +{ op_4ce8_0_comp_nf, 0x00000002, 19688 }, /* MVMEL */ +{ op_4cf0_0_comp_nf, 0x00000002, 19696 }, /* MVMEL */ +{ op_4cf8_0_comp_nf, 0x00000002, 19704 }, /* MVMEL */ +{ op_4cf9_0_comp_nf, 0x00000002, 19705 }, /* MVMEL */ +{ op_4cfa_0_comp_nf, 0x00000002, 19706 }, /* MVMEL */ +{ op_4cfb_0_comp_nf, 0x00000002, 19707 }, /* MVMEL */ +{ NULL, 0x00000001, 20032 }, /* TRAP */ +{ op_4e50_0_comp_nf, 0x00000002, 20048 }, /* LINK */ +{ op_4e58_0_comp_nf, 0x00000000, 20056 }, /* UNLK */ +{ NULL, 0x00000001, 20064 }, /* MVR2USP */ +{ NULL, 0x00000001, 20072 }, /* MVUSP2R */ +{ NULL, 0x00000001, 20080 }, /* RESET */ +{ op_4e71_0_comp_nf, 0x00000000, 20081 }, /* NOP */ +{ NULL, 0x00000001, 20082 }, /* STOP */ +{ NULL, 0x00000001, 20083 }, /* RTE */ +{ op_4e74_0_comp_nf, 0x00000003, 20084 }, /* RTD */ +{ op_4e75_0_comp_nf, 0x00000001, 20085 }, /* RTS */ +{ NULL, 0x00000001, 20086 }, /* TRAPV */ +{ NULL, 0x00000001, 20087 }, /* RTR */ +{ NULL, 0x00000001, 20090 }, /* MOVEC2 */ +{ NULL, 0x00000001, 20091 }, /* MOVE2C */ +{ op_4e90_0_comp_nf, 0x00000001, 20112 }, /* JSR */ +{ op_4ea8_0_comp_nf, 0x00000003, 20136 }, /* JSR */ +{ op_4eb0_0_comp_nf, 0x00000003, 20144 }, /* JSR */ +{ op_4eb8_0_comp_nf, 0x00000003, 20152 }, /* JSR */ +{ op_4eb9_0_comp_nf, 0x00000003, 20153 }, /* JSR */ +{ op_4eba_0_comp_nf, 0x00000003, 20154 }, /* JSR */ +{ op_4ebb_0_comp_nf, 0x00000003, 20155 }, /* JSR */ +{ op_4ed0_0_comp_nf, 0x00000001, 20176 }, /* JMP */ +{ op_4ee8_0_comp_nf, 0x00000003, 20200 }, /* JMP */ +{ op_4ef0_0_comp_nf, 0x00000003, 20208 }, /* JMP */ +{ op_4ef8_0_comp_nf, 0x00000003, 20216 }, /* JMP */ +{ op_4ef9_0_comp_nf, 0x00000003, 20217 }, /* JMP */ +{ op_4efa_0_comp_nf, 0x00000003, 20218 }, /* JMP */ +{ op_4efb_0_comp_nf, 0x00000003, 20219 }, /* JMP */ +{ op_5000_0_comp_nf, 0x00000000, 20480 }, /* ADD */ +{ op_5010_0_comp_nf, 0x00000000, 20496 }, /* ADD */ +{ op_5018_0_comp_nf, 0x00000000, 20504 }, /* ADD */ +{ op_5020_0_comp_nf, 0x00000000, 20512 }, /* ADD */ +{ op_5028_0_comp_nf, 0x00000002, 20520 }, /* ADD */ +{ op_5030_0_comp_nf, 0x00000002, 20528 }, /* ADD */ +{ op_5038_0_comp_nf, 0x00000002, 20536 }, /* ADD */ +{ op_5039_0_comp_nf, 0x00000002, 20537 }, /* ADD */ +{ op_5040_0_comp_nf, 0x00000000, 20544 }, /* ADD */ +{ op_5048_0_comp_nf, 0x00000000, 20552 }, /* ADDA */ +{ op_5050_0_comp_nf, 0x00000000, 20560 }, /* ADD */ +{ op_5058_0_comp_nf, 0x00000000, 20568 }, /* ADD */ +{ op_5060_0_comp_nf, 0x00000000, 20576 }, /* ADD */ +{ op_5068_0_comp_nf, 0x00000002, 20584 }, /* ADD */ +{ op_5070_0_comp_nf, 0x00000002, 20592 }, /* ADD */ +{ op_5078_0_comp_nf, 0x00000002, 20600 }, /* ADD */ +{ op_5079_0_comp_nf, 0x00000002, 20601 }, /* ADD */ +{ op_5080_0_comp_nf, 0x00000000, 20608 }, /* ADD */ +{ op_5088_0_comp_nf, 0x00000000, 20616 }, /* ADDA */ +{ op_5090_0_comp_nf, 0x00000000, 20624 }, /* ADD */ +{ op_5098_0_comp_nf, 0x00000000, 20632 }, /* ADD */ +{ op_50a0_0_comp_nf, 0x00000000, 20640 }, /* ADD */ +{ op_50a8_0_comp_nf, 0x00000002, 20648 }, /* ADD */ +{ op_50b0_0_comp_nf, 0x00000002, 20656 }, /* ADD */ +{ op_50b8_0_comp_nf, 0x00000002, 20664 }, /* ADD */ +{ op_50b9_0_comp_nf, 0x00000002, 20665 }, /* ADD */ +{ op_50c0_0_comp_nf, 0x00000000, 20672 }, /* Scc */ +{ op_50c8_0_comp_nf, 0x00000003, 20680 }, /* DBcc */ +{ op_50d0_0_comp_nf, 0x00000000, 20688 }, /* Scc */ +{ op_50d8_0_comp_nf, 0x00000000, 20696 }, /* Scc */ +{ op_50e0_0_comp_nf, 0x00000000, 20704 }, /* Scc */ +{ op_50e8_0_comp_nf, 0x00000002, 20712 }, /* Scc */ +{ op_50f0_0_comp_nf, 0x00000002, 20720 }, /* Scc */ +{ op_50f8_0_comp_nf, 0x00000002, 20728 }, /* Scc */ +{ op_50f9_0_comp_nf, 0x00000002, 20729 }, /* Scc */ +{ NULL, 0x00000001, 20730 }, /* TRAPcc */ +{ NULL, 0x00000001, 20731 }, /* TRAPcc */ +{ NULL, 0x00000001, 20732 }, /* TRAPcc */ +{ op_5100_0_comp_nf, 0x00000000, 20736 }, /* SUB */ +{ op_5110_0_comp_nf, 0x00000000, 20752 }, /* SUB */ +{ op_5118_0_comp_nf, 0x00000000, 20760 }, /* SUB */ +{ op_5120_0_comp_nf, 0x00000000, 20768 }, /* SUB */ +{ op_5128_0_comp_nf, 0x00000002, 20776 }, /* SUB */ +{ op_5130_0_comp_nf, 0x00000002, 20784 }, /* SUB */ +{ op_5138_0_comp_nf, 0x00000002, 20792 }, /* SUB */ +{ op_5139_0_comp_nf, 0x00000002, 20793 }, /* SUB */ +{ op_5140_0_comp_nf, 0x00000000, 20800 }, /* SUB */ +{ op_5148_0_comp_nf, 0x00000000, 20808 }, /* SUBA */ +{ op_5150_0_comp_nf, 0x00000000, 20816 }, /* SUB */ +{ op_5158_0_comp_nf, 0x00000000, 20824 }, /* SUB */ +{ op_5160_0_comp_nf, 0x00000000, 20832 }, /* SUB */ +{ op_5168_0_comp_nf, 0x00000002, 20840 }, /* SUB */ +{ op_5170_0_comp_nf, 0x00000002, 20848 }, /* SUB */ +{ op_5178_0_comp_nf, 0x00000002, 20856 }, /* SUB */ +{ op_5179_0_comp_nf, 0x00000002, 20857 }, /* SUB */ +{ op_5180_0_comp_nf, 0x00000000, 20864 }, /* SUB */ +{ op_5188_0_comp_nf, 0x00000000, 20872 }, /* SUBA */ +{ op_5190_0_comp_nf, 0x00000000, 20880 }, /* SUB */ +{ op_5198_0_comp_nf, 0x00000000, 20888 }, /* SUB */ +{ op_51a0_0_comp_nf, 0x00000000, 20896 }, /* SUB */ +{ op_51a8_0_comp_nf, 0x00000002, 20904 }, /* SUB */ +{ op_51b0_0_comp_nf, 0x00000002, 20912 }, /* SUB */ +{ op_51b8_0_comp_nf, 0x00000002, 20920 }, /* SUB */ +{ op_51b9_0_comp_nf, 0x00000002, 20921 }, /* SUB */ +{ op_51c0_0_comp_nf, 0x00000000, 20928 }, /* Scc */ +{ op_51c8_0_comp_nf, 0x00000003, 20936 }, /* DBcc */ +{ op_51d0_0_comp_nf, 0x00000000, 20944 }, /* Scc */ +{ op_51d8_0_comp_nf, 0x00000000, 20952 }, /* Scc */ +{ op_51e0_0_comp_nf, 0x00000000, 20960 }, /* Scc */ +{ op_51e8_0_comp_nf, 0x00000002, 20968 }, /* Scc */ +{ op_51f0_0_comp_nf, 0x00000002, 20976 }, /* Scc */ +{ op_51f8_0_comp_nf, 0x00000002, 20984 }, /* Scc */ +{ op_51f9_0_comp_nf, 0x00000002, 20985 }, /* Scc */ +{ NULL, 0x00000001, 20986 }, /* TRAPcc */ +{ NULL, 0x00000001, 20987 }, /* TRAPcc */ +{ NULL, 0x00000001, 20988 }, /* TRAPcc */ +{ op_52c0_0_comp_nf, 0x00000000, 21184 }, /* Scc */ +{ op_52c8_0_comp_nf, 0x00000003, 21192 }, /* DBcc */ +{ op_52d0_0_comp_nf, 0x00000000, 21200 }, /* Scc */ +{ op_52d8_0_comp_nf, 0x00000000, 21208 }, /* Scc */ +{ op_52e0_0_comp_nf, 0x00000000, 21216 }, /* Scc */ +{ op_52e8_0_comp_nf, 0x00000002, 21224 }, /* Scc */ +{ op_52f0_0_comp_nf, 0x00000002, 21232 }, /* Scc */ +{ op_52f8_0_comp_nf, 0x00000002, 21240 }, /* Scc */ +{ op_52f9_0_comp_nf, 0x00000002, 21241 }, /* Scc */ +{ NULL, 0x00000001, 21242 }, /* TRAPcc */ +{ NULL, 0x00000001, 21243 }, /* TRAPcc */ +{ NULL, 0x00000001, 21244 }, /* TRAPcc */ +{ op_53c0_0_comp_nf, 0x00000000, 21440 }, /* Scc */ +{ op_53c8_0_comp_nf, 0x00000003, 21448 }, /* DBcc */ +{ op_53d0_0_comp_nf, 0x00000000, 21456 }, /* Scc */ +{ op_53d8_0_comp_nf, 0x00000000, 21464 }, /* Scc */ +{ op_53e0_0_comp_nf, 0x00000000, 21472 }, /* Scc */ +{ op_53e8_0_comp_nf, 0x00000002, 21480 }, /* Scc */ +{ op_53f0_0_comp_nf, 0x00000002, 21488 }, /* Scc */ +{ op_53f8_0_comp_nf, 0x00000002, 21496 }, /* Scc */ +{ op_53f9_0_comp_nf, 0x00000002, 21497 }, /* Scc */ +{ NULL, 0x00000001, 21498 }, /* TRAPcc */ +{ NULL, 0x00000001, 21499 }, /* TRAPcc */ +{ NULL, 0x00000001, 21500 }, /* TRAPcc */ +{ op_54c0_0_comp_nf, 0x00000000, 21696 }, /* Scc */ +{ op_54c8_0_comp_nf, 0x00000003, 21704 }, /* DBcc */ +{ op_54d0_0_comp_nf, 0x00000000, 21712 }, /* Scc */ +{ op_54d8_0_comp_nf, 0x00000000, 21720 }, /* Scc */ +{ op_54e0_0_comp_nf, 0x00000000, 21728 }, /* Scc */ +{ op_54e8_0_comp_nf, 0x00000002, 21736 }, /* Scc */ +{ op_54f0_0_comp_nf, 0x00000002, 21744 }, /* Scc */ +{ op_54f8_0_comp_nf, 0x00000002, 21752 }, /* Scc */ +{ op_54f9_0_comp_nf, 0x00000002, 21753 }, /* Scc */ +{ NULL, 0x00000001, 21754 }, /* TRAPcc */ +{ NULL, 0x00000001, 21755 }, /* TRAPcc */ +{ NULL, 0x00000001, 21756 }, /* TRAPcc */ +{ op_55c0_0_comp_nf, 0x00000000, 21952 }, /* Scc */ +{ op_55c8_0_comp_nf, 0x00000003, 21960 }, /* DBcc */ +{ op_55d0_0_comp_nf, 0x00000000, 21968 }, /* Scc */ +{ op_55d8_0_comp_nf, 0x00000000, 21976 }, /* Scc */ +{ op_55e0_0_comp_nf, 0x00000000, 21984 }, /* Scc */ +{ op_55e8_0_comp_nf, 0x00000002, 21992 }, /* Scc */ +{ op_55f0_0_comp_nf, 0x00000002, 22000 }, /* Scc */ +{ op_55f8_0_comp_nf, 0x00000002, 22008 }, /* Scc */ +{ op_55f9_0_comp_nf, 0x00000002, 22009 }, /* Scc */ +{ NULL, 0x00000001, 22010 }, /* TRAPcc */ +{ NULL, 0x00000001, 22011 }, /* TRAPcc */ +{ NULL, 0x00000001, 22012 }, /* TRAPcc */ +{ op_56c0_0_comp_nf, 0x00000000, 22208 }, /* Scc */ +{ op_56c8_0_comp_nf, 0x00000003, 22216 }, /* DBcc */ +{ op_56d0_0_comp_nf, 0x00000000, 22224 }, /* Scc */ +{ op_56d8_0_comp_nf, 0x00000000, 22232 }, /* Scc */ +{ op_56e0_0_comp_nf, 0x00000000, 22240 }, /* Scc */ +{ op_56e8_0_comp_nf, 0x00000002, 22248 }, /* Scc */ +{ op_56f0_0_comp_nf, 0x00000002, 22256 }, /* Scc */ +{ op_56f8_0_comp_nf, 0x00000002, 22264 }, /* Scc */ +{ op_56f9_0_comp_nf, 0x00000002, 22265 }, /* Scc */ +{ NULL, 0x00000001, 22266 }, /* TRAPcc */ +{ NULL, 0x00000001, 22267 }, /* TRAPcc */ +{ NULL, 0x00000001, 22268 }, /* TRAPcc */ +{ op_57c0_0_comp_nf, 0x00000000, 22464 }, /* Scc */ +{ op_57c8_0_comp_nf, 0x00000003, 22472 }, /* DBcc */ +{ op_57d0_0_comp_nf, 0x00000000, 22480 }, /* Scc */ +{ op_57d8_0_comp_nf, 0x00000000, 22488 }, /* Scc */ +{ op_57e0_0_comp_nf, 0x00000000, 22496 }, /* Scc */ +{ op_57e8_0_comp_nf, 0x00000002, 22504 }, /* Scc */ +{ op_57f0_0_comp_nf, 0x00000002, 22512 }, /* Scc */ +{ op_57f8_0_comp_nf, 0x00000002, 22520 }, /* Scc */ +{ op_57f9_0_comp_nf, 0x00000002, 22521 }, /* Scc */ +{ NULL, 0x00000001, 22522 }, /* TRAPcc */ +{ NULL, 0x00000001, 22523 }, /* TRAPcc */ +{ NULL, 0x00000001, 22524 }, /* TRAPcc */ +{ op_58c0_0_comp_nf, 0x00000000, 22720 }, /* Scc */ +{ op_58c8_0_comp_nf, 0x00000003, 22728 }, /* DBcc */ +{ op_58d0_0_comp_nf, 0x00000000, 22736 }, /* Scc */ +{ op_58d8_0_comp_nf, 0x00000000, 22744 }, /* Scc */ +{ op_58e0_0_comp_nf, 0x00000000, 22752 }, /* Scc */ +{ op_58e8_0_comp_nf, 0x00000002, 22760 }, /* Scc */ +{ op_58f0_0_comp_nf, 0x00000002, 22768 }, /* Scc */ +{ op_58f8_0_comp_nf, 0x00000002, 22776 }, /* Scc */ +{ op_58f9_0_comp_nf, 0x00000002, 22777 }, /* Scc */ +{ NULL, 0x00000001, 22778 }, /* TRAPcc */ +{ NULL, 0x00000001, 22779 }, /* TRAPcc */ +{ NULL, 0x00000001, 22780 }, /* TRAPcc */ +{ op_59c0_0_comp_nf, 0x00000000, 22976 }, /* Scc */ +{ op_59c8_0_comp_nf, 0x00000003, 22984 }, /* DBcc */ +{ op_59d0_0_comp_nf, 0x00000000, 22992 }, /* Scc */ +{ op_59d8_0_comp_nf, 0x00000000, 23000 }, /* Scc */ +{ op_59e0_0_comp_nf, 0x00000000, 23008 }, /* Scc */ +{ op_59e8_0_comp_nf, 0x00000002, 23016 }, /* Scc */ +{ op_59f0_0_comp_nf, 0x00000002, 23024 }, /* Scc */ +{ op_59f8_0_comp_nf, 0x00000002, 23032 }, /* Scc */ +{ op_59f9_0_comp_nf, 0x00000002, 23033 }, /* Scc */ +{ NULL, 0x00000001, 23034 }, /* TRAPcc */ +{ NULL, 0x00000001, 23035 }, /* TRAPcc */ +{ NULL, 0x00000001, 23036 }, /* TRAPcc */ +{ op_5ac0_0_comp_nf, 0x00000000, 23232 }, /* Scc */ +{ op_5ac8_0_comp_nf, 0x00000003, 23240 }, /* DBcc */ +{ op_5ad0_0_comp_nf, 0x00000000, 23248 }, /* Scc */ +{ op_5ad8_0_comp_nf, 0x00000000, 23256 }, /* Scc */ +{ op_5ae0_0_comp_nf, 0x00000000, 23264 }, /* Scc */ +{ op_5ae8_0_comp_nf, 0x00000002, 23272 }, /* Scc */ +{ op_5af0_0_comp_nf, 0x00000002, 23280 }, /* Scc */ +{ op_5af8_0_comp_nf, 0x00000002, 23288 }, /* Scc */ +{ op_5af9_0_comp_nf, 0x00000002, 23289 }, /* Scc */ +{ NULL, 0x00000001, 23290 }, /* TRAPcc */ +{ NULL, 0x00000001, 23291 }, /* TRAPcc */ +{ NULL, 0x00000001, 23292 }, /* TRAPcc */ +{ op_5bc0_0_comp_nf, 0x00000000, 23488 }, /* Scc */ +{ op_5bc8_0_comp_nf, 0x00000003, 23496 }, /* DBcc */ +{ op_5bd0_0_comp_nf, 0x00000000, 23504 }, /* Scc */ +{ op_5bd8_0_comp_nf, 0x00000000, 23512 }, /* Scc */ +{ op_5be0_0_comp_nf, 0x00000000, 23520 }, /* Scc */ +{ op_5be8_0_comp_nf, 0x00000002, 23528 }, /* Scc */ +{ op_5bf0_0_comp_nf, 0x00000002, 23536 }, /* Scc */ +{ op_5bf8_0_comp_nf, 0x00000002, 23544 }, /* Scc */ +{ op_5bf9_0_comp_nf, 0x00000002, 23545 }, /* Scc */ +{ NULL, 0x00000001, 23546 }, /* TRAPcc */ +{ NULL, 0x00000001, 23547 }, /* TRAPcc */ +{ NULL, 0x00000001, 23548 }, /* TRAPcc */ +{ op_5cc0_0_comp_nf, 0x00000000, 23744 }, /* Scc */ +{ op_5cc8_0_comp_nf, 0x00000003, 23752 }, /* DBcc */ +{ op_5cd0_0_comp_nf, 0x00000000, 23760 }, /* Scc */ +{ op_5cd8_0_comp_nf, 0x00000000, 23768 }, /* Scc */ +{ op_5ce0_0_comp_nf, 0x00000000, 23776 }, /* Scc */ +{ op_5ce8_0_comp_nf, 0x00000002, 23784 }, /* Scc */ +{ op_5cf0_0_comp_nf, 0x00000002, 23792 }, /* Scc */ +{ op_5cf8_0_comp_nf, 0x00000002, 23800 }, /* Scc */ +{ op_5cf9_0_comp_nf, 0x00000002, 23801 }, /* Scc */ +{ NULL, 0x00000001, 23802 }, /* TRAPcc */ +{ NULL, 0x00000001, 23803 }, /* TRAPcc */ +{ NULL, 0x00000001, 23804 }, /* TRAPcc */ +{ op_5dc0_0_comp_nf, 0x00000000, 24000 }, /* Scc */ +{ op_5dc8_0_comp_nf, 0x00000003, 24008 }, /* DBcc */ +{ op_5dd0_0_comp_nf, 0x00000000, 24016 }, /* Scc */ +{ op_5dd8_0_comp_nf, 0x00000000, 24024 }, /* Scc */ +{ op_5de0_0_comp_nf, 0x00000000, 24032 }, /* Scc */ +{ op_5de8_0_comp_nf, 0x00000002, 24040 }, /* Scc */ +{ op_5df0_0_comp_nf, 0x00000002, 24048 }, /* Scc */ +{ op_5df8_0_comp_nf, 0x00000002, 24056 }, /* Scc */ +{ op_5df9_0_comp_nf, 0x00000002, 24057 }, /* Scc */ +{ NULL, 0x00000001, 24058 }, /* TRAPcc */ +{ NULL, 0x00000001, 24059 }, /* TRAPcc */ +{ NULL, 0x00000001, 24060 }, /* TRAPcc */ +{ op_5ec0_0_comp_nf, 0x00000000, 24256 }, /* Scc */ +{ op_5ec8_0_comp_nf, 0x00000003, 24264 }, /* DBcc */ +{ op_5ed0_0_comp_nf, 0x00000000, 24272 }, /* Scc */ +{ op_5ed8_0_comp_nf, 0x00000000, 24280 }, /* Scc */ +{ op_5ee0_0_comp_nf, 0x00000000, 24288 }, /* Scc */ +{ op_5ee8_0_comp_nf, 0x00000002, 24296 }, /* Scc */ +{ op_5ef0_0_comp_nf, 0x00000002, 24304 }, /* Scc */ +{ op_5ef8_0_comp_nf, 0x00000002, 24312 }, /* Scc */ +{ op_5ef9_0_comp_nf, 0x00000002, 24313 }, /* Scc */ +{ NULL, 0x00000001, 24314 }, /* TRAPcc */ +{ NULL, 0x00000001, 24315 }, /* TRAPcc */ +{ NULL, 0x00000001, 24316 }, /* TRAPcc */ +{ op_5fc0_0_comp_nf, 0x00000000, 24512 }, /* Scc */ +{ op_5fc8_0_comp_nf, 0x00000003, 24520 }, /* DBcc */ +{ op_5fd0_0_comp_nf, 0x00000000, 24528 }, /* Scc */ +{ op_5fd8_0_comp_nf, 0x00000000, 24536 }, /* Scc */ +{ op_5fe0_0_comp_nf, 0x00000000, 24544 }, /* Scc */ +{ op_5fe8_0_comp_nf, 0x00000002, 24552 }, /* Scc */ +{ op_5ff0_0_comp_nf, 0x00000002, 24560 }, /* Scc */ +{ op_5ff8_0_comp_nf, 0x00000002, 24568 }, /* Scc */ +{ op_5ff9_0_comp_nf, 0x00000002, 24569 }, /* Scc */ +{ NULL, 0x00000001, 24570 }, /* TRAPcc */ +{ NULL, 0x00000001, 24571 }, /* TRAPcc */ +{ NULL, 0x00000001, 24572 }, /* TRAPcc */ +{ op_6000_0_comp_nf, 0x00000012, 24576 }, /* Bcc */ +{ op_6001_0_comp_nf, 0x00000010, 24577 }, /* Bcc */ +{ op_60ff_0_comp_nf, 0x00000012, 24831 }, /* Bcc */ +{ op_6100_0_comp_nf, 0x00000012, 24832 }, /* BSR */ +{ op_6101_0_comp_nf, 0x00000010, 24833 }, /* BSR */ +{ op_61ff_0_comp_nf, 0x00000012, 25087 }, /* BSR */ +{ op_6200_0_comp_nf, 0x00000003, 25088 }, /* Bcc */ +{ op_6201_0_comp_nf, 0x00000001, 25089 }, /* Bcc */ +{ op_62ff_0_comp_nf, 0x00000003, 25343 }, /* Bcc */ +{ op_6300_0_comp_nf, 0x00000003, 25344 }, /* Bcc */ +{ op_6301_0_comp_nf, 0x00000001, 25345 }, /* Bcc */ +{ op_63ff_0_comp_nf, 0x00000003, 25599 }, /* Bcc */ +{ op_6400_0_comp_nf, 0x00000003, 25600 }, /* Bcc */ +{ op_6401_0_comp_nf, 0x00000001, 25601 }, /* Bcc */ +{ op_64ff_0_comp_nf, 0x00000003, 25855 }, /* Bcc */ +{ op_6500_0_comp_nf, 0x00000003, 25856 }, /* Bcc */ +{ op_6501_0_comp_nf, 0x00000001, 25857 }, /* Bcc */ +{ op_65ff_0_comp_nf, 0x00000003, 26111 }, /* Bcc */ +{ op_6600_0_comp_nf, 0x00000003, 26112 }, /* Bcc */ +{ op_6601_0_comp_nf, 0x00000001, 26113 }, /* Bcc */ +{ op_66ff_0_comp_nf, 0x00000003, 26367 }, /* Bcc */ +{ op_6700_0_comp_nf, 0x00000003, 26368 }, /* Bcc */ +{ op_6701_0_comp_nf, 0x00000001, 26369 }, /* Bcc */ +{ op_67ff_0_comp_nf, 0x00000003, 26623 }, /* Bcc */ +{ op_6800_0_comp_nf, 0x00000003, 26624 }, /* Bcc */ +{ op_6801_0_comp_nf, 0x00000001, 26625 }, /* Bcc */ +{ op_68ff_0_comp_nf, 0x00000003, 26879 }, /* Bcc */ +{ op_6900_0_comp_nf, 0x00000003, 26880 }, /* Bcc */ +{ op_6901_0_comp_nf, 0x00000001, 26881 }, /* Bcc */ +{ op_69ff_0_comp_nf, 0x00000003, 27135 }, /* Bcc */ +{ op_6a00_0_comp_nf, 0x00000003, 27136 }, /* Bcc */ +{ op_6a01_0_comp_nf, 0x00000001, 27137 }, /* Bcc */ +{ op_6aff_0_comp_nf, 0x00000003, 27391 }, /* Bcc */ +{ op_6b00_0_comp_nf, 0x00000003, 27392 }, /* Bcc */ +{ op_6b01_0_comp_nf, 0x00000001, 27393 }, /* Bcc */ +{ op_6bff_0_comp_nf, 0x00000003, 27647 }, /* Bcc */ +{ op_6c00_0_comp_nf, 0x00000003, 27648 }, /* Bcc */ +{ op_6c01_0_comp_nf, 0x00000001, 27649 }, /* Bcc */ +{ op_6cff_0_comp_nf, 0x00000003, 27903 }, /* Bcc */ +{ op_6d00_0_comp_nf, 0x00000003, 27904 }, /* Bcc */ +{ op_6d01_0_comp_nf, 0x00000001, 27905 }, /* Bcc */ +{ op_6dff_0_comp_nf, 0x00000003, 28159 }, /* Bcc */ +{ op_6e00_0_comp_nf, 0x00000003, 28160 }, /* Bcc */ +{ op_6e01_0_comp_nf, 0x00000001, 28161 }, /* Bcc */ +{ op_6eff_0_comp_nf, 0x00000003, 28415 }, /* Bcc */ +{ op_6f00_0_comp_nf, 0x00000003, 28416 }, /* Bcc */ +{ op_6f01_0_comp_nf, 0x00000001, 28417 }, /* Bcc */ +{ op_6fff_0_comp_nf, 0x00000003, 28671 }, /* Bcc */ +{ op_7000_0_comp_nf, 0x00000000, 28672 }, /* MOVE */ +{ op_8000_0_comp_nf, 0x00000000, 32768 }, /* OR */ +{ op_8010_0_comp_nf, 0x00000000, 32784 }, /* OR */ +{ op_8018_0_comp_nf, 0x00000000, 32792 }, /* OR */ +{ op_8020_0_comp_nf, 0x00000000, 32800 }, /* OR */ +{ op_8028_0_comp_nf, 0x00000002, 32808 }, /* OR */ +{ op_8030_0_comp_nf, 0x00000002, 32816 }, /* OR */ +{ op_8038_0_comp_nf, 0x00000002, 32824 }, /* OR */ +{ op_8039_0_comp_nf, 0x00000002, 32825 }, /* OR */ +{ op_803a_0_comp_nf, 0x00000002, 32826 }, /* OR */ +{ op_803b_0_comp_nf, 0x00000002, 32827 }, /* OR */ +{ op_803c_0_comp_nf, 0x00000002, 32828 }, /* OR */ +{ op_8040_0_comp_nf, 0x00000000, 32832 }, /* OR */ +{ op_8050_0_comp_nf, 0x00000000, 32848 }, /* OR */ +{ op_8058_0_comp_nf, 0x00000000, 32856 }, /* OR */ +{ op_8060_0_comp_nf, 0x00000000, 32864 }, /* OR */ +{ op_8068_0_comp_nf, 0x00000002, 32872 }, /* OR */ +{ op_8070_0_comp_nf, 0x00000002, 32880 }, /* OR */ +{ op_8078_0_comp_nf, 0x00000002, 32888 }, /* OR */ +{ op_8079_0_comp_nf, 0x00000002, 32889 }, /* OR */ +{ op_807a_0_comp_nf, 0x00000002, 32890 }, /* OR */ +{ op_807b_0_comp_nf, 0x00000002, 32891 }, /* OR */ +{ op_807c_0_comp_nf, 0x00000002, 32892 }, /* OR */ +{ op_8080_0_comp_nf, 0x00000000, 32896 }, /* OR */ +{ op_8090_0_comp_nf, 0x00000000, 32912 }, /* OR */ +{ op_8098_0_comp_nf, 0x00000000, 32920 }, /* OR */ +{ op_80a0_0_comp_nf, 0x00000000, 32928 }, /* OR */ +{ op_80a8_0_comp_nf, 0x00000002, 32936 }, /* OR */ +{ op_80b0_0_comp_nf, 0x00000002, 32944 }, /* OR */ +{ op_80b8_0_comp_nf, 0x00000002, 32952 }, /* OR */ +{ op_80b9_0_comp_nf, 0x00000002, 32953 }, /* OR */ +{ op_80ba_0_comp_nf, 0x00000002, 32954 }, /* OR */ +{ op_80bb_0_comp_nf, 0x00000002, 32955 }, /* OR */ +{ op_80bc_0_comp_nf, 0x00000002, 32956 }, /* OR */ +{ op_80c0_0_comp_nf, 0x00000000, 32960 }, /* DIVU */ +{ op_80d0_0_comp_nf, 0x00000000, 32976 }, /* DIVU */ +{ op_80d8_0_comp_nf, 0x00000000, 32984 }, /* DIVU */ +{ op_80e0_0_comp_nf, 0x00000000, 32992 }, /* DIVU */ +{ op_80e8_0_comp_nf, 0x00000002, 33000 }, /* DIVU */ +{ op_80f0_0_comp_nf, 0x00000002, 33008 }, /* DIVU */ +{ op_80f8_0_comp_nf, 0x00000002, 33016 }, /* DIVU */ +{ op_80f9_0_comp_nf, 0x00000002, 33017 }, /* DIVU */ +{ op_80fa_0_comp_nf, 0x00000002, 33018 }, /* DIVU */ +{ op_80fb_0_comp_nf, 0x00000002, 33019 }, /* DIVU */ +{ op_80fc_0_comp_nf, 0x00000002, 33020 }, /* DIVU */ +{ NULL, 0x00000000, 33024 }, /* SBCD */ +{ NULL, 0x00000000, 33032 }, /* SBCD */ +{ op_8110_0_comp_nf, 0x00000000, 33040 }, /* OR */ +{ op_8118_0_comp_nf, 0x00000000, 33048 }, /* OR */ +{ op_8120_0_comp_nf, 0x00000000, 33056 }, /* OR */ +{ op_8128_0_comp_nf, 0x00000002, 33064 }, /* OR */ +{ op_8130_0_comp_nf, 0x00000002, 33072 }, /* OR */ +{ op_8138_0_comp_nf, 0x00000002, 33080 }, /* OR */ +{ op_8139_0_comp_nf, 0x00000002, 33081 }, /* OR */ +{ NULL, 0x00000000, 33088 }, /* PACK */ +{ NULL, 0x00000000, 33096 }, /* PACK */ +{ op_8150_0_comp_nf, 0x00000000, 33104 }, /* OR */ +{ op_8158_0_comp_nf, 0x00000000, 33112 }, /* OR */ +{ op_8160_0_comp_nf, 0x00000000, 33120 }, /* OR */ +{ op_8168_0_comp_nf, 0x00000002, 33128 }, /* OR */ +{ op_8170_0_comp_nf, 0x00000002, 33136 }, /* OR */ +{ op_8178_0_comp_nf, 0x00000002, 33144 }, /* OR */ +{ op_8179_0_comp_nf, 0x00000002, 33145 }, /* OR */ +{ NULL, 0x00000000, 33152 }, /* UNPK */ +{ NULL, 0x00000000, 33160 }, /* UNPK */ +{ op_8190_0_comp_nf, 0x00000000, 33168 }, /* OR */ +{ op_8198_0_comp_nf, 0x00000000, 33176 }, /* OR */ +{ op_81a0_0_comp_nf, 0x00000000, 33184 }, /* OR */ +{ op_81a8_0_comp_nf, 0x00000002, 33192 }, /* OR */ +{ op_81b0_0_comp_nf, 0x00000002, 33200 }, /* OR */ +{ op_81b8_0_comp_nf, 0x00000002, 33208 }, /* OR */ +{ op_81b9_0_comp_nf, 0x00000002, 33209 }, /* OR */ +{ op_81c0_0_comp_nf, 0x00000000, 33216 }, /* DIVS */ +{ op_81d0_0_comp_nf, 0x00000000, 33232 }, /* DIVS */ +{ op_81d8_0_comp_nf, 0x00000000, 33240 }, /* DIVS */ +{ op_81e0_0_comp_nf, 0x00000000, 33248 }, /* DIVS */ +{ op_81e8_0_comp_nf, 0x00000002, 33256 }, /* DIVS */ +{ op_81f0_0_comp_nf, 0x00000002, 33264 }, /* DIVS */ +{ op_81f8_0_comp_nf, 0x00000002, 33272 }, /* DIVS */ +{ op_81f9_0_comp_nf, 0x00000002, 33273 }, /* DIVS */ +{ op_81fa_0_comp_nf, 0x00000002, 33274 }, /* DIVS */ +{ op_81fb_0_comp_nf, 0x00000002, 33275 }, /* DIVS */ +{ op_81fc_0_comp_nf, 0x00000002, 33276 }, /* DIVS */ +{ op_9000_0_comp_nf, 0x00000000, 36864 }, /* SUB */ +{ op_9010_0_comp_nf, 0x00000000, 36880 }, /* SUB */ +{ op_9018_0_comp_nf, 0x00000000, 36888 }, /* SUB */ +{ op_9020_0_comp_nf, 0x00000000, 36896 }, /* SUB */ +{ op_9028_0_comp_nf, 0x00000002, 36904 }, /* SUB */ +{ op_9030_0_comp_nf, 0x00000002, 36912 }, /* SUB */ +{ op_9038_0_comp_nf, 0x00000002, 36920 }, /* SUB */ +{ op_9039_0_comp_nf, 0x00000002, 36921 }, /* SUB */ +{ op_903a_0_comp_nf, 0x00000002, 36922 }, /* SUB */ +{ op_903b_0_comp_nf, 0x00000002, 36923 }, /* SUB */ +{ op_903c_0_comp_nf, 0x00000002, 36924 }, /* SUB */ +{ op_9040_0_comp_nf, 0x00000000, 36928 }, /* SUB */ +{ op_9048_0_comp_nf, 0x00000000, 36936 }, /* SUB */ +{ op_9050_0_comp_nf, 0x00000000, 36944 }, /* SUB */ +{ op_9058_0_comp_nf, 0x00000000, 36952 }, /* SUB */ +{ op_9060_0_comp_nf, 0x00000000, 36960 }, /* SUB */ +{ op_9068_0_comp_nf, 0x00000002, 36968 }, /* SUB */ +{ op_9070_0_comp_nf, 0x00000002, 36976 }, /* SUB */ +{ op_9078_0_comp_nf, 0x00000002, 36984 }, /* SUB */ +{ op_9079_0_comp_nf, 0x00000002, 36985 }, /* SUB */ +{ op_907a_0_comp_nf, 0x00000002, 36986 }, /* SUB */ +{ op_907b_0_comp_nf, 0x00000002, 36987 }, /* SUB */ +{ op_907c_0_comp_nf, 0x00000002, 36988 }, /* SUB */ +{ op_9080_0_comp_nf, 0x00000000, 36992 }, /* SUB */ +{ op_9088_0_comp_nf, 0x00000000, 37000 }, /* SUB */ +{ op_9090_0_comp_nf, 0x00000000, 37008 }, /* SUB */ +{ op_9098_0_comp_nf, 0x00000000, 37016 }, /* SUB */ +{ op_90a0_0_comp_nf, 0x00000000, 37024 }, /* SUB */ +{ op_90a8_0_comp_nf, 0x00000002, 37032 }, /* SUB */ +{ op_90b0_0_comp_nf, 0x00000002, 37040 }, /* SUB */ +{ op_90b8_0_comp_nf, 0x00000002, 37048 }, /* SUB */ +{ op_90b9_0_comp_nf, 0x00000002, 37049 }, /* SUB */ +{ op_90ba_0_comp_nf, 0x00000002, 37050 }, /* SUB */ +{ op_90bb_0_comp_nf, 0x00000002, 37051 }, /* SUB */ +{ op_90bc_0_comp_nf, 0x00000002, 37052 }, /* SUB */ +{ op_90c0_0_comp_nf, 0x00000000, 37056 }, /* SUBA */ +{ op_90c8_0_comp_nf, 0x00000000, 37064 }, /* SUBA */ +{ op_90d0_0_comp_nf, 0x00000000, 37072 }, /* SUBA */ +{ op_90d8_0_comp_nf, 0x00000000, 37080 }, /* SUBA */ +{ op_90e0_0_comp_nf, 0x00000000, 37088 }, /* SUBA */ +{ op_90e8_0_comp_nf, 0x00000002, 37096 }, /* SUBA */ +{ op_90f0_0_comp_nf, 0x00000002, 37104 }, /* SUBA */ +{ op_90f8_0_comp_nf, 0x00000002, 37112 }, /* SUBA */ +{ op_90f9_0_comp_nf, 0x00000002, 37113 }, /* SUBA */ +{ op_90fa_0_comp_nf, 0x00000002, 37114 }, /* SUBA */ +{ op_90fb_0_comp_nf, 0x00000002, 37115 }, /* SUBA */ +{ op_90fc_0_comp_nf, 0x00000002, 37116 }, /* SUBA */ +{ op_9100_0_comp_nf, 0x00000008, 37120 }, /* SUBX */ +{ op_9108_0_comp_nf, 0x00000008, 37128 }, /* SUBX */ +{ op_9110_0_comp_nf, 0x00000000, 37136 }, /* SUB */ +{ op_9118_0_comp_nf, 0x00000000, 37144 }, /* SUB */ +{ op_9120_0_comp_nf, 0x00000000, 37152 }, /* SUB */ +{ op_9128_0_comp_nf, 0x00000002, 37160 }, /* SUB */ +{ op_9130_0_comp_nf, 0x00000002, 37168 }, /* SUB */ +{ op_9138_0_comp_nf, 0x00000002, 37176 }, /* SUB */ +{ op_9139_0_comp_nf, 0x00000002, 37177 }, /* SUB */ +{ op_9140_0_comp_nf, 0x00000008, 37184 }, /* SUBX */ +{ op_9148_0_comp_nf, 0x00000008, 37192 }, /* SUBX */ +{ op_9150_0_comp_nf, 0x00000000, 37200 }, /* SUB */ +{ op_9158_0_comp_nf, 0x00000000, 37208 }, /* SUB */ +{ op_9160_0_comp_nf, 0x00000000, 37216 }, /* SUB */ +{ op_9168_0_comp_nf, 0x00000002, 37224 }, /* SUB */ +{ op_9170_0_comp_nf, 0x00000002, 37232 }, /* SUB */ +{ op_9178_0_comp_nf, 0x00000002, 37240 }, /* SUB */ +{ op_9179_0_comp_nf, 0x00000002, 37241 }, /* SUB */ +{ op_9180_0_comp_nf, 0x00000008, 37248 }, /* SUBX */ +{ op_9188_0_comp_nf, 0x00000008, 37256 }, /* SUBX */ +{ op_9190_0_comp_nf, 0x00000000, 37264 }, /* SUB */ +{ op_9198_0_comp_nf, 0x00000000, 37272 }, /* SUB */ +{ op_91a0_0_comp_nf, 0x00000000, 37280 }, /* SUB */ +{ op_91a8_0_comp_nf, 0x00000002, 37288 }, /* SUB */ +{ op_91b0_0_comp_nf, 0x00000002, 37296 }, /* SUB */ +{ op_91b8_0_comp_nf, 0x00000002, 37304 }, /* SUB */ +{ op_91b9_0_comp_nf, 0x00000002, 37305 }, /* SUB */ +{ op_91c0_0_comp_nf, 0x00000000, 37312 }, /* SUBA */ +{ op_91c8_0_comp_nf, 0x00000000, 37320 }, /* SUBA */ +{ op_91d0_0_comp_nf, 0x00000000, 37328 }, /* SUBA */ +{ op_91d8_0_comp_nf, 0x00000000, 37336 }, /* SUBA */ +{ op_91e0_0_comp_nf, 0x00000000, 37344 }, /* SUBA */ +{ op_91e8_0_comp_nf, 0x00000002, 37352 }, /* SUBA */ +{ op_91f0_0_comp_nf, 0x00000002, 37360 }, /* SUBA */ +{ op_91f8_0_comp_nf, 0x00000002, 37368 }, /* SUBA */ +{ op_91f9_0_comp_nf, 0x00000002, 37369 }, /* SUBA */ +{ op_91fa_0_comp_nf, 0x00000002, 37370 }, /* SUBA */ +{ op_91fb_0_comp_nf, 0x00000002, 37371 }, /* SUBA */ +{ op_91fc_0_comp_nf, 0x00000002, 37372 }, /* SUBA */ +{ op_b000_0_comp_nf, 0x00000000, 45056 }, /* CMP */ +{ op_b010_0_comp_nf, 0x00000000, 45072 }, /* CMP */ +{ op_b018_0_comp_nf, 0x00000000, 45080 }, /* CMP */ +{ op_b020_0_comp_nf, 0x00000000, 45088 }, /* CMP */ +{ op_b028_0_comp_nf, 0x00000002, 45096 }, /* CMP */ +{ op_b030_0_comp_nf, 0x00000002, 45104 }, /* CMP */ +{ op_b038_0_comp_nf, 0x00000002, 45112 }, /* CMP */ +{ op_b039_0_comp_nf, 0x00000002, 45113 }, /* CMP */ +{ op_b03a_0_comp_nf, 0x00000002, 45114 }, /* CMP */ +{ op_b03b_0_comp_nf, 0x00000002, 45115 }, /* CMP */ +{ op_b03c_0_comp_nf, 0x00000002, 45116 }, /* CMP */ +{ op_b040_0_comp_nf, 0x00000000, 45120 }, /* CMP */ +{ op_b048_0_comp_nf, 0x00000000, 45128 }, /* CMP */ +{ op_b050_0_comp_nf, 0x00000000, 45136 }, /* CMP */ +{ op_b058_0_comp_nf, 0x00000000, 45144 }, /* CMP */ +{ op_b060_0_comp_nf, 0x00000000, 45152 }, /* CMP */ +{ op_b068_0_comp_nf, 0x00000002, 45160 }, /* CMP */ +{ op_b070_0_comp_nf, 0x00000002, 45168 }, /* CMP */ +{ op_b078_0_comp_nf, 0x00000002, 45176 }, /* CMP */ +{ op_b079_0_comp_nf, 0x00000002, 45177 }, /* CMP */ +{ op_b07a_0_comp_nf, 0x00000002, 45178 }, /* CMP */ +{ op_b07b_0_comp_nf, 0x00000002, 45179 }, /* CMP */ +{ op_b07c_0_comp_nf, 0x00000002, 45180 }, /* CMP */ +{ op_b080_0_comp_nf, 0x00000000, 45184 }, /* CMP */ +{ op_b088_0_comp_nf, 0x00000000, 45192 }, /* CMP */ +{ op_b090_0_comp_nf, 0x00000000, 45200 }, /* CMP */ +{ op_b098_0_comp_nf, 0x00000000, 45208 }, /* CMP */ +{ op_b0a0_0_comp_nf, 0x00000000, 45216 }, /* CMP */ +{ op_b0a8_0_comp_nf, 0x00000002, 45224 }, /* CMP */ +{ op_b0b0_0_comp_nf, 0x00000002, 45232 }, /* CMP */ +{ op_b0b8_0_comp_nf, 0x00000002, 45240 }, /* CMP */ +{ op_b0b9_0_comp_nf, 0x00000002, 45241 }, /* CMP */ +{ op_b0ba_0_comp_nf, 0x00000002, 45242 }, /* CMP */ +{ op_b0bb_0_comp_nf, 0x00000002, 45243 }, /* CMP */ +{ op_b0bc_0_comp_nf, 0x00000002, 45244 }, /* CMP */ +{ op_b0c0_0_comp_nf, 0x00000000, 45248 }, /* CMPA */ +{ op_b0c8_0_comp_nf, 0x00000000, 45256 }, /* CMPA */ +{ op_b0d0_0_comp_nf, 0x00000000, 45264 }, /* CMPA */ +{ op_b0d8_0_comp_nf, 0x00000000, 45272 }, /* CMPA */ +{ op_b0e0_0_comp_nf, 0x00000000, 45280 }, /* CMPA */ +{ op_b0e8_0_comp_nf, 0x00000002, 45288 }, /* CMPA */ +{ op_b0f0_0_comp_nf, 0x00000002, 45296 }, /* CMPA */ +{ op_b0f8_0_comp_nf, 0x00000002, 45304 }, /* CMPA */ +{ op_b0f9_0_comp_nf, 0x00000002, 45305 }, /* CMPA */ +{ op_b0fa_0_comp_nf, 0x00000002, 45306 }, /* CMPA */ +{ op_b0fb_0_comp_nf, 0x00000002, 45307 }, /* CMPA */ +{ op_b0fc_0_comp_nf, 0x00000002, 45308 }, /* CMPA */ +{ op_b100_0_comp_nf, 0x00000000, 45312 }, /* EOR */ +{ op_b108_0_comp_nf, 0x00000000, 45320 }, /* CMPM */ +{ op_b110_0_comp_nf, 0x00000000, 45328 }, /* EOR */ +{ op_b118_0_comp_nf, 0x00000000, 45336 }, /* EOR */ +{ op_b120_0_comp_nf, 0x00000000, 45344 }, /* EOR */ +{ op_b128_0_comp_nf, 0x00000002, 45352 }, /* EOR */ +{ op_b130_0_comp_nf, 0x00000002, 45360 }, /* EOR */ +{ op_b138_0_comp_nf, 0x00000002, 45368 }, /* EOR */ +{ op_b139_0_comp_nf, 0x00000002, 45369 }, /* EOR */ +{ op_b140_0_comp_nf, 0x00000000, 45376 }, /* EOR */ +{ op_b148_0_comp_nf, 0x00000000, 45384 }, /* CMPM */ +{ op_b150_0_comp_nf, 0x00000000, 45392 }, /* EOR */ +{ op_b158_0_comp_nf, 0x00000000, 45400 }, /* EOR */ +{ op_b160_0_comp_nf, 0x00000000, 45408 }, /* EOR */ +{ op_b168_0_comp_nf, 0x00000002, 45416 }, /* EOR */ +{ op_b170_0_comp_nf, 0x00000002, 45424 }, /* EOR */ +{ op_b178_0_comp_nf, 0x00000002, 45432 }, /* EOR */ +{ op_b179_0_comp_nf, 0x00000002, 45433 }, /* EOR */ +{ op_b180_0_comp_nf, 0x00000000, 45440 }, /* EOR */ +{ op_b188_0_comp_nf, 0x00000000, 45448 }, /* CMPM */ +{ op_b190_0_comp_nf, 0x00000000, 45456 }, /* EOR */ +{ op_b198_0_comp_nf, 0x00000000, 45464 }, /* EOR */ +{ op_b1a0_0_comp_nf, 0x00000000, 45472 }, /* EOR */ +{ op_b1a8_0_comp_nf, 0x00000002, 45480 }, /* EOR */ +{ op_b1b0_0_comp_nf, 0x00000002, 45488 }, /* EOR */ +{ op_b1b8_0_comp_nf, 0x00000002, 45496 }, /* EOR */ +{ op_b1b9_0_comp_nf, 0x00000002, 45497 }, /* EOR */ +{ op_b1c0_0_comp_nf, 0x00000000, 45504 }, /* CMPA */ +{ op_b1c8_0_comp_nf, 0x00000000, 45512 }, /* CMPA */ +{ op_b1d0_0_comp_nf, 0x00000000, 45520 }, /* CMPA */ +{ op_b1d8_0_comp_nf, 0x00000000, 45528 }, /* CMPA */ +{ op_b1e0_0_comp_nf, 0x00000000, 45536 }, /* CMPA */ +{ op_b1e8_0_comp_nf, 0x00000002, 45544 }, /* CMPA */ +{ op_b1f0_0_comp_nf, 0x00000002, 45552 }, /* CMPA */ +{ op_b1f8_0_comp_nf, 0x00000002, 45560 }, /* CMPA */ +{ op_b1f9_0_comp_nf, 0x00000002, 45561 }, /* CMPA */ +{ op_b1fa_0_comp_nf, 0x00000002, 45562 }, /* CMPA */ +{ op_b1fb_0_comp_nf, 0x00000002, 45563 }, /* CMPA */ +{ op_b1fc_0_comp_nf, 0x00000002, 45564 }, /* CMPA */ +{ op_c000_0_comp_nf, 0x00000000, 49152 }, /* AND */ +{ op_c010_0_comp_nf, 0x00000000, 49168 }, /* AND */ +{ op_c018_0_comp_nf, 0x00000000, 49176 }, /* AND */ +{ op_c020_0_comp_nf, 0x00000000, 49184 }, /* AND */ +{ op_c028_0_comp_nf, 0x00000002, 49192 }, /* AND */ +{ op_c030_0_comp_nf, 0x00000002, 49200 }, /* AND */ +{ op_c038_0_comp_nf, 0x00000002, 49208 }, /* AND */ +{ op_c039_0_comp_nf, 0x00000002, 49209 }, /* AND */ +{ op_c03a_0_comp_nf, 0x00000002, 49210 }, /* AND */ +{ op_c03b_0_comp_nf, 0x00000002, 49211 }, /* AND */ +{ op_c03c_0_comp_nf, 0x00000002, 49212 }, /* AND */ +{ op_c040_0_comp_nf, 0x00000000, 49216 }, /* AND */ +{ op_c050_0_comp_nf, 0x00000000, 49232 }, /* AND */ +{ op_c058_0_comp_nf, 0x00000000, 49240 }, /* AND */ +{ op_c060_0_comp_nf, 0x00000000, 49248 }, /* AND */ +{ op_c068_0_comp_nf, 0x00000002, 49256 }, /* AND */ +{ op_c070_0_comp_nf, 0x00000002, 49264 }, /* AND */ +{ op_c078_0_comp_nf, 0x00000002, 49272 }, /* AND */ +{ op_c079_0_comp_nf, 0x00000002, 49273 }, /* AND */ +{ op_c07a_0_comp_nf, 0x00000002, 49274 }, /* AND */ +{ op_c07b_0_comp_nf, 0x00000002, 49275 }, /* AND */ +{ op_c07c_0_comp_nf, 0x00000002, 49276 }, /* AND */ +{ op_c080_0_comp_nf, 0x00000000, 49280 }, /* AND */ +{ op_c090_0_comp_nf, 0x00000000, 49296 }, /* AND */ +{ op_c098_0_comp_nf, 0x00000000, 49304 }, /* AND */ +{ op_c0a0_0_comp_nf, 0x00000000, 49312 }, /* AND */ +{ op_c0a8_0_comp_nf, 0x00000002, 49320 }, /* AND */ +{ op_c0b0_0_comp_nf, 0x00000002, 49328 }, /* AND */ +{ op_c0b8_0_comp_nf, 0x00000002, 49336 }, /* AND */ +{ op_c0b9_0_comp_nf, 0x00000002, 49337 }, /* AND */ +{ op_c0ba_0_comp_nf, 0x00000002, 49338 }, /* AND */ +{ op_c0bb_0_comp_nf, 0x00000002, 49339 }, /* AND */ +{ op_c0bc_0_comp_nf, 0x00000002, 49340 }, /* AND */ +{ op_c0c0_0_comp_nf, 0x00000000, 49344 }, /* MULU */ +{ op_c0d0_0_comp_nf, 0x00000000, 49360 }, /* MULU */ +{ op_c0d8_0_comp_nf, 0x00000000, 49368 }, /* MULU */ +{ op_c0e0_0_comp_nf, 0x00000000, 49376 }, /* MULU */ +{ op_c0e8_0_comp_nf, 0x00000002, 49384 }, /* MULU */ +{ op_c0f0_0_comp_nf, 0x00000002, 49392 }, /* MULU */ +{ op_c0f8_0_comp_nf, 0x00000002, 49400 }, /* MULU */ +{ op_c0f9_0_comp_nf, 0x00000002, 49401 }, /* MULU */ +{ op_c0fa_0_comp_nf, 0x00000002, 49402 }, /* MULU */ +{ op_c0fb_0_comp_nf, 0x00000002, 49403 }, /* MULU */ +{ op_c0fc_0_comp_nf, 0x00000002, 49404 }, /* MULU */ +{ NULL, 0x00000000, 49408 }, /* ABCD */ +{ NULL, 0x00000000, 49416 }, /* ABCD */ +{ op_c110_0_comp_nf, 0x00000000, 49424 }, /* AND */ +{ op_c118_0_comp_nf, 0x00000000, 49432 }, /* AND */ +{ op_c120_0_comp_nf, 0x00000000, 49440 }, /* AND */ +{ op_c128_0_comp_nf, 0x00000002, 49448 }, /* AND */ +{ op_c130_0_comp_nf, 0x00000002, 49456 }, /* AND */ +{ op_c138_0_comp_nf, 0x00000002, 49464 }, /* AND */ +{ op_c139_0_comp_nf, 0x00000002, 49465 }, /* AND */ +{ op_c140_0_comp_nf, 0x00000000, 49472 }, /* EXG */ +{ op_c148_0_comp_nf, 0x00000000, 49480 }, /* EXG */ +{ op_c150_0_comp_nf, 0x00000000, 49488 }, /* AND */ +{ op_c158_0_comp_nf, 0x00000000, 49496 }, /* AND */ +{ op_c160_0_comp_nf, 0x00000000, 49504 }, /* AND */ +{ op_c168_0_comp_nf, 0x00000002, 49512 }, /* AND */ +{ op_c170_0_comp_nf, 0x00000002, 49520 }, /* AND */ +{ op_c178_0_comp_nf, 0x00000002, 49528 }, /* AND */ +{ op_c179_0_comp_nf, 0x00000002, 49529 }, /* AND */ +{ op_c188_0_comp_nf, 0x00000000, 49544 }, /* EXG */ +{ op_c190_0_comp_nf, 0x00000000, 49552 }, /* AND */ +{ op_c198_0_comp_nf, 0x00000000, 49560 }, /* AND */ +{ op_c1a0_0_comp_nf, 0x00000000, 49568 }, /* AND */ +{ op_c1a8_0_comp_nf, 0x00000002, 49576 }, /* AND */ +{ op_c1b0_0_comp_nf, 0x00000002, 49584 }, /* AND */ +{ op_c1b8_0_comp_nf, 0x00000002, 49592 }, /* AND */ +{ op_c1b9_0_comp_nf, 0x00000002, 49593 }, /* AND */ +{ op_c1c0_0_comp_nf, 0x00000000, 49600 }, /* MULS */ +{ op_c1d0_0_comp_nf, 0x00000000, 49616 }, /* MULS */ +{ op_c1d8_0_comp_nf, 0x00000000, 49624 }, /* MULS */ +{ op_c1e0_0_comp_nf, 0x00000000, 49632 }, /* MULS */ +{ op_c1e8_0_comp_nf, 0x00000002, 49640 }, /* MULS */ +{ op_c1f0_0_comp_nf, 0x00000002, 49648 }, /* MULS */ +{ op_c1f8_0_comp_nf, 0x00000002, 49656 }, /* MULS */ +{ op_c1f9_0_comp_nf, 0x00000002, 49657 }, /* MULS */ +{ op_c1fa_0_comp_nf, 0x00000002, 49658 }, /* MULS */ +{ op_c1fb_0_comp_nf, 0x00000002, 49659 }, /* MULS */ +{ op_c1fc_0_comp_nf, 0x00000002, 49660 }, /* MULS */ +{ op_d000_0_comp_nf, 0x00000000, 53248 }, /* ADD */ +{ op_d010_0_comp_nf, 0x00000000, 53264 }, /* ADD */ +{ op_d018_0_comp_nf, 0x00000000, 53272 }, /* ADD */ +{ op_d020_0_comp_nf, 0x00000000, 53280 }, /* ADD */ +{ op_d028_0_comp_nf, 0x00000002, 53288 }, /* ADD */ +{ op_d030_0_comp_nf, 0x00000002, 53296 }, /* ADD */ +{ op_d038_0_comp_nf, 0x00000002, 53304 }, /* ADD */ +{ op_d039_0_comp_nf, 0x00000002, 53305 }, /* ADD */ +{ op_d03a_0_comp_nf, 0x00000002, 53306 }, /* ADD */ +{ op_d03b_0_comp_nf, 0x00000002, 53307 }, /* ADD */ +{ op_d03c_0_comp_nf, 0x00000002, 53308 }, /* ADD */ +{ op_d040_0_comp_nf, 0x00000000, 53312 }, /* ADD */ +{ op_d048_0_comp_nf, 0x00000000, 53320 }, /* ADD */ +{ op_d050_0_comp_nf, 0x00000000, 53328 }, /* ADD */ +{ op_d058_0_comp_nf, 0x00000000, 53336 }, /* ADD */ +{ op_d060_0_comp_nf, 0x00000000, 53344 }, /* ADD */ +{ op_d068_0_comp_nf, 0x00000002, 53352 }, /* ADD */ +{ op_d070_0_comp_nf, 0x00000002, 53360 }, /* ADD */ +{ op_d078_0_comp_nf, 0x00000002, 53368 }, /* ADD */ +{ op_d079_0_comp_nf, 0x00000002, 53369 }, /* ADD */ +{ op_d07a_0_comp_nf, 0x00000002, 53370 }, /* ADD */ +{ op_d07b_0_comp_nf, 0x00000002, 53371 }, /* ADD */ +{ op_d07c_0_comp_nf, 0x00000002, 53372 }, /* ADD */ +{ op_d080_0_comp_nf, 0x00000000, 53376 }, /* ADD */ +{ op_d088_0_comp_nf, 0x00000000, 53384 }, /* ADD */ +{ op_d090_0_comp_nf, 0x00000000, 53392 }, /* ADD */ +{ op_d098_0_comp_nf, 0x00000000, 53400 }, /* ADD */ +{ op_d0a0_0_comp_nf, 0x00000000, 53408 }, /* ADD */ +{ op_d0a8_0_comp_nf, 0x00000002, 53416 }, /* ADD */ +{ op_d0b0_0_comp_nf, 0x00000002, 53424 }, /* ADD */ +{ op_d0b8_0_comp_nf, 0x00000002, 53432 }, /* ADD */ +{ op_d0b9_0_comp_nf, 0x00000002, 53433 }, /* ADD */ +{ op_d0ba_0_comp_nf, 0x00000002, 53434 }, /* ADD */ +{ op_d0bb_0_comp_nf, 0x00000002, 53435 }, /* ADD */ +{ op_d0bc_0_comp_nf, 0x00000002, 53436 }, /* ADD */ +{ op_d0c0_0_comp_nf, 0x00000000, 53440 }, /* ADDA */ +{ op_d0c8_0_comp_nf, 0x00000000, 53448 }, /* ADDA */ +{ op_d0d0_0_comp_nf, 0x00000000, 53456 }, /* ADDA */ +{ op_d0d8_0_comp_nf, 0x00000000, 53464 }, /* ADDA */ +{ op_d0e0_0_comp_nf, 0x00000000, 53472 }, /* ADDA */ +{ op_d0e8_0_comp_nf, 0x00000002, 53480 }, /* ADDA */ +{ op_d0f0_0_comp_nf, 0x00000002, 53488 }, /* ADDA */ +{ op_d0f8_0_comp_nf, 0x00000002, 53496 }, /* ADDA */ +{ op_d0f9_0_comp_nf, 0x00000002, 53497 }, /* ADDA */ +{ op_d0fa_0_comp_nf, 0x00000002, 53498 }, /* ADDA */ +{ op_d0fb_0_comp_nf, 0x00000002, 53499 }, /* ADDA */ +{ op_d0fc_0_comp_nf, 0x00000002, 53500 }, /* ADDA */ +{ op_d100_0_comp_nf, 0x00000008, 53504 }, /* ADDX */ +{ op_d108_0_comp_nf, 0x00000008, 53512 }, /* ADDX */ +{ op_d110_0_comp_nf, 0x00000000, 53520 }, /* ADD */ +{ op_d118_0_comp_nf, 0x00000000, 53528 }, /* ADD */ +{ op_d120_0_comp_nf, 0x00000000, 53536 }, /* ADD */ +{ op_d128_0_comp_nf, 0x00000002, 53544 }, /* ADD */ +{ op_d130_0_comp_nf, 0x00000002, 53552 }, /* ADD */ +{ op_d138_0_comp_nf, 0x00000002, 53560 }, /* ADD */ +{ op_d139_0_comp_nf, 0x00000002, 53561 }, /* ADD */ +{ op_d140_0_comp_nf, 0x00000008, 53568 }, /* ADDX */ +{ op_d148_0_comp_nf, 0x00000008, 53576 }, /* ADDX */ +{ op_d150_0_comp_nf, 0x00000000, 53584 }, /* ADD */ +{ op_d158_0_comp_nf, 0x00000000, 53592 }, /* ADD */ +{ op_d160_0_comp_nf, 0x00000000, 53600 }, /* ADD */ +{ op_d168_0_comp_nf, 0x00000002, 53608 }, /* ADD */ +{ op_d170_0_comp_nf, 0x00000002, 53616 }, /* ADD */ +{ op_d178_0_comp_nf, 0x00000002, 53624 }, /* ADD */ +{ op_d179_0_comp_nf, 0x00000002, 53625 }, /* ADD */ +{ op_d180_0_comp_nf, 0x00000008, 53632 }, /* ADDX */ +{ op_d188_0_comp_nf, 0x00000008, 53640 }, /* ADDX */ +{ op_d190_0_comp_nf, 0x00000000, 53648 }, /* ADD */ +{ op_d198_0_comp_nf, 0x00000000, 53656 }, /* ADD */ +{ op_d1a0_0_comp_nf, 0x00000000, 53664 }, /* ADD */ +{ op_d1a8_0_comp_nf, 0x00000002, 53672 }, /* ADD */ +{ op_d1b0_0_comp_nf, 0x00000002, 53680 }, /* ADD */ +{ op_d1b8_0_comp_nf, 0x00000002, 53688 }, /* ADD */ +{ op_d1b9_0_comp_nf, 0x00000002, 53689 }, /* ADD */ +{ op_d1c0_0_comp_nf, 0x00000000, 53696 }, /* ADDA */ +{ op_d1c8_0_comp_nf, 0x00000000, 53704 }, /* ADDA */ +{ op_d1d0_0_comp_nf, 0x00000000, 53712 }, /* ADDA */ +{ op_d1d8_0_comp_nf, 0x00000000, 53720 }, /* ADDA */ +{ op_d1e0_0_comp_nf, 0x00000000, 53728 }, /* ADDA */ +{ op_d1e8_0_comp_nf, 0x00000002, 53736 }, /* ADDA */ +{ op_d1f0_0_comp_nf, 0x00000002, 53744 }, /* ADDA */ +{ op_d1f8_0_comp_nf, 0x00000002, 53752 }, /* ADDA */ +{ op_d1f9_0_comp_nf, 0x00000002, 53753 }, /* ADDA */ +{ op_d1fa_0_comp_nf, 0x00000002, 53754 }, /* ADDA */ +{ op_d1fb_0_comp_nf, 0x00000002, 53755 }, /* ADDA */ +{ op_d1fc_0_comp_nf, 0x00000002, 53756 }, /* ADDA */ +{ op_e000_0_comp_nf, 0x00000000, 57344 }, /* ASR */ +{ op_e008_0_comp_nf, 0x00000000, 57352 }, /* LSR */ +{ op_e010_0_comp_nf, 0x00000008, 57360 }, /* ROXR */ +{ op_e018_0_comp_nf, 0x00000000, 57368 }, /* ROR */ +{ op_e020_0_comp_nf, 0x00000000, 57376 }, /* ASR */ +{ op_e028_0_comp_nf, 0x00000000, 57384 }, /* LSR */ +{ op_e030_0_comp_nf, 0x00000008, 57392 }, /* ROXR */ +{ op_e038_0_comp_nf, 0x00000000, 57400 }, /* ROR */ +{ op_e040_0_comp_nf, 0x00000000, 57408 }, /* ASR */ +{ op_e048_0_comp_nf, 0x00000000, 57416 }, /* LSR */ +{ op_e050_0_comp_nf, 0x00000008, 57424 }, /* ROXR */ +{ op_e058_0_comp_nf, 0x00000000, 57432 }, /* ROR */ +{ op_e060_0_comp_nf, 0x00000000, 57440 }, /* ASR */ +{ op_e068_0_comp_nf, 0x00000000, 57448 }, /* LSR */ +{ op_e070_0_comp_nf, 0x00000008, 57456 }, /* ROXR */ +{ op_e078_0_comp_nf, 0x00000000, 57464 }, /* ROR */ +{ op_e080_0_comp_nf, 0x00000000, 57472 }, /* ASR */ +{ op_e088_0_comp_nf, 0x00000000, 57480 }, /* LSR */ +{ op_e090_0_comp_nf, 0x00000008, 57488 }, /* ROXR */ +{ op_e098_0_comp_nf, 0x00000000, 57496 }, /* ROR */ +{ op_e0a0_0_comp_nf, 0x00000000, 57504 }, /* ASR */ +{ op_e0a8_0_comp_nf, 0x00000000, 57512 }, /* LSR */ +{ op_e0b0_0_comp_nf, 0x00000008, 57520 }, /* ROXR */ +{ op_e0b8_0_comp_nf, 0x00000000, 57528 }, /* ROR */ +{ op_e0d0_0_comp_nf, 0x00000000, 57552 }, /* ASRW */ +{ op_e0d8_0_comp_nf, 0x00000000, 57560 }, /* ASRW */ +{ op_e0e0_0_comp_nf, 0x00000000, 57568 }, /* ASRW */ +{ op_e0e8_0_comp_nf, 0x00000002, 57576 }, /* ASRW */ +{ op_e0f0_0_comp_nf, 0x00000002, 57584 }, /* ASRW */ +{ op_e0f8_0_comp_nf, 0x00000002, 57592 }, /* ASRW */ +{ op_e0f9_0_comp_nf, 0x00000002, 57593 }, /* ASRW */ +{ op_e100_0_comp_nf, 0x00000000, 57600 }, /* ASL */ +{ op_e108_0_comp_nf, 0x00000000, 57608 }, /* LSL */ +{ op_e110_0_comp_nf, 0x00000008, 57616 }, /* ROXL */ +{ op_e118_0_comp_nf, 0x00000000, 57624 }, /* ROL */ +{ op_e120_0_comp_nf, 0x00000000, 57632 }, /* ASL */ +{ op_e128_0_comp_nf, 0x00000000, 57640 }, /* LSL */ +{ op_e130_0_comp_nf, 0x00000008, 57648 }, /* ROXL */ +{ op_e138_0_comp_nf, 0x00000000, 57656 }, /* ROL */ +{ op_e140_0_comp_nf, 0x00000000, 57664 }, /* ASL */ +{ op_e148_0_comp_nf, 0x00000000, 57672 }, /* LSL */ +{ op_e150_0_comp_nf, 0x00000008, 57680 }, /* ROXL */ +{ op_e158_0_comp_nf, 0x00000000, 57688 }, /* ROL */ +{ op_e160_0_comp_nf, 0x00000000, 57696 }, /* ASL */ +{ op_e168_0_comp_nf, 0x00000000, 57704 }, /* LSL */ +{ op_e170_0_comp_nf, 0x00000008, 57712 }, /* ROXL */ +{ op_e178_0_comp_nf, 0x00000000, 57720 }, /* ROL */ +{ op_e180_0_comp_nf, 0x00000000, 57728 }, /* ASL */ +{ op_e188_0_comp_nf, 0x00000000, 57736 }, /* LSL */ +{ op_e190_0_comp_nf, 0x00000008, 57744 }, /* ROXL */ +{ op_e198_0_comp_nf, 0x00000000, 57752 }, /* ROL */ +{ op_e1a0_0_comp_nf, 0x00000000, 57760 }, /* ASL */ +{ op_e1a8_0_comp_nf, 0x00000000, 57768 }, /* LSL */ +{ op_e1b0_0_comp_nf, 0x00000008, 57776 }, /* ROXL */ +{ op_e1b8_0_comp_nf, 0x00000000, 57784 }, /* ROL */ +{ op_e1d0_0_comp_nf, 0x00000000, 57808 }, /* ASLW */ +{ op_e1d8_0_comp_nf, 0x00000000, 57816 }, /* ASLW */ +{ op_e1e0_0_comp_nf, 0x00000000, 57824 }, /* ASLW */ +{ op_e1e8_0_comp_nf, 0x00000002, 57832 }, /* ASLW */ +{ op_e1f0_0_comp_nf, 0x00000002, 57840 }, /* ASLW */ +{ op_e1f8_0_comp_nf, 0x00000002, 57848 }, /* ASLW */ +{ op_e1f9_0_comp_nf, 0x00000002, 57849 }, /* ASLW */ +{ op_e2d0_0_comp_nf, 0x00000000, 58064 }, /* LSRW */ +{ op_e2d8_0_comp_nf, 0x00000000, 58072 }, /* LSRW */ +{ op_e2e0_0_comp_nf, 0x00000000, 58080 }, /* LSRW */ +{ op_e2e8_0_comp_nf, 0x00000002, 58088 }, /* LSRW */ +{ op_e2f0_0_comp_nf, 0x00000002, 58096 }, /* LSRW */ +{ op_e2f8_0_comp_nf, 0x00000002, 58104 }, /* LSRW */ +{ op_e2f9_0_comp_nf, 0x00000002, 58105 }, /* LSRW */ +{ op_e3d0_0_comp_nf, 0x00000000, 58320 }, /* LSLW */ +{ op_e3d8_0_comp_nf, 0x00000000, 58328 }, /* LSLW */ +{ op_e3e0_0_comp_nf, 0x00000000, 58336 }, /* LSLW */ +{ op_e3e8_0_comp_nf, 0x00000002, 58344 }, /* LSLW */ +{ op_e3f0_0_comp_nf, 0x00000002, 58352 }, /* LSLW */ +{ op_e3f8_0_comp_nf, 0x00000002, 58360 }, /* LSLW */ +{ op_e3f9_0_comp_nf, 0x00000002, 58361 }, /* LSLW */ +{ NULL, 0x00000008, 58576 }, /* ROXRW */ +{ NULL, 0x00000008, 58584 }, /* ROXRW */ +{ NULL, 0x00000008, 58592 }, /* ROXRW */ +{ NULL, 0x0000000a, 58600 }, /* ROXRW */ +{ NULL, 0x0000000a, 58608 }, /* ROXRW */ +{ NULL, 0x0000000a, 58616 }, /* ROXRW */ +{ NULL, 0x0000000a, 58617 }, /* ROXRW */ +{ NULL, 0x00000008, 58832 }, /* ROXLW */ +{ NULL, 0x00000008, 58840 }, /* ROXLW */ +{ NULL, 0x00000008, 58848 }, /* ROXLW */ +{ NULL, 0x0000000a, 58856 }, /* ROXLW */ +{ NULL, 0x0000000a, 58864 }, /* ROXLW */ +{ NULL, 0x0000000a, 58872 }, /* ROXLW */ +{ NULL, 0x0000000a, 58873 }, /* ROXLW */ +{ op_e6d0_0_comp_nf, 0x00000000, 59088 }, /* RORW */ +{ op_e6d8_0_comp_nf, 0x00000000, 59096 }, /* RORW */ +{ op_e6e0_0_comp_nf, 0x00000000, 59104 }, /* RORW */ +{ op_e6e8_0_comp_nf, 0x00000002, 59112 }, /* RORW */ +{ op_e6f0_0_comp_nf, 0x00000002, 59120 }, /* RORW */ +{ op_e6f8_0_comp_nf, 0x00000002, 59128 }, /* RORW */ +{ op_e6f9_0_comp_nf, 0x00000002, 59129 }, /* RORW */ +{ op_e7d0_0_comp_nf, 0x00000000, 59344 }, /* ROLW */ +{ op_e7d8_0_comp_nf, 0x00000000, 59352 }, /* ROLW */ +{ op_e7e0_0_comp_nf, 0x00000000, 59360 }, /* ROLW */ +{ op_e7e8_0_comp_nf, 0x00000002, 59368 }, /* ROLW */ +{ op_e7f0_0_comp_nf, 0x00000002, 59376 }, /* ROLW */ +{ op_e7f8_0_comp_nf, 0x00000002, 59384 }, /* ROLW */ +{ op_e7f9_0_comp_nf, 0x00000002, 59385 }, /* ROLW */ +{ NULL, 0x00000000, 59584 }, /* BFTST */ +{ NULL, 0x00000000, 59600 }, /* BFTST */ +{ NULL, 0x00000000, 59624 }, /* BFTST */ +{ NULL, 0x00000000, 59632 }, /* BFTST */ +{ NULL, 0x00000000, 59640 }, /* BFTST */ +{ NULL, 0x00000000, 59641 }, /* BFTST */ +{ NULL, 0x00000000, 59642 }, /* BFTST */ +{ NULL, 0x00000000, 59643 }, /* BFTST */ +{ NULL, 0x00000000, 59840 }, /* BFEXTU */ +{ NULL, 0x00000000, 59856 }, /* BFEXTU */ +{ NULL, 0x00000000, 59880 }, /* BFEXTU */ +{ NULL, 0x00000000, 59888 }, /* BFEXTU */ +{ NULL, 0x00000000, 59896 }, /* BFEXTU */ +{ NULL, 0x00000000, 59897 }, /* BFEXTU */ +{ NULL, 0x00000000, 59898 }, /* BFEXTU */ +{ NULL, 0x00000000, 59899 }, /* BFEXTU */ +{ NULL, 0x00000000, 60096 }, /* BFCHG */ +{ NULL, 0x00000000, 60112 }, /* BFCHG */ +{ NULL, 0x00000000, 60136 }, /* BFCHG */ +{ NULL, 0x00000000, 60144 }, /* BFCHG */ +{ NULL, 0x00000000, 60152 }, /* BFCHG */ +{ NULL, 0x00000000, 60153 }, /* BFCHG */ +{ NULL, 0x00000000, 60352 }, /* BFEXTS */ +{ NULL, 0x00000000, 60368 }, /* BFEXTS */ +{ NULL, 0x00000000, 60392 }, /* BFEXTS */ +{ NULL, 0x00000000, 60400 }, /* BFEXTS */ +{ NULL, 0x00000000, 60408 }, /* BFEXTS */ +{ NULL, 0x00000000, 60409 }, /* BFEXTS */ +{ NULL, 0x00000000, 60410 }, /* BFEXTS */ +{ NULL, 0x00000000, 60411 }, /* BFEXTS */ +{ NULL, 0x00000000, 60608 }, /* BFCLR */ +{ NULL, 0x00000000, 60624 }, /* BFCLR */ +{ NULL, 0x00000000, 60648 }, /* BFCLR */ +{ NULL, 0x00000000, 60656 }, /* BFCLR */ +{ NULL, 0x00000000, 60664 }, /* BFCLR */ +{ NULL, 0x00000000, 60665 }, /* BFCLR */ +{ NULL, 0x00000000, 60864 }, /* BFFFO */ +{ NULL, 0x00000000, 60880 }, /* BFFFO */ +{ NULL, 0x00000000, 60904 }, /* BFFFO */ +{ NULL, 0x00000000, 60912 }, /* BFFFO */ +{ NULL, 0x00000000, 60920 }, /* BFFFO */ +{ NULL, 0x00000000, 60921 }, /* BFFFO */ +{ NULL, 0x00000000, 60922 }, /* BFFFO */ +{ NULL, 0x00000000, 60923 }, /* BFFFO */ +{ NULL, 0x00000000, 61120 }, /* BFSET */ +{ NULL, 0x00000000, 61136 }, /* BFSET */ +{ NULL, 0x00000000, 61160 }, /* BFSET */ +{ NULL, 0x00000000, 61168 }, /* BFSET */ +{ NULL, 0x00000000, 61176 }, /* BFSET */ +{ NULL, 0x00000000, 61177 }, /* BFSET */ +{ op_efc0_0_comp_nf, 0x00000002, 61376 }, /* BFINS */ +{ op_efd0_0_comp_nf, 0x00000002, 61392 }, /* BFINS */ +{ op_efe8_0_comp_nf, 0x00000002, 61416 }, /* BFINS */ +{ op_eff0_0_comp_nf, 0x00000002, 61424 }, /* BFINS */ +{ op_eff8_0_comp_nf, 0x00000002, 61432 }, /* BFINS */ +{ op_eff9_0_comp_nf, 0x00000002, 61433 }, /* BFINS */ +{ NULL, 0x00000001, 61440 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61448 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61456 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61464 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61472 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61480 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61488 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61496 }, /* MMUOP030 */ +{ NULL, 0x00000001, 61497 }, /* MMUOP030 */ +{ op_f200_0_comp_nf, 0x00000022, 61952 }, /* FPP */ +{ op_f208_0_comp_nf, 0x00000022, 61960 }, /* FPP */ +{ op_f210_0_comp_nf, 0x00000022, 61968 }, /* FPP */ +{ op_f218_0_comp_nf, 0x00000022, 61976 }, /* FPP */ +{ op_f220_0_comp_nf, 0x00000022, 61984 }, /* FPP */ +{ op_f228_0_comp_nf, 0x00000022, 61992 }, /* FPP */ +{ op_f230_0_comp_nf, 0x00000022, 62000 }, /* FPP */ +{ op_f238_0_comp_nf, 0x00000022, 62008 }, /* FPP */ +{ op_f239_0_comp_nf, 0x00000022, 62009 }, /* FPP */ +{ op_f23a_0_comp_nf, 0x00000022, 62010 }, /* FPP */ +{ op_f23b_0_comp_nf, 0x00000022, 62011 }, /* FPP */ +{ op_f23c_0_comp_nf, 0x00000022, 62012 }, /* FPP */ +{ op_f240_0_comp_nf, 0x00000006, 62016 }, /* FScc */ +{ NULL, 0x00000021, 62024 }, /* FDBcc */ +{ op_f250_0_comp_nf, 0x00000006, 62032 }, /* FScc */ +{ op_f258_0_comp_nf, 0x00000006, 62040 }, /* FScc */ +{ op_f260_0_comp_nf, 0x00000006, 62048 }, /* FScc */ +{ op_f268_0_comp_nf, 0x00000006, 62056 }, /* FScc */ +{ op_f270_0_comp_nf, 0x00000006, 62064 }, /* FScc */ +{ op_f278_0_comp_nf, 0x00000006, 62072 }, /* FScc */ +{ op_f279_0_comp_nf, 0x00000006, 62073 }, /* FScc */ +{ NULL, 0x00000021, 62074 }, /* FTRAPcc */ +{ NULL, 0x00000021, 62075 }, /* FTRAPcc */ +{ NULL, 0x00000021, 62076 }, /* FTRAPcc */ +{ op_f280_0_comp_nf, 0x00000005, 62080 }, /* FBcc */ +{ op_f2c0_0_comp_nf, 0x00000005, 62144 }, /* FBcc */ +{ NULL, 0x00000020, 62224 }, /* FSAVE */ +{ NULL, 0x00000020, 62240 }, /* FSAVE */ +{ NULL, 0x00000020, 62248 }, /* FSAVE */ +{ NULL, 0x00000020, 62256 }, /* FSAVE */ +{ NULL, 0x00000020, 62264 }, /* FSAVE */ +{ NULL, 0x00000020, 62265 }, /* FSAVE */ +{ NULL, 0x00000020, 62288 }, /* FRESTORE */ +{ NULL, 0x00000020, 62296 }, /* FRESTORE */ +{ NULL, 0x00000020, 62312 }, /* FRESTORE */ +{ NULL, 0x00000020, 62320 }, /* FRESTORE */ +{ NULL, 0x00000020, 62328 }, /* FRESTORE */ +{ NULL, 0x00000020, 62329 }, /* FRESTORE */ +{ NULL, 0x00000020, 62330 }, /* FRESTORE */ +{ NULL, 0x00000020, 62331 }, /* FRESTORE */ +{ NULL, 0x00000001, 62472 }, /* CINVL */ +{ NULL, 0x00000001, 62480 }, /* CINVP */ +{ NULL, 0x00000001, 62488 }, /* CINVA */ +{ NULL, 0x00000001, 62489 }, /* CINVA */ +{ NULL, 0x00000001, 62490 }, /* CINVA */ +{ NULL, 0x00000001, 62491 }, /* CINVA */ +{ NULL, 0x00000001, 62492 }, /* CINVA */ +{ NULL, 0x00000001, 62493 }, /* CINVA */ +{ NULL, 0x00000001, 62494 }, /* CINVA */ +{ NULL, 0x00000001, 62495 }, /* CINVA */ +{ NULL, 0x00000001, 62504 }, /* CPUSHL */ +{ NULL, 0x00000001, 62512 }, /* CPUSHP */ +{ NULL, 0x00000001, 62520 }, /* CPUSHA */ +{ NULL, 0x00000001, 62521 }, /* CPUSHA */ +{ NULL, 0x00000001, 62522 }, /* CPUSHA */ +{ NULL, 0x00000001, 62523 }, /* CPUSHA */ +{ NULL, 0x00000001, 62524 }, /* CPUSHA */ +{ NULL, 0x00000001, 62525 }, /* CPUSHA */ +{ NULL, 0x00000001, 62526 }, /* CPUSHA */ +{ NULL, 0x00000001, 62527 }, /* CPUSHA */ +{ NULL, 0x00000001, 62720 }, /* PFLUSHN */ +{ NULL, 0x00000001, 62728 }, /* PFLUSH */ +{ NULL, 0x00000001, 62736 }, /* PFLUSHAN */ +{ NULL, 0x00000001, 62744 }, /* PFLUSHA */ +{ NULL, 0x00000001, 62792 }, /* PTESTW */ +{ NULL, 0x00000001, 62824 }, /* PTESTR */ +{ op_f600_0_comp_nf, 0x00000002, 62976 }, /* MOVE16 */ +{ op_f608_0_comp_nf, 0x00000002, 62984 }, /* MOVE16 */ +{ op_f610_0_comp_nf, 0x00000002, 62992 }, /* MOVE16 */ +{ op_f618_0_comp_nf, 0x00000002, 63000 }, /* MOVE16 */ +{ op_f620_0_comp_nf, 0x00000002, 63008 }, /* MOVE16 */ +{ 0, 0,65536 }}; +#endif diff --git a/src/jit/arm/comptbl_arm.h b/src/jit/arm/comptbl_arm.h new file mode 100644 index 000000000..872e4e0c2 --- /dev/null +++ b/src/jit/arm/comptbl_arm.h @@ -0,0 +1,3054 @@ +extern const struct comptbl op_smalltbl_0_comp_nf[]; +extern const struct comptbl op_smalltbl_0_comp_ff[]; +extern compop_func op_0_0_comp_ff; +extern compop_func op_10_0_comp_ff; +extern compop_func op_18_0_comp_ff; +extern compop_func op_20_0_comp_ff; +extern compop_func op_28_0_comp_ff; +extern compop_func op_30_0_comp_ff; +extern compop_func op_38_0_comp_ff; +extern compop_func op_39_0_comp_ff; +extern compop_func op_3c_0_comp_ff; +extern compop_func op_40_0_comp_ff; +extern compop_func op_50_0_comp_ff; +extern compop_func op_58_0_comp_ff; +extern compop_func op_60_0_comp_ff; +extern compop_func op_68_0_comp_ff; +extern compop_func op_70_0_comp_ff; +extern compop_func op_78_0_comp_ff; +extern compop_func op_79_0_comp_ff; +extern compop_func op_80_0_comp_ff; +extern compop_func op_90_0_comp_ff; +extern compop_func op_98_0_comp_ff; +extern compop_func op_a0_0_comp_ff; +extern compop_func op_a8_0_comp_ff; +extern compop_func op_b0_0_comp_ff; +extern compop_func op_b8_0_comp_ff; +extern compop_func op_b9_0_comp_ff; +extern compop_func op_100_0_comp_ff; +extern compop_func op_110_0_comp_ff; +extern compop_func op_118_0_comp_ff; +extern compop_func op_120_0_comp_ff; +extern compop_func op_128_0_comp_ff; +extern compop_func op_130_0_comp_ff; +extern compop_func op_138_0_comp_ff; +extern compop_func op_139_0_comp_ff; +extern compop_func op_13a_0_comp_ff; +extern compop_func op_13b_0_comp_ff; +extern compop_func op_13c_0_comp_ff; +extern compop_func op_140_0_comp_ff; +extern compop_func op_150_0_comp_ff; +extern compop_func op_158_0_comp_ff; +extern compop_func op_160_0_comp_ff; +extern compop_func op_168_0_comp_ff; +extern compop_func op_170_0_comp_ff; +extern compop_func op_178_0_comp_ff; +extern compop_func op_179_0_comp_ff; +extern compop_func op_180_0_comp_ff; +extern compop_func op_190_0_comp_ff; +extern compop_func op_198_0_comp_ff; +extern compop_func op_1a0_0_comp_ff; +extern compop_func op_1a8_0_comp_ff; +extern compop_func op_1b0_0_comp_ff; +extern compop_func op_1b8_0_comp_ff; +extern compop_func op_1b9_0_comp_ff; +extern compop_func op_1c0_0_comp_ff; +extern compop_func op_1d0_0_comp_ff; +extern compop_func op_1d8_0_comp_ff; +extern compop_func op_1e0_0_comp_ff; +extern compop_func op_1e8_0_comp_ff; +extern compop_func op_1f0_0_comp_ff; +extern compop_func op_1f8_0_comp_ff; +extern compop_func op_1f9_0_comp_ff; +extern compop_func op_200_0_comp_ff; +extern compop_func op_210_0_comp_ff; +extern compop_func op_218_0_comp_ff; +extern compop_func op_220_0_comp_ff; +extern compop_func op_228_0_comp_ff; +extern compop_func op_230_0_comp_ff; +extern compop_func op_238_0_comp_ff; +extern compop_func op_239_0_comp_ff; +extern compop_func op_23c_0_comp_ff; +extern compop_func op_240_0_comp_ff; +extern compop_func op_250_0_comp_ff; +extern compop_func op_258_0_comp_ff; +extern compop_func op_260_0_comp_ff; +extern compop_func op_268_0_comp_ff; +extern compop_func op_270_0_comp_ff; +extern compop_func op_278_0_comp_ff; +extern compop_func op_279_0_comp_ff; +extern compop_func op_280_0_comp_ff; +extern compop_func op_290_0_comp_ff; +extern compop_func op_298_0_comp_ff; +extern compop_func op_2a0_0_comp_ff; +extern compop_func op_2a8_0_comp_ff; +extern compop_func op_2b0_0_comp_ff; +extern compop_func op_2b8_0_comp_ff; +extern compop_func op_2b9_0_comp_ff; +extern compop_func op_400_0_comp_ff; +extern compop_func op_410_0_comp_ff; +extern compop_func op_418_0_comp_ff; +extern compop_func op_420_0_comp_ff; +extern compop_func op_428_0_comp_ff; +extern compop_func op_430_0_comp_ff; +extern compop_func op_438_0_comp_ff; +extern compop_func op_439_0_comp_ff; +extern compop_func op_440_0_comp_ff; +extern compop_func op_450_0_comp_ff; +extern compop_func op_458_0_comp_ff; +extern compop_func op_460_0_comp_ff; +extern compop_func op_468_0_comp_ff; +extern compop_func op_470_0_comp_ff; +extern compop_func op_478_0_comp_ff; +extern compop_func op_479_0_comp_ff; +extern compop_func op_480_0_comp_ff; +extern compop_func op_490_0_comp_ff; +extern compop_func op_498_0_comp_ff; +extern compop_func op_4a0_0_comp_ff; +extern compop_func op_4a8_0_comp_ff; +extern compop_func op_4b0_0_comp_ff; +extern compop_func op_4b8_0_comp_ff; +extern compop_func op_4b9_0_comp_ff; +extern compop_func op_600_0_comp_ff; +extern compop_func op_610_0_comp_ff; +extern compop_func op_618_0_comp_ff; +extern compop_func op_620_0_comp_ff; +extern compop_func op_628_0_comp_ff; +extern compop_func op_630_0_comp_ff; +extern compop_func op_638_0_comp_ff; +extern compop_func op_639_0_comp_ff; +extern compop_func op_640_0_comp_ff; +extern compop_func op_650_0_comp_ff; +extern compop_func op_658_0_comp_ff; +extern compop_func op_660_0_comp_ff; +extern compop_func op_668_0_comp_ff; +extern compop_func op_670_0_comp_ff; +extern compop_func op_678_0_comp_ff; +extern compop_func op_679_0_comp_ff; +extern compop_func op_680_0_comp_ff; +extern compop_func op_690_0_comp_ff; +extern compop_func op_698_0_comp_ff; +extern compop_func op_6a0_0_comp_ff; +extern compop_func op_6a8_0_comp_ff; +extern compop_func op_6b0_0_comp_ff; +extern compop_func op_6b8_0_comp_ff; +extern compop_func op_6b9_0_comp_ff; +extern compop_func op_800_0_comp_ff; +extern compop_func op_810_0_comp_ff; +extern compop_func op_818_0_comp_ff; +extern compop_func op_820_0_comp_ff; +extern compop_func op_828_0_comp_ff; +extern compop_func op_830_0_comp_ff; +extern compop_func op_838_0_comp_ff; +extern compop_func op_839_0_comp_ff; +extern compop_func op_83a_0_comp_ff; +extern compop_func op_83b_0_comp_ff; +extern compop_func op_840_0_comp_ff; +extern compop_func op_850_0_comp_ff; +extern compop_func op_858_0_comp_ff; +extern compop_func op_860_0_comp_ff; +extern compop_func op_868_0_comp_ff; +extern compop_func op_870_0_comp_ff; +extern compop_func op_878_0_comp_ff; +extern compop_func op_879_0_comp_ff; +extern compop_func op_880_0_comp_ff; +extern compop_func op_890_0_comp_ff; +extern compop_func op_898_0_comp_ff; +extern compop_func op_8a0_0_comp_ff; +extern compop_func op_8a8_0_comp_ff; +extern compop_func op_8b0_0_comp_ff; +extern compop_func op_8b8_0_comp_ff; +extern compop_func op_8b9_0_comp_ff; +extern compop_func op_8c0_0_comp_ff; +extern compop_func op_8d0_0_comp_ff; +extern compop_func op_8d8_0_comp_ff; +extern compop_func op_8e0_0_comp_ff; +extern compop_func op_8e8_0_comp_ff; +extern compop_func op_8f0_0_comp_ff; +extern compop_func op_8f8_0_comp_ff; +extern compop_func op_8f9_0_comp_ff; +extern compop_func op_a00_0_comp_ff; +extern compop_func op_a10_0_comp_ff; +extern compop_func op_a18_0_comp_ff; +extern compop_func op_a20_0_comp_ff; +extern compop_func op_a28_0_comp_ff; +extern compop_func op_a30_0_comp_ff; +extern compop_func op_a38_0_comp_ff; +extern compop_func op_a39_0_comp_ff; +extern compop_func op_a3c_0_comp_ff; +extern compop_func op_a40_0_comp_ff; +extern compop_func op_a50_0_comp_ff; +extern compop_func op_a58_0_comp_ff; +extern compop_func op_a60_0_comp_ff; +extern compop_func op_a68_0_comp_ff; +extern compop_func op_a70_0_comp_ff; +extern compop_func op_a78_0_comp_ff; +extern compop_func op_a79_0_comp_ff; +extern compop_func op_a80_0_comp_ff; +extern compop_func op_a90_0_comp_ff; +extern compop_func op_a98_0_comp_ff; +extern compop_func op_aa0_0_comp_ff; +extern compop_func op_aa8_0_comp_ff; +extern compop_func op_ab0_0_comp_ff; +extern compop_func op_ab8_0_comp_ff; +extern compop_func op_ab9_0_comp_ff; +extern compop_func op_c00_0_comp_ff; +extern compop_func op_c10_0_comp_ff; +extern compop_func op_c18_0_comp_ff; +extern compop_func op_c20_0_comp_ff; +extern compop_func op_c28_0_comp_ff; +extern compop_func op_c30_0_comp_ff; +extern compop_func op_c38_0_comp_ff; +extern compop_func op_c39_0_comp_ff; +extern compop_func op_c3a_0_comp_ff; +extern compop_func op_c3b_0_comp_ff; +extern compop_func op_c40_0_comp_ff; +extern compop_func op_c50_0_comp_ff; +extern compop_func op_c58_0_comp_ff; +extern compop_func op_c60_0_comp_ff; +extern compop_func op_c68_0_comp_ff; +extern compop_func op_c70_0_comp_ff; +extern compop_func op_c78_0_comp_ff; +extern compop_func op_c79_0_comp_ff; +extern compop_func op_c7a_0_comp_ff; +extern compop_func op_c7b_0_comp_ff; +extern compop_func op_c80_0_comp_ff; +extern compop_func op_c90_0_comp_ff; +extern compop_func op_c98_0_comp_ff; +extern compop_func op_ca0_0_comp_ff; +extern compop_func op_ca8_0_comp_ff; +extern compop_func op_cb0_0_comp_ff; +extern compop_func op_cb8_0_comp_ff; +extern compop_func op_cb9_0_comp_ff; +extern compop_func op_cba_0_comp_ff; +extern compop_func op_cbb_0_comp_ff; +extern compop_func op_1000_0_comp_ff; +extern compop_func op_1010_0_comp_ff; +extern compop_func op_1018_0_comp_ff; +extern compop_func op_1020_0_comp_ff; +extern compop_func op_1028_0_comp_ff; +extern compop_func op_1030_0_comp_ff; +extern compop_func op_1038_0_comp_ff; +extern compop_func op_1039_0_comp_ff; +extern compop_func op_103a_0_comp_ff; +extern compop_func op_103b_0_comp_ff; +extern compop_func op_103c_0_comp_ff; +extern compop_func op_1080_0_comp_ff; +extern compop_func op_1090_0_comp_ff; +extern compop_func op_1098_0_comp_ff; +extern compop_func op_10a0_0_comp_ff; +extern compop_func op_10a8_0_comp_ff; +extern compop_func op_10b0_0_comp_ff; +extern compop_func op_10b8_0_comp_ff; +extern compop_func op_10b9_0_comp_ff; +extern compop_func op_10ba_0_comp_ff; +extern compop_func op_10bb_0_comp_ff; +extern compop_func op_10bc_0_comp_ff; +extern compop_func op_10c0_0_comp_ff; +extern compop_func op_10d0_0_comp_ff; +extern compop_func op_10d8_0_comp_ff; +extern compop_func op_10e0_0_comp_ff; +extern compop_func op_10e8_0_comp_ff; +extern compop_func op_10f0_0_comp_ff; +extern compop_func op_10f8_0_comp_ff; +extern compop_func op_10f9_0_comp_ff; +extern compop_func op_10fa_0_comp_ff; +extern compop_func op_10fb_0_comp_ff; +extern compop_func op_10fc_0_comp_ff; +extern compop_func op_1100_0_comp_ff; +extern compop_func op_1110_0_comp_ff; +extern compop_func op_1118_0_comp_ff; +extern compop_func op_1120_0_comp_ff; +extern compop_func op_1128_0_comp_ff; +extern compop_func op_1130_0_comp_ff; +extern compop_func op_1138_0_comp_ff; +extern compop_func op_1139_0_comp_ff; +extern compop_func op_113a_0_comp_ff; +extern compop_func op_113b_0_comp_ff; +extern compop_func op_113c_0_comp_ff; +extern compop_func op_1140_0_comp_ff; +extern compop_func op_1150_0_comp_ff; +extern compop_func op_1158_0_comp_ff; +extern compop_func op_1160_0_comp_ff; +extern compop_func op_1168_0_comp_ff; +extern compop_func op_1170_0_comp_ff; +extern compop_func op_1178_0_comp_ff; +extern compop_func op_1179_0_comp_ff; +extern compop_func op_117a_0_comp_ff; +extern compop_func op_117b_0_comp_ff; +extern compop_func op_117c_0_comp_ff; +extern compop_func op_1180_0_comp_ff; +extern compop_func op_1190_0_comp_ff; +extern compop_func op_1198_0_comp_ff; +extern compop_func op_11a0_0_comp_ff; +extern compop_func op_11a8_0_comp_ff; +extern compop_func op_11b0_0_comp_ff; +extern compop_func op_11b8_0_comp_ff; +extern compop_func op_11b9_0_comp_ff; +extern compop_func op_11ba_0_comp_ff; +extern compop_func op_11bb_0_comp_ff; +extern compop_func op_11bc_0_comp_ff; +extern compop_func op_11c0_0_comp_ff; +extern compop_func op_11d0_0_comp_ff; +extern compop_func op_11d8_0_comp_ff; +extern compop_func op_11e0_0_comp_ff; +extern compop_func op_11e8_0_comp_ff; +extern compop_func op_11f0_0_comp_ff; +extern compop_func op_11f8_0_comp_ff; +extern compop_func op_11f9_0_comp_ff; +extern compop_func op_11fa_0_comp_ff; +extern compop_func op_11fb_0_comp_ff; +extern compop_func op_11fc_0_comp_ff; +extern compop_func op_13c0_0_comp_ff; +extern compop_func op_13d0_0_comp_ff; +extern compop_func op_13d8_0_comp_ff; +extern compop_func op_13e0_0_comp_ff; +extern compop_func op_13e8_0_comp_ff; +extern compop_func op_13f0_0_comp_ff; +extern compop_func op_13f8_0_comp_ff; +extern compop_func op_13f9_0_comp_ff; +extern compop_func op_13fa_0_comp_ff; +extern compop_func op_13fb_0_comp_ff; +extern compop_func op_13fc_0_comp_ff; +extern compop_func op_2000_0_comp_ff; +extern compop_func op_2008_0_comp_ff; +extern compop_func op_2010_0_comp_ff; +extern compop_func op_2018_0_comp_ff; +extern compop_func op_2020_0_comp_ff; +extern compop_func op_2028_0_comp_ff; +extern compop_func op_2030_0_comp_ff; +extern compop_func op_2038_0_comp_ff; +extern compop_func op_2039_0_comp_ff; +extern compop_func op_203a_0_comp_ff; +extern compop_func op_203b_0_comp_ff; +extern compop_func op_203c_0_comp_ff; +extern compop_func op_2040_0_comp_ff; +extern compop_func op_2048_0_comp_ff; +extern compop_func op_2050_0_comp_ff; +extern compop_func op_2058_0_comp_ff; +extern compop_func op_2060_0_comp_ff; +extern compop_func op_2068_0_comp_ff; +extern compop_func op_2070_0_comp_ff; +extern compop_func op_2078_0_comp_ff; +extern compop_func op_2079_0_comp_ff; +extern compop_func op_207a_0_comp_ff; +extern compop_func op_207b_0_comp_ff; +extern compop_func op_207c_0_comp_ff; +extern compop_func op_2080_0_comp_ff; +extern compop_func op_2088_0_comp_ff; +extern compop_func op_2090_0_comp_ff; +extern compop_func op_2098_0_comp_ff; +extern compop_func op_20a0_0_comp_ff; +extern compop_func op_20a8_0_comp_ff; +extern compop_func op_20b0_0_comp_ff; +extern compop_func op_20b8_0_comp_ff; +extern compop_func op_20b9_0_comp_ff; +extern compop_func op_20ba_0_comp_ff; +extern compop_func op_20bb_0_comp_ff; +extern compop_func op_20bc_0_comp_ff; +extern compop_func op_20c0_0_comp_ff; +extern compop_func op_20c8_0_comp_ff; +extern compop_func op_20d0_0_comp_ff; +extern compop_func op_20d8_0_comp_ff; +extern compop_func op_20e0_0_comp_ff; +extern compop_func op_20e8_0_comp_ff; +extern compop_func op_20f0_0_comp_ff; +extern compop_func op_20f8_0_comp_ff; +extern compop_func op_20f9_0_comp_ff; +extern compop_func op_20fa_0_comp_ff; +extern compop_func op_20fb_0_comp_ff; +extern compop_func op_20fc_0_comp_ff; +extern compop_func op_2100_0_comp_ff; +extern compop_func op_2108_0_comp_ff; +extern compop_func op_2110_0_comp_ff; +extern compop_func op_2118_0_comp_ff; +extern compop_func op_2120_0_comp_ff; +extern compop_func op_2128_0_comp_ff; +extern compop_func op_2130_0_comp_ff; +extern compop_func op_2138_0_comp_ff; +extern compop_func op_2139_0_comp_ff; +extern compop_func op_213a_0_comp_ff; +extern compop_func op_213b_0_comp_ff; +extern compop_func op_213c_0_comp_ff; +extern compop_func op_2140_0_comp_ff; +extern compop_func op_2148_0_comp_ff; +extern compop_func op_2150_0_comp_ff; +extern compop_func op_2158_0_comp_ff; +extern compop_func op_2160_0_comp_ff; +extern compop_func op_2168_0_comp_ff; +extern compop_func op_2170_0_comp_ff; +extern compop_func op_2178_0_comp_ff; +extern compop_func op_2179_0_comp_ff; +extern compop_func op_217a_0_comp_ff; +extern compop_func op_217b_0_comp_ff; +extern compop_func op_217c_0_comp_ff; +extern compop_func op_2180_0_comp_ff; +extern compop_func op_2188_0_comp_ff; +extern compop_func op_2190_0_comp_ff; +extern compop_func op_2198_0_comp_ff; +extern compop_func op_21a0_0_comp_ff; +extern compop_func op_21a8_0_comp_ff; +extern compop_func op_21b0_0_comp_ff; +extern compop_func op_21b8_0_comp_ff; +extern compop_func op_21b9_0_comp_ff; +extern compop_func op_21ba_0_comp_ff; +extern compop_func op_21bb_0_comp_ff; +extern compop_func op_21bc_0_comp_ff; +extern compop_func op_21c0_0_comp_ff; +extern compop_func op_21c8_0_comp_ff; +extern compop_func op_21d0_0_comp_ff; +extern compop_func op_21d8_0_comp_ff; +extern compop_func op_21e0_0_comp_ff; +extern compop_func op_21e8_0_comp_ff; +extern compop_func op_21f0_0_comp_ff; +extern compop_func op_21f8_0_comp_ff; +extern compop_func op_21f9_0_comp_ff; +extern compop_func op_21fa_0_comp_ff; +extern compop_func op_21fb_0_comp_ff; +extern compop_func op_21fc_0_comp_ff; +extern compop_func op_23c0_0_comp_ff; +extern compop_func op_23c8_0_comp_ff; +extern compop_func op_23d0_0_comp_ff; +extern compop_func op_23d8_0_comp_ff; +extern compop_func op_23e0_0_comp_ff; +extern compop_func op_23e8_0_comp_ff; +extern compop_func op_23f0_0_comp_ff; +extern compop_func op_23f8_0_comp_ff; +extern compop_func op_23f9_0_comp_ff; +extern compop_func op_23fa_0_comp_ff; +extern compop_func op_23fb_0_comp_ff; +extern compop_func op_23fc_0_comp_ff; +extern compop_func op_3000_0_comp_ff; +extern compop_func op_3008_0_comp_ff; +extern compop_func op_3010_0_comp_ff; +extern compop_func op_3018_0_comp_ff; +extern compop_func op_3020_0_comp_ff; +extern compop_func op_3028_0_comp_ff; +extern compop_func op_3030_0_comp_ff; +extern compop_func op_3038_0_comp_ff; +extern compop_func op_3039_0_comp_ff; +extern compop_func op_303a_0_comp_ff; +extern compop_func op_303b_0_comp_ff; +extern compop_func op_303c_0_comp_ff; +extern compop_func op_3040_0_comp_ff; +extern compop_func op_3048_0_comp_ff; +extern compop_func op_3050_0_comp_ff; +extern compop_func op_3058_0_comp_ff; +extern compop_func op_3060_0_comp_ff; +extern compop_func op_3068_0_comp_ff; +extern compop_func op_3070_0_comp_ff; +extern compop_func op_3078_0_comp_ff; +extern compop_func op_3079_0_comp_ff; +extern compop_func op_307a_0_comp_ff; +extern compop_func op_307b_0_comp_ff; +extern compop_func op_307c_0_comp_ff; +extern compop_func op_3080_0_comp_ff; +extern compop_func op_3088_0_comp_ff; +extern compop_func op_3090_0_comp_ff; +extern compop_func op_3098_0_comp_ff; +extern compop_func op_30a0_0_comp_ff; +extern compop_func op_30a8_0_comp_ff; +extern compop_func op_30b0_0_comp_ff; +extern compop_func op_30b8_0_comp_ff; +extern compop_func op_30b9_0_comp_ff; +extern compop_func op_30ba_0_comp_ff; +extern compop_func op_30bb_0_comp_ff; +extern compop_func op_30bc_0_comp_ff; +extern compop_func op_30c0_0_comp_ff; +extern compop_func op_30c8_0_comp_ff; +extern compop_func op_30d0_0_comp_ff; +extern compop_func op_30d8_0_comp_ff; +extern compop_func op_30e0_0_comp_ff; +extern compop_func op_30e8_0_comp_ff; +extern compop_func op_30f0_0_comp_ff; +extern compop_func op_30f8_0_comp_ff; +extern compop_func op_30f9_0_comp_ff; +extern compop_func op_30fa_0_comp_ff; +extern compop_func op_30fb_0_comp_ff; +extern compop_func op_30fc_0_comp_ff; +extern compop_func op_3100_0_comp_ff; +extern compop_func op_3108_0_comp_ff; +extern compop_func op_3110_0_comp_ff; +extern compop_func op_3118_0_comp_ff; +extern compop_func op_3120_0_comp_ff; +extern compop_func op_3128_0_comp_ff; +extern compop_func op_3130_0_comp_ff; +extern compop_func op_3138_0_comp_ff; +extern compop_func op_3139_0_comp_ff; +extern compop_func op_313a_0_comp_ff; +extern compop_func op_313b_0_comp_ff; +extern compop_func op_313c_0_comp_ff; +extern compop_func op_3140_0_comp_ff; +extern compop_func op_3148_0_comp_ff; +extern compop_func op_3150_0_comp_ff; +extern compop_func op_3158_0_comp_ff; +extern compop_func op_3160_0_comp_ff; +extern compop_func op_3168_0_comp_ff; +extern compop_func op_3170_0_comp_ff; +extern compop_func op_3178_0_comp_ff; +extern compop_func op_3179_0_comp_ff; +extern compop_func op_317a_0_comp_ff; +extern compop_func op_317b_0_comp_ff; +extern compop_func op_317c_0_comp_ff; +extern compop_func op_3180_0_comp_ff; +extern compop_func op_3188_0_comp_ff; +extern compop_func op_3190_0_comp_ff; +extern compop_func op_3198_0_comp_ff; +extern compop_func op_31a0_0_comp_ff; +extern compop_func op_31a8_0_comp_ff; +extern compop_func op_31b0_0_comp_ff; +extern compop_func op_31b8_0_comp_ff; +extern compop_func op_31b9_0_comp_ff; +extern compop_func op_31ba_0_comp_ff; +extern compop_func op_31bb_0_comp_ff; +extern compop_func op_31bc_0_comp_ff; +extern compop_func op_31c0_0_comp_ff; +extern compop_func op_31c8_0_comp_ff; +extern compop_func op_31d0_0_comp_ff; +extern compop_func op_31d8_0_comp_ff; +extern compop_func op_31e0_0_comp_ff; +extern compop_func op_31e8_0_comp_ff; +extern compop_func op_31f0_0_comp_ff; +extern compop_func op_31f8_0_comp_ff; +extern compop_func op_31f9_0_comp_ff; +extern compop_func op_31fa_0_comp_ff; +extern compop_func op_31fb_0_comp_ff; +extern compop_func op_31fc_0_comp_ff; +extern compop_func op_33c0_0_comp_ff; +extern compop_func op_33c8_0_comp_ff; +extern compop_func op_33d0_0_comp_ff; +extern compop_func op_33d8_0_comp_ff; +extern compop_func op_33e0_0_comp_ff; +extern compop_func op_33e8_0_comp_ff; +extern compop_func op_33f0_0_comp_ff; +extern compop_func op_33f8_0_comp_ff; +extern compop_func op_33f9_0_comp_ff; +extern compop_func op_33fa_0_comp_ff; +extern compop_func op_33fb_0_comp_ff; +extern compop_func op_33fc_0_comp_ff; +extern compop_func op_4000_0_comp_ff; +extern compop_func op_4010_0_comp_ff; +extern compop_func op_4018_0_comp_ff; +extern compop_func op_4020_0_comp_ff; +extern compop_func op_4028_0_comp_ff; +extern compop_func op_4030_0_comp_ff; +extern compop_func op_4038_0_comp_ff; +extern compop_func op_4039_0_comp_ff; +extern compop_func op_4040_0_comp_ff; +extern compop_func op_4050_0_comp_ff; +extern compop_func op_4058_0_comp_ff; +extern compop_func op_4060_0_comp_ff; +extern compop_func op_4068_0_comp_ff; +extern compop_func op_4070_0_comp_ff; +extern compop_func op_4078_0_comp_ff; +extern compop_func op_4079_0_comp_ff; +extern compop_func op_4080_0_comp_ff; +extern compop_func op_4090_0_comp_ff; +extern compop_func op_4098_0_comp_ff; +extern compop_func op_40a0_0_comp_ff; +extern compop_func op_40a8_0_comp_ff; +extern compop_func op_40b0_0_comp_ff; +extern compop_func op_40b8_0_comp_ff; +extern compop_func op_40b9_0_comp_ff; +extern compop_func op_41d0_0_comp_ff; +extern compop_func op_41e8_0_comp_ff; +extern compop_func op_41f0_0_comp_ff; +extern compop_func op_41f8_0_comp_ff; +extern compop_func op_41f9_0_comp_ff; +extern compop_func op_41fa_0_comp_ff; +extern compop_func op_41fb_0_comp_ff; +extern compop_func op_4200_0_comp_ff; +extern compop_func op_4210_0_comp_ff; +extern compop_func op_4218_0_comp_ff; +extern compop_func op_4220_0_comp_ff; +extern compop_func op_4228_0_comp_ff; +extern compop_func op_4230_0_comp_ff; +extern compop_func op_4238_0_comp_ff; +extern compop_func op_4239_0_comp_ff; +extern compop_func op_4240_0_comp_ff; +extern compop_func op_4250_0_comp_ff; +extern compop_func op_4258_0_comp_ff; +extern compop_func op_4260_0_comp_ff; +extern compop_func op_4268_0_comp_ff; +extern compop_func op_4270_0_comp_ff; +extern compop_func op_4278_0_comp_ff; +extern compop_func op_4279_0_comp_ff; +extern compop_func op_4280_0_comp_ff; +extern compop_func op_4290_0_comp_ff; +extern compop_func op_4298_0_comp_ff; +extern compop_func op_42a0_0_comp_ff; +extern compop_func op_42a8_0_comp_ff; +extern compop_func op_42b0_0_comp_ff; +extern compop_func op_42b8_0_comp_ff; +extern compop_func op_42b9_0_comp_ff; +extern compop_func op_4400_0_comp_ff; +extern compop_func op_4410_0_comp_ff; +extern compop_func op_4418_0_comp_ff; +extern compop_func op_4420_0_comp_ff; +extern compop_func op_4428_0_comp_ff; +extern compop_func op_4430_0_comp_ff; +extern compop_func op_4438_0_comp_ff; +extern compop_func op_4439_0_comp_ff; +extern compop_func op_4440_0_comp_ff; +extern compop_func op_4450_0_comp_ff; +extern compop_func op_4458_0_comp_ff; +extern compop_func op_4460_0_comp_ff; +extern compop_func op_4468_0_comp_ff; +extern compop_func op_4470_0_comp_ff; +extern compop_func op_4478_0_comp_ff; +extern compop_func op_4479_0_comp_ff; +extern compop_func op_4480_0_comp_ff; +extern compop_func op_4490_0_comp_ff; +extern compop_func op_4498_0_comp_ff; +extern compop_func op_44a0_0_comp_ff; +extern compop_func op_44a8_0_comp_ff; +extern compop_func op_44b0_0_comp_ff; +extern compop_func op_44b8_0_comp_ff; +extern compop_func op_44b9_0_comp_ff; +extern compop_func op_4600_0_comp_ff; +extern compop_func op_4610_0_comp_ff; +extern compop_func op_4618_0_comp_ff; +extern compop_func op_4620_0_comp_ff; +extern compop_func op_4628_0_comp_ff; +extern compop_func op_4630_0_comp_ff; +extern compop_func op_4638_0_comp_ff; +extern compop_func op_4639_0_comp_ff; +extern compop_func op_4640_0_comp_ff; +extern compop_func op_4650_0_comp_ff; +extern compop_func op_4658_0_comp_ff; +extern compop_func op_4660_0_comp_ff; +extern compop_func op_4668_0_comp_ff; +extern compop_func op_4670_0_comp_ff; +extern compop_func op_4678_0_comp_ff; +extern compop_func op_4679_0_comp_ff; +extern compop_func op_4680_0_comp_ff; +extern compop_func op_4690_0_comp_ff; +extern compop_func op_4698_0_comp_ff; +extern compop_func op_46a0_0_comp_ff; +extern compop_func op_46a8_0_comp_ff; +extern compop_func op_46b0_0_comp_ff; +extern compop_func op_46b8_0_comp_ff; +extern compop_func op_46b9_0_comp_ff; +extern compop_func op_4808_0_comp_ff; +extern compop_func op_4840_0_comp_ff; +extern compop_func op_4850_0_comp_ff; +extern compop_func op_4868_0_comp_ff; +extern compop_func op_4870_0_comp_ff; +extern compop_func op_4878_0_comp_ff; +extern compop_func op_4879_0_comp_ff; +extern compop_func op_487a_0_comp_ff; +extern compop_func op_487b_0_comp_ff; +extern compop_func op_4880_0_comp_ff; +extern compop_func op_4890_0_comp_ff; +extern compop_func op_48a0_0_comp_ff; +extern compop_func op_48a8_0_comp_ff; +extern compop_func op_48b0_0_comp_ff; +extern compop_func op_48b8_0_comp_ff; +extern compop_func op_48b9_0_comp_ff; +extern compop_func op_48c0_0_comp_ff; +extern compop_func op_48d0_0_comp_ff; +extern compop_func op_48e0_0_comp_ff; +extern compop_func op_48e8_0_comp_ff; +extern compop_func op_48f0_0_comp_ff; +extern compop_func op_48f8_0_comp_ff; +extern compop_func op_48f9_0_comp_ff; +extern compop_func op_49c0_0_comp_ff; +extern compop_func op_4a00_0_comp_ff; +extern compop_func op_4a10_0_comp_ff; +extern compop_func op_4a18_0_comp_ff; +extern compop_func op_4a20_0_comp_ff; +extern compop_func op_4a28_0_comp_ff; +extern compop_func op_4a30_0_comp_ff; +extern compop_func op_4a38_0_comp_ff; +extern compop_func op_4a39_0_comp_ff; +extern compop_func op_4a3a_0_comp_ff; +extern compop_func op_4a3b_0_comp_ff; +extern compop_func op_4a3c_0_comp_ff; +extern compop_func op_4a40_0_comp_ff; +extern compop_func op_4a48_0_comp_ff; +extern compop_func op_4a50_0_comp_ff; +extern compop_func op_4a58_0_comp_ff; +extern compop_func op_4a60_0_comp_ff; +extern compop_func op_4a68_0_comp_ff; +extern compop_func op_4a70_0_comp_ff; +extern compop_func op_4a78_0_comp_ff; +extern compop_func op_4a79_0_comp_ff; +extern compop_func op_4a7a_0_comp_ff; +extern compop_func op_4a7b_0_comp_ff; +extern compop_func op_4a7c_0_comp_ff; +extern compop_func op_4a80_0_comp_ff; +extern compop_func op_4a88_0_comp_ff; +extern compop_func op_4a90_0_comp_ff; +extern compop_func op_4a98_0_comp_ff; +extern compop_func op_4aa0_0_comp_ff; +extern compop_func op_4aa8_0_comp_ff; +extern compop_func op_4ab0_0_comp_ff; +extern compop_func op_4ab8_0_comp_ff; +extern compop_func op_4ab9_0_comp_ff; +extern compop_func op_4aba_0_comp_ff; +extern compop_func op_4abb_0_comp_ff; +extern compop_func op_4abc_0_comp_ff; +extern compop_func op_4c00_0_comp_ff; +extern compop_func op_4c10_0_comp_ff; +extern compop_func op_4c18_0_comp_ff; +extern compop_func op_4c20_0_comp_ff; +extern compop_func op_4c28_0_comp_ff; +extern compop_func op_4c30_0_comp_ff; +extern compop_func op_4c38_0_comp_ff; +extern compop_func op_4c39_0_comp_ff; +extern compop_func op_4c3a_0_comp_ff; +extern compop_func op_4c3b_0_comp_ff; +extern compop_func op_4c3c_0_comp_ff; +extern compop_func op_4c40_0_comp_ff; +extern compop_func op_4c50_0_comp_ff; +extern compop_func op_4c58_0_comp_ff; +extern compop_func op_4c60_0_comp_ff; +extern compop_func op_4c68_0_comp_ff; +extern compop_func op_4c70_0_comp_ff; +extern compop_func op_4c78_0_comp_ff; +extern compop_func op_4c79_0_comp_ff; +extern compop_func op_4c7a_0_comp_ff; +extern compop_func op_4c7b_0_comp_ff; +extern compop_func op_4c7c_0_comp_ff; +extern compop_func op_4c90_0_comp_ff; +extern compop_func op_4c98_0_comp_ff; +extern compop_func op_4ca8_0_comp_ff; +extern compop_func op_4cb0_0_comp_ff; +extern compop_func op_4cb8_0_comp_ff; +extern compop_func op_4cb9_0_comp_ff; +extern compop_func op_4cba_0_comp_ff; +extern compop_func op_4cbb_0_comp_ff; +extern compop_func op_4cd0_0_comp_ff; +extern compop_func op_4cd8_0_comp_ff; +extern compop_func op_4ce8_0_comp_ff; +extern compop_func op_4cf0_0_comp_ff; +extern compop_func op_4cf8_0_comp_ff; +extern compop_func op_4cf9_0_comp_ff; +extern compop_func op_4cfa_0_comp_ff; +extern compop_func op_4cfb_0_comp_ff; +extern compop_func op_4e50_0_comp_ff; +extern compop_func op_4e58_0_comp_ff; +extern compop_func op_4e71_0_comp_ff; +extern compop_func op_4e74_0_comp_ff; +extern compop_func op_4e75_0_comp_ff; +extern compop_func op_4e90_0_comp_ff; +extern compop_func op_4ea8_0_comp_ff; +extern compop_func op_4eb0_0_comp_ff; +extern compop_func op_4eb8_0_comp_ff; +extern compop_func op_4eb9_0_comp_ff; +extern compop_func op_4eba_0_comp_ff; +extern compop_func op_4ebb_0_comp_ff; +extern compop_func op_4ed0_0_comp_ff; +extern compop_func op_4ee8_0_comp_ff; +extern compop_func op_4ef0_0_comp_ff; +extern compop_func op_4ef8_0_comp_ff; +extern compop_func op_4ef9_0_comp_ff; +extern compop_func op_4efa_0_comp_ff; +extern compop_func op_4efb_0_comp_ff; +extern compop_func op_5000_0_comp_ff; +extern compop_func op_5010_0_comp_ff; +extern compop_func op_5018_0_comp_ff; +extern compop_func op_5020_0_comp_ff; +extern compop_func op_5028_0_comp_ff; +extern compop_func op_5030_0_comp_ff; +extern compop_func op_5038_0_comp_ff; +extern compop_func op_5039_0_comp_ff; +extern compop_func op_5040_0_comp_ff; +extern compop_func op_5048_0_comp_ff; +extern compop_func op_5050_0_comp_ff; +extern compop_func op_5058_0_comp_ff; +extern compop_func op_5060_0_comp_ff; +extern compop_func op_5068_0_comp_ff; +extern compop_func op_5070_0_comp_ff; +extern compop_func op_5078_0_comp_ff; +extern compop_func op_5079_0_comp_ff; +extern compop_func op_5080_0_comp_ff; +extern compop_func op_5088_0_comp_ff; +extern compop_func op_5090_0_comp_ff; +extern compop_func op_5098_0_comp_ff; +extern compop_func op_50a0_0_comp_ff; +extern compop_func op_50a8_0_comp_ff; +extern compop_func op_50b0_0_comp_ff; +extern compop_func op_50b8_0_comp_ff; +extern compop_func op_50b9_0_comp_ff; +extern compop_func op_50c0_0_comp_ff; +extern compop_func op_50c8_0_comp_ff; +extern compop_func op_50d0_0_comp_ff; +extern compop_func op_50d8_0_comp_ff; +extern compop_func op_50e0_0_comp_ff; +extern compop_func op_50e8_0_comp_ff; +extern compop_func op_50f0_0_comp_ff; +extern compop_func op_50f8_0_comp_ff; +extern compop_func op_50f9_0_comp_ff; +extern compop_func op_5100_0_comp_ff; +extern compop_func op_5110_0_comp_ff; +extern compop_func op_5118_0_comp_ff; +extern compop_func op_5120_0_comp_ff; +extern compop_func op_5128_0_comp_ff; +extern compop_func op_5130_0_comp_ff; +extern compop_func op_5138_0_comp_ff; +extern compop_func op_5139_0_comp_ff; +extern compop_func op_5140_0_comp_ff; +extern compop_func op_5148_0_comp_ff; +extern compop_func op_5150_0_comp_ff; +extern compop_func op_5158_0_comp_ff; +extern compop_func op_5160_0_comp_ff; +extern compop_func op_5168_0_comp_ff; +extern compop_func op_5170_0_comp_ff; +extern compop_func op_5178_0_comp_ff; +extern compop_func op_5179_0_comp_ff; +extern compop_func op_5180_0_comp_ff; +extern compop_func op_5188_0_comp_ff; +extern compop_func op_5190_0_comp_ff; +extern compop_func op_5198_0_comp_ff; +extern compop_func op_51a0_0_comp_ff; +extern compop_func op_51a8_0_comp_ff; +extern compop_func op_51b0_0_comp_ff; +extern compop_func op_51b8_0_comp_ff; +extern compop_func op_51b9_0_comp_ff; +extern compop_func op_51c0_0_comp_ff; +extern compop_func op_51c8_0_comp_ff; +extern compop_func op_51d0_0_comp_ff; +extern compop_func op_51d8_0_comp_ff; +extern compop_func op_51e0_0_comp_ff; +extern compop_func op_51e8_0_comp_ff; +extern compop_func op_51f0_0_comp_ff; +extern compop_func op_51f8_0_comp_ff; +extern compop_func op_51f9_0_comp_ff; +extern compop_func op_52c0_0_comp_ff; +extern compop_func op_52c8_0_comp_ff; +extern compop_func op_52d0_0_comp_ff; +extern compop_func op_52d8_0_comp_ff; +extern compop_func op_52e0_0_comp_ff; +extern compop_func op_52e8_0_comp_ff; +extern compop_func op_52f0_0_comp_ff; +extern compop_func op_52f8_0_comp_ff; +extern compop_func op_52f9_0_comp_ff; +extern compop_func op_53c0_0_comp_ff; +extern compop_func op_53c8_0_comp_ff; +extern compop_func op_53d0_0_comp_ff; +extern compop_func op_53d8_0_comp_ff; +extern compop_func op_53e0_0_comp_ff; +extern compop_func op_53e8_0_comp_ff; +extern compop_func op_53f0_0_comp_ff; +extern compop_func op_53f8_0_comp_ff; +extern compop_func op_53f9_0_comp_ff; +extern compop_func op_54c0_0_comp_ff; +extern compop_func op_54c8_0_comp_ff; +extern compop_func op_54d0_0_comp_ff; +extern compop_func op_54d8_0_comp_ff; +extern compop_func op_54e0_0_comp_ff; +extern compop_func op_54e8_0_comp_ff; +extern compop_func op_54f0_0_comp_ff; +extern compop_func op_54f8_0_comp_ff; +extern compop_func op_54f9_0_comp_ff; +extern compop_func op_55c0_0_comp_ff; +extern compop_func op_55c8_0_comp_ff; +extern compop_func op_55d0_0_comp_ff; +extern compop_func op_55d8_0_comp_ff; +extern compop_func op_55e0_0_comp_ff; +extern compop_func op_55e8_0_comp_ff; +extern compop_func op_55f0_0_comp_ff; +extern compop_func op_55f8_0_comp_ff; +extern compop_func op_55f9_0_comp_ff; +extern compop_func op_56c0_0_comp_ff; +extern compop_func op_56c8_0_comp_ff; +extern compop_func op_56d0_0_comp_ff; +extern compop_func op_56d8_0_comp_ff; +extern compop_func op_56e0_0_comp_ff; +extern compop_func op_56e8_0_comp_ff; +extern compop_func op_56f0_0_comp_ff; +extern compop_func op_56f8_0_comp_ff; +extern compop_func op_56f9_0_comp_ff; +extern compop_func op_57c0_0_comp_ff; +extern compop_func op_57c8_0_comp_ff; +extern compop_func op_57d0_0_comp_ff; +extern compop_func op_57d8_0_comp_ff; +extern compop_func op_57e0_0_comp_ff; +extern compop_func op_57e8_0_comp_ff; +extern compop_func op_57f0_0_comp_ff; +extern compop_func op_57f8_0_comp_ff; +extern compop_func op_57f9_0_comp_ff; +extern compop_func op_58c0_0_comp_ff; +extern compop_func op_58c8_0_comp_ff; +extern compop_func op_58d0_0_comp_ff; +extern compop_func op_58d8_0_comp_ff; +extern compop_func op_58e0_0_comp_ff; +extern compop_func op_58e8_0_comp_ff; +extern compop_func op_58f0_0_comp_ff; +extern compop_func op_58f8_0_comp_ff; +extern compop_func op_58f9_0_comp_ff; +extern compop_func op_59c0_0_comp_ff; +extern compop_func op_59c8_0_comp_ff; +extern compop_func op_59d0_0_comp_ff; +extern compop_func op_59d8_0_comp_ff; +extern compop_func op_59e0_0_comp_ff; +extern compop_func op_59e8_0_comp_ff; +extern compop_func op_59f0_0_comp_ff; +extern compop_func op_59f8_0_comp_ff; +extern compop_func op_59f9_0_comp_ff; +extern compop_func op_5ac0_0_comp_ff; +extern compop_func op_5ac8_0_comp_ff; +extern compop_func op_5ad0_0_comp_ff; +extern compop_func op_5ad8_0_comp_ff; +extern compop_func op_5ae0_0_comp_ff; +extern compop_func op_5ae8_0_comp_ff; +extern compop_func op_5af0_0_comp_ff; +extern compop_func op_5af8_0_comp_ff; +extern compop_func op_5af9_0_comp_ff; +extern compop_func op_5bc0_0_comp_ff; +extern compop_func op_5bc8_0_comp_ff; +extern compop_func op_5bd0_0_comp_ff; +extern compop_func op_5bd8_0_comp_ff; +extern compop_func op_5be0_0_comp_ff; +extern compop_func op_5be8_0_comp_ff; +extern compop_func op_5bf0_0_comp_ff; +extern compop_func op_5bf8_0_comp_ff; +extern compop_func op_5bf9_0_comp_ff; +extern compop_func op_5cc0_0_comp_ff; +extern compop_func op_5cc8_0_comp_ff; +extern compop_func op_5cd0_0_comp_ff; +extern compop_func op_5cd8_0_comp_ff; +extern compop_func op_5ce0_0_comp_ff; +extern compop_func op_5ce8_0_comp_ff; +extern compop_func op_5cf0_0_comp_ff; +extern compop_func op_5cf8_0_comp_ff; +extern compop_func op_5cf9_0_comp_ff; +extern compop_func op_5dc0_0_comp_ff; +extern compop_func op_5dc8_0_comp_ff; +extern compop_func op_5dd0_0_comp_ff; +extern compop_func op_5dd8_0_comp_ff; +extern compop_func op_5de0_0_comp_ff; +extern compop_func op_5de8_0_comp_ff; +extern compop_func op_5df0_0_comp_ff; +extern compop_func op_5df8_0_comp_ff; +extern compop_func op_5df9_0_comp_ff; +extern compop_func op_5ec0_0_comp_ff; +extern compop_func op_5ec8_0_comp_ff; +extern compop_func op_5ed0_0_comp_ff; +extern compop_func op_5ed8_0_comp_ff; +extern compop_func op_5ee0_0_comp_ff; +extern compop_func op_5ee8_0_comp_ff; +extern compop_func op_5ef0_0_comp_ff; +extern compop_func op_5ef8_0_comp_ff; +extern compop_func op_5ef9_0_comp_ff; +extern compop_func op_5fc0_0_comp_ff; +extern compop_func op_5fc8_0_comp_ff; +extern compop_func op_5fd0_0_comp_ff; +extern compop_func op_5fd8_0_comp_ff; +extern compop_func op_5fe0_0_comp_ff; +extern compop_func op_5fe8_0_comp_ff; +extern compop_func op_5ff0_0_comp_ff; +extern compop_func op_5ff8_0_comp_ff; +extern compop_func op_5ff9_0_comp_ff; +extern compop_func op_6000_0_comp_ff; +extern compop_func op_6001_0_comp_ff; +extern compop_func op_60ff_0_comp_ff; +extern compop_func op_6100_0_comp_ff; +extern compop_func op_6101_0_comp_ff; +extern compop_func op_61ff_0_comp_ff; +extern compop_func op_6200_0_comp_ff; +extern compop_func op_6201_0_comp_ff; +extern compop_func op_62ff_0_comp_ff; +extern compop_func op_6300_0_comp_ff; +extern compop_func op_6301_0_comp_ff; +extern compop_func op_63ff_0_comp_ff; +extern compop_func op_6400_0_comp_ff; +extern compop_func op_6401_0_comp_ff; +extern compop_func op_64ff_0_comp_ff; +extern compop_func op_6500_0_comp_ff; +extern compop_func op_6501_0_comp_ff; +extern compop_func op_65ff_0_comp_ff; +extern compop_func op_6600_0_comp_ff; +extern compop_func op_6601_0_comp_ff; +extern compop_func op_66ff_0_comp_ff; +extern compop_func op_6700_0_comp_ff; +extern compop_func op_6701_0_comp_ff; +extern compop_func op_67ff_0_comp_ff; +extern compop_func op_6800_0_comp_ff; +extern compop_func op_6801_0_comp_ff; +extern compop_func op_68ff_0_comp_ff; +extern compop_func op_6900_0_comp_ff; +extern compop_func op_6901_0_comp_ff; +extern compop_func op_69ff_0_comp_ff; +extern compop_func op_6a00_0_comp_ff; +extern compop_func op_6a01_0_comp_ff; +extern compop_func op_6aff_0_comp_ff; +extern compop_func op_6b00_0_comp_ff; +extern compop_func op_6b01_0_comp_ff; +extern compop_func op_6bff_0_comp_ff; +extern compop_func op_6c00_0_comp_ff; +extern compop_func op_6c01_0_comp_ff; +extern compop_func op_6cff_0_comp_ff; +extern compop_func op_6d00_0_comp_ff; +extern compop_func op_6d01_0_comp_ff; +extern compop_func op_6dff_0_comp_ff; +extern compop_func op_6e00_0_comp_ff; +extern compop_func op_6e01_0_comp_ff; +extern compop_func op_6eff_0_comp_ff; +extern compop_func op_6f00_0_comp_ff; +extern compop_func op_6f01_0_comp_ff; +extern compop_func op_6fff_0_comp_ff; +extern compop_func op_7000_0_comp_ff; +extern compop_func op_8000_0_comp_ff; +extern compop_func op_8010_0_comp_ff; +extern compop_func op_8018_0_comp_ff; +extern compop_func op_8020_0_comp_ff; +extern compop_func op_8028_0_comp_ff; +extern compop_func op_8030_0_comp_ff; +extern compop_func op_8038_0_comp_ff; +extern compop_func op_8039_0_comp_ff; +extern compop_func op_803a_0_comp_ff; +extern compop_func op_803b_0_comp_ff; +extern compop_func op_803c_0_comp_ff; +extern compop_func op_8040_0_comp_ff; +extern compop_func op_8050_0_comp_ff; +extern compop_func op_8058_0_comp_ff; +extern compop_func op_8060_0_comp_ff; +extern compop_func op_8068_0_comp_ff; +extern compop_func op_8070_0_comp_ff; +extern compop_func op_8078_0_comp_ff; +extern compop_func op_8079_0_comp_ff; +extern compop_func op_807a_0_comp_ff; +extern compop_func op_807b_0_comp_ff; +extern compop_func op_807c_0_comp_ff; +extern compop_func op_8080_0_comp_ff; +extern compop_func op_8090_0_comp_ff; +extern compop_func op_8098_0_comp_ff; +extern compop_func op_80a0_0_comp_ff; +extern compop_func op_80a8_0_comp_ff; +extern compop_func op_80b0_0_comp_ff; +extern compop_func op_80b8_0_comp_ff; +extern compop_func op_80b9_0_comp_ff; +extern compop_func op_80ba_0_comp_ff; +extern compop_func op_80bb_0_comp_ff; +extern compop_func op_80bc_0_comp_ff; +extern compop_func op_80c0_0_comp_ff; +extern compop_func op_80d0_0_comp_ff; +extern compop_func op_80d8_0_comp_ff; +extern compop_func op_80e0_0_comp_ff; +extern compop_func op_80e8_0_comp_ff; +extern compop_func op_80f0_0_comp_ff; +extern compop_func op_80f8_0_comp_ff; +extern compop_func op_80f9_0_comp_ff; +extern compop_func op_80fa_0_comp_ff; +extern compop_func op_80fb_0_comp_ff; +extern compop_func op_80fc_0_comp_ff; +extern compop_func op_8110_0_comp_ff; +extern compop_func op_8118_0_comp_ff; +extern compop_func op_8120_0_comp_ff; +extern compop_func op_8128_0_comp_ff; +extern compop_func op_8130_0_comp_ff; +extern compop_func op_8138_0_comp_ff; +extern compop_func op_8139_0_comp_ff; +extern compop_func op_8150_0_comp_ff; +extern compop_func op_8158_0_comp_ff; +extern compop_func op_8160_0_comp_ff; +extern compop_func op_8168_0_comp_ff; +extern compop_func op_8170_0_comp_ff; +extern compop_func op_8178_0_comp_ff; +extern compop_func op_8179_0_comp_ff; +extern compop_func op_8190_0_comp_ff; +extern compop_func op_8198_0_comp_ff; +extern compop_func op_81a0_0_comp_ff; +extern compop_func op_81a8_0_comp_ff; +extern compop_func op_81b0_0_comp_ff; +extern compop_func op_81b8_0_comp_ff; +extern compop_func op_81b9_0_comp_ff; +extern compop_func op_81c0_0_comp_ff; +extern compop_func op_81d0_0_comp_ff; +extern compop_func op_81d8_0_comp_ff; +extern compop_func op_81e0_0_comp_ff; +extern compop_func op_81e8_0_comp_ff; +extern compop_func op_81f0_0_comp_ff; +extern compop_func op_81f8_0_comp_ff; +extern compop_func op_81f9_0_comp_ff; +extern compop_func op_81fa_0_comp_ff; +extern compop_func op_81fb_0_comp_ff; +extern compop_func op_81fc_0_comp_ff; +extern compop_func op_9000_0_comp_ff; +extern compop_func op_9010_0_comp_ff; +extern compop_func op_9018_0_comp_ff; +extern compop_func op_9020_0_comp_ff; +extern compop_func op_9028_0_comp_ff; +extern compop_func op_9030_0_comp_ff; +extern compop_func op_9038_0_comp_ff; +extern compop_func op_9039_0_comp_ff; +extern compop_func op_903a_0_comp_ff; +extern compop_func op_903b_0_comp_ff; +extern compop_func op_903c_0_comp_ff; +extern compop_func op_9040_0_comp_ff; +extern compop_func op_9048_0_comp_ff; +extern compop_func op_9050_0_comp_ff; +extern compop_func op_9058_0_comp_ff; +extern compop_func op_9060_0_comp_ff; +extern compop_func op_9068_0_comp_ff; +extern compop_func op_9070_0_comp_ff; +extern compop_func op_9078_0_comp_ff; +extern compop_func op_9079_0_comp_ff; +extern compop_func op_907a_0_comp_ff; +extern compop_func op_907b_0_comp_ff; +extern compop_func op_907c_0_comp_ff; +extern compop_func op_9080_0_comp_ff; +extern compop_func op_9088_0_comp_ff; +extern compop_func op_9090_0_comp_ff; +extern compop_func op_9098_0_comp_ff; +extern compop_func op_90a0_0_comp_ff; +extern compop_func op_90a8_0_comp_ff; +extern compop_func op_90b0_0_comp_ff; +extern compop_func op_90b8_0_comp_ff; +extern compop_func op_90b9_0_comp_ff; +extern compop_func op_90ba_0_comp_ff; +extern compop_func op_90bb_0_comp_ff; +extern compop_func op_90bc_0_comp_ff; +extern compop_func op_90c0_0_comp_ff; +extern compop_func op_90c8_0_comp_ff; +extern compop_func op_90d0_0_comp_ff; +extern compop_func op_90d8_0_comp_ff; +extern compop_func op_90e0_0_comp_ff; +extern compop_func op_90e8_0_comp_ff; +extern compop_func op_90f0_0_comp_ff; +extern compop_func op_90f8_0_comp_ff; +extern compop_func op_90f9_0_comp_ff; +extern compop_func op_90fa_0_comp_ff; +extern compop_func op_90fb_0_comp_ff; +extern compop_func op_90fc_0_comp_ff; +extern compop_func op_9100_0_comp_ff; +extern compop_func op_9108_0_comp_ff; +extern compop_func op_9110_0_comp_ff; +extern compop_func op_9118_0_comp_ff; +extern compop_func op_9120_0_comp_ff; +extern compop_func op_9128_0_comp_ff; +extern compop_func op_9130_0_comp_ff; +extern compop_func op_9138_0_comp_ff; +extern compop_func op_9139_0_comp_ff; +extern compop_func op_9140_0_comp_ff; +extern compop_func op_9148_0_comp_ff; +extern compop_func op_9150_0_comp_ff; +extern compop_func op_9158_0_comp_ff; +extern compop_func op_9160_0_comp_ff; +extern compop_func op_9168_0_comp_ff; +extern compop_func op_9170_0_comp_ff; +extern compop_func op_9178_0_comp_ff; +extern compop_func op_9179_0_comp_ff; +extern compop_func op_9180_0_comp_ff; +extern compop_func op_9188_0_comp_ff; +extern compop_func op_9190_0_comp_ff; +extern compop_func op_9198_0_comp_ff; +extern compop_func op_91a0_0_comp_ff; +extern compop_func op_91a8_0_comp_ff; +extern compop_func op_91b0_0_comp_ff; +extern compop_func op_91b8_0_comp_ff; +extern compop_func op_91b9_0_comp_ff; +extern compop_func op_91c0_0_comp_ff; +extern compop_func op_91c8_0_comp_ff; +extern compop_func op_91d0_0_comp_ff; +extern compop_func op_91d8_0_comp_ff; +extern compop_func op_91e0_0_comp_ff; +extern compop_func op_91e8_0_comp_ff; +extern compop_func op_91f0_0_comp_ff; +extern compop_func op_91f8_0_comp_ff; +extern compop_func op_91f9_0_comp_ff; +extern compop_func op_91fa_0_comp_ff; +extern compop_func op_91fb_0_comp_ff; +extern compop_func op_91fc_0_comp_ff; +extern compop_func op_b000_0_comp_ff; +extern compop_func op_b010_0_comp_ff; +extern compop_func op_b018_0_comp_ff; +extern compop_func op_b020_0_comp_ff; +extern compop_func op_b028_0_comp_ff; +extern compop_func op_b030_0_comp_ff; +extern compop_func op_b038_0_comp_ff; +extern compop_func op_b039_0_comp_ff; +extern compop_func op_b03a_0_comp_ff; +extern compop_func op_b03b_0_comp_ff; +extern compop_func op_b03c_0_comp_ff; +extern compop_func op_b040_0_comp_ff; +extern compop_func op_b048_0_comp_ff; +extern compop_func op_b050_0_comp_ff; +extern compop_func op_b058_0_comp_ff; +extern compop_func op_b060_0_comp_ff; +extern compop_func op_b068_0_comp_ff; +extern compop_func op_b070_0_comp_ff; +extern compop_func op_b078_0_comp_ff; +extern compop_func op_b079_0_comp_ff; +extern compop_func op_b07a_0_comp_ff; +extern compop_func op_b07b_0_comp_ff; +extern compop_func op_b07c_0_comp_ff; +extern compop_func op_b080_0_comp_ff; +extern compop_func op_b088_0_comp_ff; +extern compop_func op_b090_0_comp_ff; +extern compop_func op_b098_0_comp_ff; +extern compop_func op_b0a0_0_comp_ff; +extern compop_func op_b0a8_0_comp_ff; +extern compop_func op_b0b0_0_comp_ff; +extern compop_func op_b0b8_0_comp_ff; +extern compop_func op_b0b9_0_comp_ff; +extern compop_func op_b0ba_0_comp_ff; +extern compop_func op_b0bb_0_comp_ff; +extern compop_func op_b0bc_0_comp_ff; +extern compop_func op_b0c0_0_comp_ff; +extern compop_func op_b0c8_0_comp_ff; +extern compop_func op_b0d0_0_comp_ff; +extern compop_func op_b0d8_0_comp_ff; +extern compop_func op_b0e0_0_comp_ff; +extern compop_func op_b0e8_0_comp_ff; +extern compop_func op_b0f0_0_comp_ff; +extern compop_func op_b0f8_0_comp_ff; +extern compop_func op_b0f9_0_comp_ff; +extern compop_func op_b0fa_0_comp_ff; +extern compop_func op_b0fb_0_comp_ff; +extern compop_func op_b0fc_0_comp_ff; +extern compop_func op_b100_0_comp_ff; +extern compop_func op_b108_0_comp_ff; +extern compop_func op_b110_0_comp_ff; +extern compop_func op_b118_0_comp_ff; +extern compop_func op_b120_0_comp_ff; +extern compop_func op_b128_0_comp_ff; +extern compop_func op_b130_0_comp_ff; +extern compop_func op_b138_0_comp_ff; +extern compop_func op_b139_0_comp_ff; +extern compop_func op_b140_0_comp_ff; +extern compop_func op_b148_0_comp_ff; +extern compop_func op_b150_0_comp_ff; +extern compop_func op_b158_0_comp_ff; +extern compop_func op_b160_0_comp_ff; +extern compop_func op_b168_0_comp_ff; +extern compop_func op_b170_0_comp_ff; +extern compop_func op_b178_0_comp_ff; +extern compop_func op_b179_0_comp_ff; +extern compop_func op_b180_0_comp_ff; +extern compop_func op_b188_0_comp_ff; +extern compop_func op_b190_0_comp_ff; +extern compop_func op_b198_0_comp_ff; +extern compop_func op_b1a0_0_comp_ff; +extern compop_func op_b1a8_0_comp_ff; +extern compop_func op_b1b0_0_comp_ff; +extern compop_func op_b1b8_0_comp_ff; +extern compop_func op_b1b9_0_comp_ff; +extern compop_func op_b1c0_0_comp_ff; +extern compop_func op_b1c8_0_comp_ff; +extern compop_func op_b1d0_0_comp_ff; +extern compop_func op_b1d8_0_comp_ff; +extern compop_func op_b1e0_0_comp_ff; +extern compop_func op_b1e8_0_comp_ff; +extern compop_func op_b1f0_0_comp_ff; +extern compop_func op_b1f8_0_comp_ff; +extern compop_func op_b1f9_0_comp_ff; +extern compop_func op_b1fa_0_comp_ff; +extern compop_func op_b1fb_0_comp_ff; +extern compop_func op_b1fc_0_comp_ff; +extern compop_func op_c000_0_comp_ff; +extern compop_func op_c010_0_comp_ff; +extern compop_func op_c018_0_comp_ff; +extern compop_func op_c020_0_comp_ff; +extern compop_func op_c028_0_comp_ff; +extern compop_func op_c030_0_comp_ff; +extern compop_func op_c038_0_comp_ff; +extern compop_func op_c039_0_comp_ff; +extern compop_func op_c03a_0_comp_ff; +extern compop_func op_c03b_0_comp_ff; +extern compop_func op_c03c_0_comp_ff; +extern compop_func op_c040_0_comp_ff; +extern compop_func op_c050_0_comp_ff; +extern compop_func op_c058_0_comp_ff; +extern compop_func op_c060_0_comp_ff; +extern compop_func op_c068_0_comp_ff; +extern compop_func op_c070_0_comp_ff; +extern compop_func op_c078_0_comp_ff; +extern compop_func op_c079_0_comp_ff; +extern compop_func op_c07a_0_comp_ff; +extern compop_func op_c07b_0_comp_ff; +extern compop_func op_c07c_0_comp_ff; +extern compop_func op_c080_0_comp_ff; +extern compop_func op_c090_0_comp_ff; +extern compop_func op_c098_0_comp_ff; +extern compop_func op_c0a0_0_comp_ff; +extern compop_func op_c0a8_0_comp_ff; +extern compop_func op_c0b0_0_comp_ff; +extern compop_func op_c0b8_0_comp_ff; +extern compop_func op_c0b9_0_comp_ff; +extern compop_func op_c0ba_0_comp_ff; +extern compop_func op_c0bb_0_comp_ff; +extern compop_func op_c0bc_0_comp_ff; +extern compop_func op_c0c0_0_comp_ff; +extern compop_func op_c0d0_0_comp_ff; +extern compop_func op_c0d8_0_comp_ff; +extern compop_func op_c0e0_0_comp_ff; +extern compop_func op_c0e8_0_comp_ff; +extern compop_func op_c0f0_0_comp_ff; +extern compop_func op_c0f8_0_comp_ff; +extern compop_func op_c0f9_0_comp_ff; +extern compop_func op_c0fa_0_comp_ff; +extern compop_func op_c0fb_0_comp_ff; +extern compop_func op_c0fc_0_comp_ff; +extern compop_func op_c110_0_comp_ff; +extern compop_func op_c118_0_comp_ff; +extern compop_func op_c120_0_comp_ff; +extern compop_func op_c128_0_comp_ff; +extern compop_func op_c130_0_comp_ff; +extern compop_func op_c138_0_comp_ff; +extern compop_func op_c139_0_comp_ff; +extern compop_func op_c140_0_comp_ff; +extern compop_func op_c148_0_comp_ff; +extern compop_func op_c150_0_comp_ff; +extern compop_func op_c158_0_comp_ff; +extern compop_func op_c160_0_comp_ff; +extern compop_func op_c168_0_comp_ff; +extern compop_func op_c170_0_comp_ff; +extern compop_func op_c178_0_comp_ff; +extern compop_func op_c179_0_comp_ff; +extern compop_func op_c188_0_comp_ff; +extern compop_func op_c190_0_comp_ff; +extern compop_func op_c198_0_comp_ff; +extern compop_func op_c1a0_0_comp_ff; +extern compop_func op_c1a8_0_comp_ff; +extern compop_func op_c1b0_0_comp_ff; +extern compop_func op_c1b8_0_comp_ff; +extern compop_func op_c1b9_0_comp_ff; +extern compop_func op_c1c0_0_comp_ff; +extern compop_func op_c1d0_0_comp_ff; +extern compop_func op_c1d8_0_comp_ff; +extern compop_func op_c1e0_0_comp_ff; +extern compop_func op_c1e8_0_comp_ff; +extern compop_func op_c1f0_0_comp_ff; +extern compop_func op_c1f8_0_comp_ff; +extern compop_func op_c1f9_0_comp_ff; +extern compop_func op_c1fa_0_comp_ff; +extern compop_func op_c1fb_0_comp_ff; +extern compop_func op_c1fc_0_comp_ff; +extern compop_func op_d000_0_comp_ff; +extern compop_func op_d010_0_comp_ff; +extern compop_func op_d018_0_comp_ff; +extern compop_func op_d020_0_comp_ff; +extern compop_func op_d028_0_comp_ff; +extern compop_func op_d030_0_comp_ff; +extern compop_func op_d038_0_comp_ff; +extern compop_func op_d039_0_comp_ff; +extern compop_func op_d03a_0_comp_ff; +extern compop_func op_d03b_0_comp_ff; +extern compop_func op_d03c_0_comp_ff; +extern compop_func op_d040_0_comp_ff; +extern compop_func op_d048_0_comp_ff; +extern compop_func op_d050_0_comp_ff; +extern compop_func op_d058_0_comp_ff; +extern compop_func op_d060_0_comp_ff; +extern compop_func op_d068_0_comp_ff; +extern compop_func op_d070_0_comp_ff; +extern compop_func op_d078_0_comp_ff; +extern compop_func op_d079_0_comp_ff; +extern compop_func op_d07a_0_comp_ff; +extern compop_func op_d07b_0_comp_ff; +extern compop_func op_d07c_0_comp_ff; +extern compop_func op_d080_0_comp_ff; +extern compop_func op_d088_0_comp_ff; +extern compop_func op_d090_0_comp_ff; +extern compop_func op_d098_0_comp_ff; +extern compop_func op_d0a0_0_comp_ff; +extern compop_func op_d0a8_0_comp_ff; +extern compop_func op_d0b0_0_comp_ff; +extern compop_func op_d0b8_0_comp_ff; +extern compop_func op_d0b9_0_comp_ff; +extern compop_func op_d0ba_0_comp_ff; +extern compop_func op_d0bb_0_comp_ff; +extern compop_func op_d0bc_0_comp_ff; +extern compop_func op_d0c0_0_comp_ff; +extern compop_func op_d0c8_0_comp_ff; +extern compop_func op_d0d0_0_comp_ff; +extern compop_func op_d0d8_0_comp_ff; +extern compop_func op_d0e0_0_comp_ff; +extern compop_func op_d0e8_0_comp_ff; +extern compop_func op_d0f0_0_comp_ff; +extern compop_func op_d0f8_0_comp_ff; +extern compop_func op_d0f9_0_comp_ff; +extern compop_func op_d0fa_0_comp_ff; +extern compop_func op_d0fb_0_comp_ff; +extern compop_func op_d0fc_0_comp_ff; +extern compop_func op_d100_0_comp_ff; +extern compop_func op_d108_0_comp_ff; +extern compop_func op_d110_0_comp_ff; +extern compop_func op_d118_0_comp_ff; +extern compop_func op_d120_0_comp_ff; +extern compop_func op_d128_0_comp_ff; +extern compop_func op_d130_0_comp_ff; +extern compop_func op_d138_0_comp_ff; +extern compop_func op_d139_0_comp_ff; +extern compop_func op_d140_0_comp_ff; +extern compop_func op_d148_0_comp_ff; +extern compop_func op_d150_0_comp_ff; +extern compop_func op_d158_0_comp_ff; +extern compop_func op_d160_0_comp_ff; +extern compop_func op_d168_0_comp_ff; +extern compop_func op_d170_0_comp_ff; +extern compop_func op_d178_0_comp_ff; +extern compop_func op_d179_0_comp_ff; +extern compop_func op_d180_0_comp_ff; +extern compop_func op_d188_0_comp_ff; +extern compop_func op_d190_0_comp_ff; +extern compop_func op_d198_0_comp_ff; +extern compop_func op_d1a0_0_comp_ff; +extern compop_func op_d1a8_0_comp_ff; +extern compop_func op_d1b0_0_comp_ff; +extern compop_func op_d1b8_0_comp_ff; +extern compop_func op_d1b9_0_comp_ff; +extern compop_func op_d1c0_0_comp_ff; +extern compop_func op_d1c8_0_comp_ff; +extern compop_func op_d1d0_0_comp_ff; +extern compop_func op_d1d8_0_comp_ff; +extern compop_func op_d1e0_0_comp_ff; +extern compop_func op_d1e8_0_comp_ff; +extern compop_func op_d1f0_0_comp_ff; +extern compop_func op_d1f8_0_comp_ff; +extern compop_func op_d1f9_0_comp_ff; +extern compop_func op_d1fa_0_comp_ff; +extern compop_func op_d1fb_0_comp_ff; +extern compop_func op_d1fc_0_comp_ff; +extern compop_func op_e000_0_comp_ff; +extern compop_func op_e008_0_comp_ff; +extern compop_func op_e010_0_comp_ff; +extern compop_func op_e018_0_comp_ff; +extern compop_func op_e020_0_comp_ff; +extern compop_func op_e028_0_comp_ff; +extern compop_func op_e030_0_comp_ff; +extern compop_func op_e038_0_comp_ff; +extern compop_func op_e040_0_comp_ff; +extern compop_func op_e048_0_comp_ff; +extern compop_func op_e050_0_comp_ff; +extern compop_func op_e058_0_comp_ff; +extern compop_func op_e060_0_comp_ff; +extern compop_func op_e068_0_comp_ff; +extern compop_func op_e070_0_comp_ff; +extern compop_func op_e078_0_comp_ff; +extern compop_func op_e080_0_comp_ff; +extern compop_func op_e088_0_comp_ff; +extern compop_func op_e090_0_comp_ff; +extern compop_func op_e098_0_comp_ff; +extern compop_func op_e0a0_0_comp_ff; +extern compop_func op_e0a8_0_comp_ff; +extern compop_func op_e0b0_0_comp_ff; +extern compop_func op_e0b8_0_comp_ff; +extern compop_func op_e0d0_0_comp_ff; +extern compop_func op_e0d8_0_comp_ff; +extern compop_func op_e0e0_0_comp_ff; +extern compop_func op_e0e8_0_comp_ff; +extern compop_func op_e0f0_0_comp_ff; +extern compop_func op_e0f8_0_comp_ff; +extern compop_func op_e0f9_0_comp_ff; +extern compop_func op_e100_0_comp_ff; +extern compop_func op_e108_0_comp_ff; +extern compop_func op_e110_0_comp_ff; +extern compop_func op_e118_0_comp_ff; +extern compop_func op_e120_0_comp_ff; +extern compop_func op_e128_0_comp_ff; +extern compop_func op_e130_0_comp_ff; +extern compop_func op_e138_0_comp_ff; +extern compop_func op_e140_0_comp_ff; +extern compop_func op_e148_0_comp_ff; +extern compop_func op_e150_0_comp_ff; +extern compop_func op_e158_0_comp_ff; +extern compop_func op_e160_0_comp_ff; +extern compop_func op_e168_0_comp_ff; +extern compop_func op_e170_0_comp_ff; +extern compop_func op_e178_0_comp_ff; +extern compop_func op_e180_0_comp_ff; +extern compop_func op_e188_0_comp_ff; +extern compop_func op_e190_0_comp_ff; +extern compop_func op_e198_0_comp_ff; +extern compop_func op_e1a0_0_comp_ff; +extern compop_func op_e1a8_0_comp_ff; +extern compop_func op_e1b0_0_comp_ff; +extern compop_func op_e1b8_0_comp_ff; +extern compop_func op_e1d0_0_comp_ff; +extern compop_func op_e1d8_0_comp_ff; +extern compop_func op_e1e0_0_comp_ff; +extern compop_func op_e1e8_0_comp_ff; +extern compop_func op_e1f0_0_comp_ff; +extern compop_func op_e1f8_0_comp_ff; +extern compop_func op_e1f9_0_comp_ff; +extern compop_func op_e2d0_0_comp_ff; +extern compop_func op_e2d8_0_comp_ff; +extern compop_func op_e2e0_0_comp_ff; +extern compop_func op_e2e8_0_comp_ff; +extern compop_func op_e2f0_0_comp_ff; +extern compop_func op_e2f8_0_comp_ff; +extern compop_func op_e2f9_0_comp_ff; +extern compop_func op_e3d0_0_comp_ff; +extern compop_func op_e3d8_0_comp_ff; +extern compop_func op_e3e0_0_comp_ff; +extern compop_func op_e3e8_0_comp_ff; +extern compop_func op_e3f0_0_comp_ff; +extern compop_func op_e3f8_0_comp_ff; +extern compop_func op_e3f9_0_comp_ff; +extern compop_func op_e6d0_0_comp_ff; +extern compop_func op_e6d8_0_comp_ff; +extern compop_func op_e6e0_0_comp_ff; +extern compop_func op_e6e8_0_comp_ff; +extern compop_func op_e6f0_0_comp_ff; +extern compop_func op_e6f8_0_comp_ff; +extern compop_func op_e6f9_0_comp_ff; +extern compop_func op_e7d0_0_comp_ff; +extern compop_func op_e7d8_0_comp_ff; +extern compop_func op_e7e0_0_comp_ff; +extern compop_func op_e7e8_0_comp_ff; +extern compop_func op_e7f0_0_comp_ff; +extern compop_func op_e7f8_0_comp_ff; +extern compop_func op_e7f9_0_comp_ff; +extern compop_func op_efc0_0_comp_ff; +extern compop_func op_efd0_0_comp_ff; +extern compop_func op_efe8_0_comp_ff; +extern compop_func op_eff0_0_comp_ff; +extern compop_func op_eff8_0_comp_ff; +extern compop_func op_eff9_0_comp_ff; +extern compop_func op_f200_0_comp_ff; +extern compop_func op_f208_0_comp_ff; +extern compop_func op_f210_0_comp_ff; +extern compop_func op_f218_0_comp_ff; +extern compop_func op_f220_0_comp_ff; +extern compop_func op_f228_0_comp_ff; +extern compop_func op_f230_0_comp_ff; +extern compop_func op_f238_0_comp_ff; +extern compop_func op_f239_0_comp_ff; +extern compop_func op_f23a_0_comp_ff; +extern compop_func op_f23b_0_comp_ff; +extern compop_func op_f23c_0_comp_ff; +extern compop_func op_f240_0_comp_ff; +extern compop_func op_f250_0_comp_ff; +extern compop_func op_f258_0_comp_ff; +extern compop_func op_f260_0_comp_ff; +extern compop_func op_f268_0_comp_ff; +extern compop_func op_f270_0_comp_ff; +extern compop_func op_f278_0_comp_ff; +extern compop_func op_f279_0_comp_ff; +extern compop_func op_f280_0_comp_ff; +extern compop_func op_f2c0_0_comp_ff; +extern compop_func op_f600_0_comp_ff; +extern compop_func op_f608_0_comp_ff; +extern compop_func op_f610_0_comp_ff; +extern compop_func op_f618_0_comp_ff; +extern compop_func op_f620_0_comp_ff; +extern compop_func op_0_0_comp_nf; +extern compop_func op_10_0_comp_nf; +extern compop_func op_18_0_comp_nf; +extern compop_func op_20_0_comp_nf; +extern compop_func op_28_0_comp_nf; +extern compop_func op_30_0_comp_nf; +extern compop_func op_38_0_comp_nf; +extern compop_func op_39_0_comp_nf; +extern compop_func op_3c_0_comp_nf; +extern compop_func op_40_0_comp_nf; +extern compop_func op_50_0_comp_nf; +extern compop_func op_58_0_comp_nf; +extern compop_func op_60_0_comp_nf; +extern compop_func op_68_0_comp_nf; +extern compop_func op_70_0_comp_nf; +extern compop_func op_78_0_comp_nf; +extern compop_func op_79_0_comp_nf; +extern compop_func op_80_0_comp_nf; +extern compop_func op_90_0_comp_nf; +extern compop_func op_98_0_comp_nf; +extern compop_func op_a0_0_comp_nf; +extern compop_func op_a8_0_comp_nf; +extern compop_func op_b0_0_comp_nf; +extern compop_func op_b8_0_comp_nf; +extern compop_func op_b9_0_comp_nf; +extern compop_func op_100_0_comp_nf; +extern compop_func op_110_0_comp_nf; +extern compop_func op_118_0_comp_nf; +extern compop_func op_120_0_comp_nf; +extern compop_func op_128_0_comp_nf; +extern compop_func op_130_0_comp_nf; +extern compop_func op_138_0_comp_nf; +extern compop_func op_139_0_comp_nf; +extern compop_func op_13a_0_comp_nf; +extern compop_func op_13b_0_comp_nf; +extern compop_func op_13c_0_comp_nf; +extern compop_func op_140_0_comp_nf; +extern compop_func op_150_0_comp_nf; +extern compop_func op_158_0_comp_nf; +extern compop_func op_160_0_comp_nf; +extern compop_func op_168_0_comp_nf; +extern compop_func op_170_0_comp_nf; +extern compop_func op_178_0_comp_nf; +extern compop_func op_179_0_comp_nf; +extern compop_func op_180_0_comp_nf; +extern compop_func op_190_0_comp_nf; +extern compop_func op_198_0_comp_nf; +extern compop_func op_1a0_0_comp_nf; +extern compop_func op_1a8_0_comp_nf; +extern compop_func op_1b0_0_comp_nf; +extern compop_func op_1b8_0_comp_nf; +extern compop_func op_1b9_0_comp_nf; +extern compop_func op_1c0_0_comp_nf; +extern compop_func op_1d0_0_comp_nf; +extern compop_func op_1d8_0_comp_nf; +extern compop_func op_1e0_0_comp_nf; +extern compop_func op_1e8_0_comp_nf; +extern compop_func op_1f0_0_comp_nf; +extern compop_func op_1f8_0_comp_nf; +extern compop_func op_1f9_0_comp_nf; +extern compop_func op_200_0_comp_nf; +extern compop_func op_210_0_comp_nf; +extern compop_func op_218_0_comp_nf; +extern compop_func op_220_0_comp_nf; +extern compop_func op_228_0_comp_nf; +extern compop_func op_230_0_comp_nf; +extern compop_func op_238_0_comp_nf; +extern compop_func op_239_0_comp_nf; +extern compop_func op_23c_0_comp_nf; +extern compop_func op_240_0_comp_nf; +extern compop_func op_250_0_comp_nf; +extern compop_func op_258_0_comp_nf; +extern compop_func op_260_0_comp_nf; +extern compop_func op_268_0_comp_nf; +extern compop_func op_270_0_comp_nf; +extern compop_func op_278_0_comp_nf; +extern compop_func op_279_0_comp_nf; +extern compop_func op_280_0_comp_nf; +extern compop_func op_290_0_comp_nf; +extern compop_func op_298_0_comp_nf; +extern compop_func op_2a0_0_comp_nf; +extern compop_func op_2a8_0_comp_nf; +extern compop_func op_2b0_0_comp_nf; +extern compop_func op_2b8_0_comp_nf; +extern compop_func op_2b9_0_comp_nf; +extern compop_func op_400_0_comp_nf; +extern compop_func op_410_0_comp_nf; +extern compop_func op_418_0_comp_nf; +extern compop_func op_420_0_comp_nf; +extern compop_func op_428_0_comp_nf; +extern compop_func op_430_0_comp_nf; +extern compop_func op_438_0_comp_nf; +extern compop_func op_439_0_comp_nf; +extern compop_func op_440_0_comp_nf; +extern compop_func op_450_0_comp_nf; +extern compop_func op_458_0_comp_nf; +extern compop_func op_460_0_comp_nf; +extern compop_func op_468_0_comp_nf; +extern compop_func op_470_0_comp_nf; +extern compop_func op_478_0_comp_nf; +extern compop_func op_479_0_comp_nf; +extern compop_func op_480_0_comp_nf; +extern compop_func op_490_0_comp_nf; +extern compop_func op_498_0_comp_nf; +extern compop_func op_4a0_0_comp_nf; +extern compop_func op_4a8_0_comp_nf; +extern compop_func op_4b0_0_comp_nf; +extern compop_func op_4b8_0_comp_nf; +extern compop_func op_4b9_0_comp_nf; +extern compop_func op_600_0_comp_nf; +extern compop_func op_610_0_comp_nf; +extern compop_func op_618_0_comp_nf; +extern compop_func op_620_0_comp_nf; +extern compop_func op_628_0_comp_nf; +extern compop_func op_630_0_comp_nf; +extern compop_func op_638_0_comp_nf; +extern compop_func op_639_0_comp_nf; +extern compop_func op_640_0_comp_nf; +extern compop_func op_650_0_comp_nf; +extern compop_func op_658_0_comp_nf; +extern compop_func op_660_0_comp_nf; +extern compop_func op_668_0_comp_nf; +extern compop_func op_670_0_comp_nf; +extern compop_func op_678_0_comp_nf; +extern compop_func op_679_0_comp_nf; +extern compop_func op_680_0_comp_nf; +extern compop_func op_690_0_comp_nf; +extern compop_func op_698_0_comp_nf; +extern compop_func op_6a0_0_comp_nf; +extern compop_func op_6a8_0_comp_nf; +extern compop_func op_6b0_0_comp_nf; +extern compop_func op_6b8_0_comp_nf; +extern compop_func op_6b9_0_comp_nf; +extern compop_func op_800_0_comp_nf; +extern compop_func op_810_0_comp_nf; +extern compop_func op_818_0_comp_nf; +extern compop_func op_820_0_comp_nf; +extern compop_func op_828_0_comp_nf; +extern compop_func op_830_0_comp_nf; +extern compop_func op_838_0_comp_nf; +extern compop_func op_839_0_comp_nf; +extern compop_func op_83a_0_comp_nf; +extern compop_func op_83b_0_comp_nf; +extern compop_func op_840_0_comp_nf; +extern compop_func op_850_0_comp_nf; +extern compop_func op_858_0_comp_nf; +extern compop_func op_860_0_comp_nf; +extern compop_func op_868_0_comp_nf; +extern compop_func op_870_0_comp_nf; +extern compop_func op_878_0_comp_nf; +extern compop_func op_879_0_comp_nf; +extern compop_func op_880_0_comp_nf; +extern compop_func op_890_0_comp_nf; +extern compop_func op_898_0_comp_nf; +extern compop_func op_8a0_0_comp_nf; +extern compop_func op_8a8_0_comp_nf; +extern compop_func op_8b0_0_comp_nf; +extern compop_func op_8b8_0_comp_nf; +extern compop_func op_8b9_0_comp_nf; +extern compop_func op_8c0_0_comp_nf; +extern compop_func op_8d0_0_comp_nf; +extern compop_func op_8d8_0_comp_nf; +extern compop_func op_8e0_0_comp_nf; +extern compop_func op_8e8_0_comp_nf; +extern compop_func op_8f0_0_comp_nf; +extern compop_func op_8f8_0_comp_nf; +extern compop_func op_8f9_0_comp_nf; +extern compop_func op_a00_0_comp_nf; +extern compop_func op_a10_0_comp_nf; +extern compop_func op_a18_0_comp_nf; +extern compop_func op_a20_0_comp_nf; +extern compop_func op_a28_0_comp_nf; +extern compop_func op_a30_0_comp_nf; +extern compop_func op_a38_0_comp_nf; +extern compop_func op_a39_0_comp_nf; +extern compop_func op_a3c_0_comp_nf; +extern compop_func op_a40_0_comp_nf; +extern compop_func op_a50_0_comp_nf; +extern compop_func op_a58_0_comp_nf; +extern compop_func op_a60_0_comp_nf; +extern compop_func op_a68_0_comp_nf; +extern compop_func op_a70_0_comp_nf; +extern compop_func op_a78_0_comp_nf; +extern compop_func op_a79_0_comp_nf; +extern compop_func op_a80_0_comp_nf; +extern compop_func op_a90_0_comp_nf; +extern compop_func op_a98_0_comp_nf; +extern compop_func op_aa0_0_comp_nf; +extern compop_func op_aa8_0_comp_nf; +extern compop_func op_ab0_0_comp_nf; +extern compop_func op_ab8_0_comp_nf; +extern compop_func op_ab9_0_comp_nf; +extern compop_func op_c00_0_comp_nf; +extern compop_func op_c10_0_comp_nf; +extern compop_func op_c18_0_comp_nf; +extern compop_func op_c20_0_comp_nf; +extern compop_func op_c28_0_comp_nf; +extern compop_func op_c30_0_comp_nf; +extern compop_func op_c38_0_comp_nf; +extern compop_func op_c39_0_comp_nf; +extern compop_func op_c3a_0_comp_nf; +extern compop_func op_c3b_0_comp_nf; +extern compop_func op_c40_0_comp_nf; +extern compop_func op_c50_0_comp_nf; +extern compop_func op_c58_0_comp_nf; +extern compop_func op_c60_0_comp_nf; +extern compop_func op_c68_0_comp_nf; +extern compop_func op_c70_0_comp_nf; +extern compop_func op_c78_0_comp_nf; +extern compop_func op_c79_0_comp_nf; +extern compop_func op_c7a_0_comp_nf; +extern compop_func op_c7b_0_comp_nf; +extern compop_func op_c80_0_comp_nf; +extern compop_func op_c90_0_comp_nf; +extern compop_func op_c98_0_comp_nf; +extern compop_func op_ca0_0_comp_nf; +extern compop_func op_ca8_0_comp_nf; +extern compop_func op_cb0_0_comp_nf; +extern compop_func op_cb8_0_comp_nf; +extern compop_func op_cb9_0_comp_nf; +extern compop_func op_cba_0_comp_nf; +extern compop_func op_cbb_0_comp_nf; +extern compop_func op_1000_0_comp_nf; +extern compop_func op_1010_0_comp_nf; +extern compop_func op_1018_0_comp_nf; +extern compop_func op_1020_0_comp_nf; +extern compop_func op_1028_0_comp_nf; +extern compop_func op_1030_0_comp_nf; +extern compop_func op_1038_0_comp_nf; +extern compop_func op_1039_0_comp_nf; +extern compop_func op_103a_0_comp_nf; +extern compop_func op_103b_0_comp_nf; +extern compop_func op_103c_0_comp_nf; +extern compop_func op_1080_0_comp_nf; +extern compop_func op_1090_0_comp_nf; +extern compop_func op_1098_0_comp_nf; +extern compop_func op_10a0_0_comp_nf; +extern compop_func op_10a8_0_comp_nf; +extern compop_func op_10b0_0_comp_nf; +extern compop_func op_10b8_0_comp_nf; +extern compop_func op_10b9_0_comp_nf; +extern compop_func op_10ba_0_comp_nf; +extern compop_func op_10bb_0_comp_nf; +extern compop_func op_10bc_0_comp_nf; +extern compop_func op_10c0_0_comp_nf; +extern compop_func op_10d0_0_comp_nf; +extern compop_func op_10d8_0_comp_nf; +extern compop_func op_10e0_0_comp_nf; +extern compop_func op_10e8_0_comp_nf; +extern compop_func op_10f0_0_comp_nf; +extern compop_func op_10f8_0_comp_nf; +extern compop_func op_10f9_0_comp_nf; +extern compop_func op_10fa_0_comp_nf; +extern compop_func op_10fb_0_comp_nf; +extern compop_func op_10fc_0_comp_nf; +extern compop_func op_1100_0_comp_nf; +extern compop_func op_1110_0_comp_nf; +extern compop_func op_1118_0_comp_nf; +extern compop_func op_1120_0_comp_nf; +extern compop_func op_1128_0_comp_nf; +extern compop_func op_1130_0_comp_nf; +extern compop_func op_1138_0_comp_nf; +extern compop_func op_1139_0_comp_nf; +extern compop_func op_113a_0_comp_nf; +extern compop_func op_113b_0_comp_nf; +extern compop_func op_113c_0_comp_nf; +extern compop_func op_1140_0_comp_nf; +extern compop_func op_1150_0_comp_nf; +extern compop_func op_1158_0_comp_nf; +extern compop_func op_1160_0_comp_nf; +extern compop_func op_1168_0_comp_nf; +extern compop_func op_1170_0_comp_nf; +extern compop_func op_1178_0_comp_nf; +extern compop_func op_1179_0_comp_nf; +extern compop_func op_117a_0_comp_nf; +extern compop_func op_117b_0_comp_nf; +extern compop_func op_117c_0_comp_nf; +extern compop_func op_1180_0_comp_nf; +extern compop_func op_1190_0_comp_nf; +extern compop_func op_1198_0_comp_nf; +extern compop_func op_11a0_0_comp_nf; +extern compop_func op_11a8_0_comp_nf; +extern compop_func op_11b0_0_comp_nf; +extern compop_func op_11b8_0_comp_nf; +extern compop_func op_11b9_0_comp_nf; +extern compop_func op_11ba_0_comp_nf; +extern compop_func op_11bb_0_comp_nf; +extern compop_func op_11bc_0_comp_nf; +extern compop_func op_11c0_0_comp_nf; +extern compop_func op_11d0_0_comp_nf; +extern compop_func op_11d8_0_comp_nf; +extern compop_func op_11e0_0_comp_nf; +extern compop_func op_11e8_0_comp_nf; +extern compop_func op_11f0_0_comp_nf; +extern compop_func op_11f8_0_comp_nf; +extern compop_func op_11f9_0_comp_nf; +extern compop_func op_11fa_0_comp_nf; +extern compop_func op_11fb_0_comp_nf; +extern compop_func op_11fc_0_comp_nf; +extern compop_func op_13c0_0_comp_nf; +extern compop_func op_13d0_0_comp_nf; +extern compop_func op_13d8_0_comp_nf; +extern compop_func op_13e0_0_comp_nf; +extern compop_func op_13e8_0_comp_nf; +extern compop_func op_13f0_0_comp_nf; +extern compop_func op_13f8_0_comp_nf; +extern compop_func op_13f9_0_comp_nf; +extern compop_func op_13fa_0_comp_nf; +extern compop_func op_13fb_0_comp_nf; +extern compop_func op_13fc_0_comp_nf; +extern compop_func op_2000_0_comp_nf; +extern compop_func op_2008_0_comp_nf; +extern compop_func op_2010_0_comp_nf; +extern compop_func op_2018_0_comp_nf; +extern compop_func op_2020_0_comp_nf; +extern compop_func op_2028_0_comp_nf; +extern compop_func op_2030_0_comp_nf; +extern compop_func op_2038_0_comp_nf; +extern compop_func op_2039_0_comp_nf; +extern compop_func op_203a_0_comp_nf; +extern compop_func op_203b_0_comp_nf; +extern compop_func op_203c_0_comp_nf; +extern compop_func op_2040_0_comp_nf; +extern compop_func op_2048_0_comp_nf; +extern compop_func op_2050_0_comp_nf; +extern compop_func op_2058_0_comp_nf; +extern compop_func op_2060_0_comp_nf; +extern compop_func op_2068_0_comp_nf; +extern compop_func op_2070_0_comp_nf; +extern compop_func op_2078_0_comp_nf; +extern compop_func op_2079_0_comp_nf; +extern compop_func op_207a_0_comp_nf; +extern compop_func op_207b_0_comp_nf; +extern compop_func op_207c_0_comp_nf; +extern compop_func op_2080_0_comp_nf; +extern compop_func op_2088_0_comp_nf; +extern compop_func op_2090_0_comp_nf; +extern compop_func op_2098_0_comp_nf; +extern compop_func op_20a0_0_comp_nf; +extern compop_func op_20a8_0_comp_nf; +extern compop_func op_20b0_0_comp_nf; +extern compop_func op_20b8_0_comp_nf; +extern compop_func op_20b9_0_comp_nf; +extern compop_func op_20ba_0_comp_nf; +extern compop_func op_20bb_0_comp_nf; +extern compop_func op_20bc_0_comp_nf; +extern compop_func op_20c0_0_comp_nf; +extern compop_func op_20c8_0_comp_nf; +extern compop_func op_20d0_0_comp_nf; +extern compop_func op_20d8_0_comp_nf; +extern compop_func op_20e0_0_comp_nf; +extern compop_func op_20e8_0_comp_nf; +extern compop_func op_20f0_0_comp_nf; +extern compop_func op_20f8_0_comp_nf; +extern compop_func op_20f9_0_comp_nf; +extern compop_func op_20fa_0_comp_nf; +extern compop_func op_20fb_0_comp_nf; +extern compop_func op_20fc_0_comp_nf; +extern compop_func op_2100_0_comp_nf; +extern compop_func op_2108_0_comp_nf; +extern compop_func op_2110_0_comp_nf; +extern compop_func op_2118_0_comp_nf; +extern compop_func op_2120_0_comp_nf; +extern compop_func op_2128_0_comp_nf; +extern compop_func op_2130_0_comp_nf; +extern compop_func op_2138_0_comp_nf; +extern compop_func op_2139_0_comp_nf; +extern compop_func op_213a_0_comp_nf; +extern compop_func op_213b_0_comp_nf; +extern compop_func op_213c_0_comp_nf; +extern compop_func op_2140_0_comp_nf; +extern compop_func op_2148_0_comp_nf; +extern compop_func op_2150_0_comp_nf; +extern compop_func op_2158_0_comp_nf; +extern compop_func op_2160_0_comp_nf; +extern compop_func op_2168_0_comp_nf; +extern compop_func op_2170_0_comp_nf; +extern compop_func op_2178_0_comp_nf; +extern compop_func op_2179_0_comp_nf; +extern compop_func op_217a_0_comp_nf; +extern compop_func op_217b_0_comp_nf; +extern compop_func op_217c_0_comp_nf; +extern compop_func op_2180_0_comp_nf; +extern compop_func op_2188_0_comp_nf; +extern compop_func op_2190_0_comp_nf; +extern compop_func op_2198_0_comp_nf; +extern compop_func op_21a0_0_comp_nf; +extern compop_func op_21a8_0_comp_nf; +extern compop_func op_21b0_0_comp_nf; +extern compop_func op_21b8_0_comp_nf; +extern compop_func op_21b9_0_comp_nf; +extern compop_func op_21ba_0_comp_nf; +extern compop_func op_21bb_0_comp_nf; +extern compop_func op_21bc_0_comp_nf; +extern compop_func op_21c0_0_comp_nf; +extern compop_func op_21c8_0_comp_nf; +extern compop_func op_21d0_0_comp_nf; +extern compop_func op_21d8_0_comp_nf; +extern compop_func op_21e0_0_comp_nf; +extern compop_func op_21e8_0_comp_nf; +extern compop_func op_21f0_0_comp_nf; +extern compop_func op_21f8_0_comp_nf; +extern compop_func op_21f9_0_comp_nf; +extern compop_func op_21fa_0_comp_nf; +extern compop_func op_21fb_0_comp_nf; +extern compop_func op_21fc_0_comp_nf; +extern compop_func op_23c0_0_comp_nf; +extern compop_func op_23c8_0_comp_nf; +extern compop_func op_23d0_0_comp_nf; +extern compop_func op_23d8_0_comp_nf; +extern compop_func op_23e0_0_comp_nf; +extern compop_func op_23e8_0_comp_nf; +extern compop_func op_23f0_0_comp_nf; +extern compop_func op_23f8_0_comp_nf; +extern compop_func op_23f9_0_comp_nf; +extern compop_func op_23fa_0_comp_nf; +extern compop_func op_23fb_0_comp_nf; +extern compop_func op_23fc_0_comp_nf; +extern compop_func op_3000_0_comp_nf; +extern compop_func op_3008_0_comp_nf; +extern compop_func op_3010_0_comp_nf; +extern compop_func op_3018_0_comp_nf; +extern compop_func op_3020_0_comp_nf; +extern compop_func op_3028_0_comp_nf; +extern compop_func op_3030_0_comp_nf; +extern compop_func op_3038_0_comp_nf; +extern compop_func op_3039_0_comp_nf; +extern compop_func op_303a_0_comp_nf; +extern compop_func op_303b_0_comp_nf; +extern compop_func op_303c_0_comp_nf; +extern compop_func op_3040_0_comp_nf; +extern compop_func op_3048_0_comp_nf; +extern compop_func op_3050_0_comp_nf; +extern compop_func op_3058_0_comp_nf; +extern compop_func op_3060_0_comp_nf; +extern compop_func op_3068_0_comp_nf; +extern compop_func op_3070_0_comp_nf; +extern compop_func op_3078_0_comp_nf; +extern compop_func op_3079_0_comp_nf; +extern compop_func op_307a_0_comp_nf; +extern compop_func op_307b_0_comp_nf; +extern compop_func op_307c_0_comp_nf; +extern compop_func op_3080_0_comp_nf; +extern compop_func op_3088_0_comp_nf; +extern compop_func op_3090_0_comp_nf; +extern compop_func op_3098_0_comp_nf; +extern compop_func op_30a0_0_comp_nf; +extern compop_func op_30a8_0_comp_nf; +extern compop_func op_30b0_0_comp_nf; +extern compop_func op_30b8_0_comp_nf; +extern compop_func op_30b9_0_comp_nf; +extern compop_func op_30ba_0_comp_nf; +extern compop_func op_30bb_0_comp_nf; +extern compop_func op_30bc_0_comp_nf; +extern compop_func op_30c0_0_comp_nf; +extern compop_func op_30c8_0_comp_nf; +extern compop_func op_30d0_0_comp_nf; +extern compop_func op_30d8_0_comp_nf; +extern compop_func op_30e0_0_comp_nf; +extern compop_func op_30e8_0_comp_nf; +extern compop_func op_30f0_0_comp_nf; +extern compop_func op_30f8_0_comp_nf; +extern compop_func op_30f9_0_comp_nf; +extern compop_func op_30fa_0_comp_nf; +extern compop_func op_30fb_0_comp_nf; +extern compop_func op_30fc_0_comp_nf; +extern compop_func op_3100_0_comp_nf; +extern compop_func op_3108_0_comp_nf; +extern compop_func op_3110_0_comp_nf; +extern compop_func op_3118_0_comp_nf; +extern compop_func op_3120_0_comp_nf; +extern compop_func op_3128_0_comp_nf; +extern compop_func op_3130_0_comp_nf; +extern compop_func op_3138_0_comp_nf; +extern compop_func op_3139_0_comp_nf; +extern compop_func op_313a_0_comp_nf; +extern compop_func op_313b_0_comp_nf; +extern compop_func op_313c_0_comp_nf; +extern compop_func op_3140_0_comp_nf; +extern compop_func op_3148_0_comp_nf; +extern compop_func op_3150_0_comp_nf; +extern compop_func op_3158_0_comp_nf; +extern compop_func op_3160_0_comp_nf; +extern compop_func op_3168_0_comp_nf; +extern compop_func op_3170_0_comp_nf; +extern compop_func op_3178_0_comp_nf; +extern compop_func op_3179_0_comp_nf; +extern compop_func op_317a_0_comp_nf; +extern compop_func op_317b_0_comp_nf; +extern compop_func op_317c_0_comp_nf; +extern compop_func op_3180_0_comp_nf; +extern compop_func op_3188_0_comp_nf; +extern compop_func op_3190_0_comp_nf; +extern compop_func op_3198_0_comp_nf; +extern compop_func op_31a0_0_comp_nf; +extern compop_func op_31a8_0_comp_nf; +extern compop_func op_31b0_0_comp_nf; +extern compop_func op_31b8_0_comp_nf; +extern compop_func op_31b9_0_comp_nf; +extern compop_func op_31ba_0_comp_nf; +extern compop_func op_31bb_0_comp_nf; +extern compop_func op_31bc_0_comp_nf; +extern compop_func op_31c0_0_comp_nf; +extern compop_func op_31c8_0_comp_nf; +extern compop_func op_31d0_0_comp_nf; +extern compop_func op_31d8_0_comp_nf; +extern compop_func op_31e0_0_comp_nf; +extern compop_func op_31e8_0_comp_nf; +extern compop_func op_31f0_0_comp_nf; +extern compop_func op_31f8_0_comp_nf; +extern compop_func op_31f9_0_comp_nf; +extern compop_func op_31fa_0_comp_nf; +extern compop_func op_31fb_0_comp_nf; +extern compop_func op_31fc_0_comp_nf; +extern compop_func op_33c0_0_comp_nf; +extern compop_func op_33c8_0_comp_nf; +extern compop_func op_33d0_0_comp_nf; +extern compop_func op_33d8_0_comp_nf; +extern compop_func op_33e0_0_comp_nf; +extern compop_func op_33e8_0_comp_nf; +extern compop_func op_33f0_0_comp_nf; +extern compop_func op_33f8_0_comp_nf; +extern compop_func op_33f9_0_comp_nf; +extern compop_func op_33fa_0_comp_nf; +extern compop_func op_33fb_0_comp_nf; +extern compop_func op_33fc_0_comp_nf; +extern compop_func op_4000_0_comp_nf; +extern compop_func op_4010_0_comp_nf; +extern compop_func op_4018_0_comp_nf; +extern compop_func op_4020_0_comp_nf; +extern compop_func op_4028_0_comp_nf; +extern compop_func op_4030_0_comp_nf; +extern compop_func op_4038_0_comp_nf; +extern compop_func op_4039_0_comp_nf; +extern compop_func op_4040_0_comp_nf; +extern compop_func op_4050_0_comp_nf; +extern compop_func op_4058_0_comp_nf; +extern compop_func op_4060_0_comp_nf; +extern compop_func op_4068_0_comp_nf; +extern compop_func op_4070_0_comp_nf; +extern compop_func op_4078_0_comp_nf; +extern compop_func op_4079_0_comp_nf; +extern compop_func op_4080_0_comp_nf; +extern compop_func op_4090_0_comp_nf; +extern compop_func op_4098_0_comp_nf; +extern compop_func op_40a0_0_comp_nf; +extern compop_func op_40a8_0_comp_nf; +extern compop_func op_40b0_0_comp_nf; +extern compop_func op_40b8_0_comp_nf; +extern compop_func op_40b9_0_comp_nf; +extern compop_func op_41d0_0_comp_nf; +extern compop_func op_41e8_0_comp_nf; +extern compop_func op_41f0_0_comp_nf; +extern compop_func op_41f8_0_comp_nf; +extern compop_func op_41f9_0_comp_nf; +extern compop_func op_41fa_0_comp_nf; +extern compop_func op_41fb_0_comp_nf; +extern compop_func op_4200_0_comp_nf; +extern compop_func op_4210_0_comp_nf; +extern compop_func op_4218_0_comp_nf; +extern compop_func op_4220_0_comp_nf; +extern compop_func op_4228_0_comp_nf; +extern compop_func op_4230_0_comp_nf; +extern compop_func op_4238_0_comp_nf; +extern compop_func op_4239_0_comp_nf; +extern compop_func op_4240_0_comp_nf; +extern compop_func op_4250_0_comp_nf; +extern compop_func op_4258_0_comp_nf; +extern compop_func op_4260_0_comp_nf; +extern compop_func op_4268_0_comp_nf; +extern compop_func op_4270_0_comp_nf; +extern compop_func op_4278_0_comp_nf; +extern compop_func op_4279_0_comp_nf; +extern compop_func op_4280_0_comp_nf; +extern compop_func op_4290_0_comp_nf; +extern compop_func op_4298_0_comp_nf; +extern compop_func op_42a0_0_comp_nf; +extern compop_func op_42a8_0_comp_nf; +extern compop_func op_42b0_0_comp_nf; +extern compop_func op_42b8_0_comp_nf; +extern compop_func op_42b9_0_comp_nf; +extern compop_func op_4400_0_comp_nf; +extern compop_func op_4410_0_comp_nf; +extern compop_func op_4418_0_comp_nf; +extern compop_func op_4420_0_comp_nf; +extern compop_func op_4428_0_comp_nf; +extern compop_func op_4430_0_comp_nf; +extern compop_func op_4438_0_comp_nf; +extern compop_func op_4439_0_comp_nf; +extern compop_func op_4440_0_comp_nf; +extern compop_func op_4450_0_comp_nf; +extern compop_func op_4458_0_comp_nf; +extern compop_func op_4460_0_comp_nf; +extern compop_func op_4468_0_comp_nf; +extern compop_func op_4470_0_comp_nf; +extern compop_func op_4478_0_comp_nf; +extern compop_func op_4479_0_comp_nf; +extern compop_func op_4480_0_comp_nf; +extern compop_func op_4490_0_comp_nf; +extern compop_func op_4498_0_comp_nf; +extern compop_func op_44a0_0_comp_nf; +extern compop_func op_44a8_0_comp_nf; +extern compop_func op_44b0_0_comp_nf; +extern compop_func op_44b8_0_comp_nf; +extern compop_func op_44b9_0_comp_nf; +extern compop_func op_4600_0_comp_nf; +extern compop_func op_4610_0_comp_nf; +extern compop_func op_4618_0_comp_nf; +extern compop_func op_4620_0_comp_nf; +extern compop_func op_4628_0_comp_nf; +extern compop_func op_4630_0_comp_nf; +extern compop_func op_4638_0_comp_nf; +extern compop_func op_4639_0_comp_nf; +extern compop_func op_4640_0_comp_nf; +extern compop_func op_4650_0_comp_nf; +extern compop_func op_4658_0_comp_nf; +extern compop_func op_4660_0_comp_nf; +extern compop_func op_4668_0_comp_nf; +extern compop_func op_4670_0_comp_nf; +extern compop_func op_4678_0_comp_nf; +extern compop_func op_4679_0_comp_nf; +extern compop_func op_4680_0_comp_nf; +extern compop_func op_4690_0_comp_nf; +extern compop_func op_4698_0_comp_nf; +extern compop_func op_46a0_0_comp_nf; +extern compop_func op_46a8_0_comp_nf; +extern compop_func op_46b0_0_comp_nf; +extern compop_func op_46b8_0_comp_nf; +extern compop_func op_46b9_0_comp_nf; +extern compop_func op_4808_0_comp_nf; +extern compop_func op_4840_0_comp_nf; +extern compop_func op_4850_0_comp_nf; +extern compop_func op_4868_0_comp_nf; +extern compop_func op_4870_0_comp_nf; +extern compop_func op_4878_0_comp_nf; +extern compop_func op_4879_0_comp_nf; +extern compop_func op_487a_0_comp_nf; +extern compop_func op_487b_0_comp_nf; +extern compop_func op_4880_0_comp_nf; +extern compop_func op_4890_0_comp_nf; +extern compop_func op_48a0_0_comp_nf; +extern compop_func op_48a8_0_comp_nf; +extern compop_func op_48b0_0_comp_nf; +extern compop_func op_48b8_0_comp_nf; +extern compop_func op_48b9_0_comp_nf; +extern compop_func op_48c0_0_comp_nf; +extern compop_func op_48d0_0_comp_nf; +extern compop_func op_48e0_0_comp_nf; +extern compop_func op_48e8_0_comp_nf; +extern compop_func op_48f0_0_comp_nf; +extern compop_func op_48f8_0_comp_nf; +extern compop_func op_48f9_0_comp_nf; +extern compop_func op_49c0_0_comp_nf; +extern compop_func op_4a00_0_comp_nf; +extern compop_func op_4a10_0_comp_nf; +extern compop_func op_4a18_0_comp_nf; +extern compop_func op_4a20_0_comp_nf; +extern compop_func op_4a28_0_comp_nf; +extern compop_func op_4a30_0_comp_nf; +extern compop_func op_4a38_0_comp_nf; +extern compop_func op_4a39_0_comp_nf; +extern compop_func op_4a3a_0_comp_nf; +extern compop_func op_4a3b_0_comp_nf; +extern compop_func op_4a3c_0_comp_nf; +extern compop_func op_4a40_0_comp_nf; +extern compop_func op_4a48_0_comp_nf; +extern compop_func op_4a50_0_comp_nf; +extern compop_func op_4a58_0_comp_nf; +extern compop_func op_4a60_0_comp_nf; +extern compop_func op_4a68_0_comp_nf; +extern compop_func op_4a70_0_comp_nf; +extern compop_func op_4a78_0_comp_nf; +extern compop_func op_4a79_0_comp_nf; +extern compop_func op_4a7a_0_comp_nf; +extern compop_func op_4a7b_0_comp_nf; +extern compop_func op_4a7c_0_comp_nf; +extern compop_func op_4a80_0_comp_nf; +extern compop_func op_4a88_0_comp_nf; +extern compop_func op_4a90_0_comp_nf; +extern compop_func op_4a98_0_comp_nf; +extern compop_func op_4aa0_0_comp_nf; +extern compop_func op_4aa8_0_comp_nf; +extern compop_func op_4ab0_0_comp_nf; +extern compop_func op_4ab8_0_comp_nf; +extern compop_func op_4ab9_0_comp_nf; +extern compop_func op_4aba_0_comp_nf; +extern compop_func op_4abb_0_comp_nf; +extern compop_func op_4abc_0_comp_nf; +extern compop_func op_4c00_0_comp_nf; +extern compop_func op_4c10_0_comp_nf; +extern compop_func op_4c18_0_comp_nf; +extern compop_func op_4c20_0_comp_nf; +extern compop_func op_4c28_0_comp_nf; +extern compop_func op_4c30_0_comp_nf; +extern compop_func op_4c38_0_comp_nf; +extern compop_func op_4c39_0_comp_nf; +extern compop_func op_4c3a_0_comp_nf; +extern compop_func op_4c3b_0_comp_nf; +extern compop_func op_4c3c_0_comp_nf; +extern compop_func op_4c40_0_comp_nf; +extern compop_func op_4c50_0_comp_nf; +extern compop_func op_4c58_0_comp_nf; +extern compop_func op_4c60_0_comp_nf; +extern compop_func op_4c68_0_comp_nf; +extern compop_func op_4c70_0_comp_nf; +extern compop_func op_4c78_0_comp_nf; +extern compop_func op_4c79_0_comp_nf; +extern compop_func op_4c7a_0_comp_nf; +extern compop_func op_4c7b_0_comp_nf; +extern compop_func op_4c7c_0_comp_nf; +extern compop_func op_4c90_0_comp_nf; +extern compop_func op_4c98_0_comp_nf; +extern compop_func op_4ca8_0_comp_nf; +extern compop_func op_4cb0_0_comp_nf; +extern compop_func op_4cb8_0_comp_nf; +extern compop_func op_4cb9_0_comp_nf; +extern compop_func op_4cba_0_comp_nf; +extern compop_func op_4cbb_0_comp_nf; +extern compop_func op_4cd0_0_comp_nf; +extern compop_func op_4cd8_0_comp_nf; +extern compop_func op_4ce8_0_comp_nf; +extern compop_func op_4cf0_0_comp_nf; +extern compop_func op_4cf8_0_comp_nf; +extern compop_func op_4cf9_0_comp_nf; +extern compop_func op_4cfa_0_comp_nf; +extern compop_func op_4cfb_0_comp_nf; +extern compop_func op_4e50_0_comp_nf; +extern compop_func op_4e58_0_comp_nf; +extern compop_func op_4e71_0_comp_nf; +extern compop_func op_4e74_0_comp_nf; +extern compop_func op_4e75_0_comp_nf; +extern compop_func op_4e90_0_comp_nf; +extern compop_func op_4ea8_0_comp_nf; +extern compop_func op_4eb0_0_comp_nf; +extern compop_func op_4eb8_0_comp_nf; +extern compop_func op_4eb9_0_comp_nf; +extern compop_func op_4eba_0_comp_nf; +extern compop_func op_4ebb_0_comp_nf; +extern compop_func op_4ed0_0_comp_nf; +extern compop_func op_4ee8_0_comp_nf; +extern compop_func op_4ef0_0_comp_nf; +extern compop_func op_4ef8_0_comp_nf; +extern compop_func op_4ef9_0_comp_nf; +extern compop_func op_4efa_0_comp_nf; +extern compop_func op_4efb_0_comp_nf; +extern compop_func op_5000_0_comp_nf; +extern compop_func op_5010_0_comp_nf; +extern compop_func op_5018_0_comp_nf; +extern compop_func op_5020_0_comp_nf; +extern compop_func op_5028_0_comp_nf; +extern compop_func op_5030_0_comp_nf; +extern compop_func op_5038_0_comp_nf; +extern compop_func op_5039_0_comp_nf; +extern compop_func op_5040_0_comp_nf; +extern compop_func op_5048_0_comp_nf; +extern compop_func op_5050_0_comp_nf; +extern compop_func op_5058_0_comp_nf; +extern compop_func op_5060_0_comp_nf; +extern compop_func op_5068_0_comp_nf; +extern compop_func op_5070_0_comp_nf; +extern compop_func op_5078_0_comp_nf; +extern compop_func op_5079_0_comp_nf; +extern compop_func op_5080_0_comp_nf; +extern compop_func op_5088_0_comp_nf; +extern compop_func op_5090_0_comp_nf; +extern compop_func op_5098_0_comp_nf; +extern compop_func op_50a0_0_comp_nf; +extern compop_func op_50a8_0_comp_nf; +extern compop_func op_50b0_0_comp_nf; +extern compop_func op_50b8_0_comp_nf; +extern compop_func op_50b9_0_comp_nf; +extern compop_func op_50c0_0_comp_nf; +extern compop_func op_50c8_0_comp_nf; +extern compop_func op_50d0_0_comp_nf; +extern compop_func op_50d8_0_comp_nf; +extern compop_func op_50e0_0_comp_nf; +extern compop_func op_50e8_0_comp_nf; +extern compop_func op_50f0_0_comp_nf; +extern compop_func op_50f8_0_comp_nf; +extern compop_func op_50f9_0_comp_nf; +extern compop_func op_5100_0_comp_nf; +extern compop_func op_5110_0_comp_nf; +extern compop_func op_5118_0_comp_nf; +extern compop_func op_5120_0_comp_nf; +extern compop_func op_5128_0_comp_nf; +extern compop_func op_5130_0_comp_nf; +extern compop_func op_5138_0_comp_nf; +extern compop_func op_5139_0_comp_nf; +extern compop_func op_5140_0_comp_nf; +extern compop_func op_5148_0_comp_nf; +extern compop_func op_5150_0_comp_nf; +extern compop_func op_5158_0_comp_nf; +extern compop_func op_5160_0_comp_nf; +extern compop_func op_5168_0_comp_nf; +extern compop_func op_5170_0_comp_nf; +extern compop_func op_5178_0_comp_nf; +extern compop_func op_5179_0_comp_nf; +extern compop_func op_5180_0_comp_nf; +extern compop_func op_5188_0_comp_nf; +extern compop_func op_5190_0_comp_nf; +extern compop_func op_5198_0_comp_nf; +extern compop_func op_51a0_0_comp_nf; +extern compop_func op_51a8_0_comp_nf; +extern compop_func op_51b0_0_comp_nf; +extern compop_func op_51b8_0_comp_nf; +extern compop_func op_51b9_0_comp_nf; +extern compop_func op_51c0_0_comp_nf; +extern compop_func op_51c8_0_comp_nf; +extern compop_func op_51d0_0_comp_nf; +extern compop_func op_51d8_0_comp_nf; +extern compop_func op_51e0_0_comp_nf; +extern compop_func op_51e8_0_comp_nf; +extern compop_func op_51f0_0_comp_nf; +extern compop_func op_51f8_0_comp_nf; +extern compop_func op_51f9_0_comp_nf; +extern compop_func op_52c0_0_comp_nf; +extern compop_func op_52c8_0_comp_nf; +extern compop_func op_52d0_0_comp_nf; +extern compop_func op_52d8_0_comp_nf; +extern compop_func op_52e0_0_comp_nf; +extern compop_func op_52e8_0_comp_nf; +extern compop_func op_52f0_0_comp_nf; +extern compop_func op_52f8_0_comp_nf; +extern compop_func op_52f9_0_comp_nf; +extern compop_func op_53c0_0_comp_nf; +extern compop_func op_53c8_0_comp_nf; +extern compop_func op_53d0_0_comp_nf; +extern compop_func op_53d8_0_comp_nf; +extern compop_func op_53e0_0_comp_nf; +extern compop_func op_53e8_0_comp_nf; +extern compop_func op_53f0_0_comp_nf; +extern compop_func op_53f8_0_comp_nf; +extern compop_func op_53f9_0_comp_nf; +extern compop_func op_54c0_0_comp_nf; +extern compop_func op_54c8_0_comp_nf; +extern compop_func op_54d0_0_comp_nf; +extern compop_func op_54d8_0_comp_nf; +extern compop_func op_54e0_0_comp_nf; +extern compop_func op_54e8_0_comp_nf; +extern compop_func op_54f0_0_comp_nf; +extern compop_func op_54f8_0_comp_nf; +extern compop_func op_54f9_0_comp_nf; +extern compop_func op_55c0_0_comp_nf; +extern compop_func op_55c8_0_comp_nf; +extern compop_func op_55d0_0_comp_nf; +extern compop_func op_55d8_0_comp_nf; +extern compop_func op_55e0_0_comp_nf; +extern compop_func op_55e8_0_comp_nf; +extern compop_func op_55f0_0_comp_nf; +extern compop_func op_55f8_0_comp_nf; +extern compop_func op_55f9_0_comp_nf; +extern compop_func op_56c0_0_comp_nf; +extern compop_func op_56c8_0_comp_nf; +extern compop_func op_56d0_0_comp_nf; +extern compop_func op_56d8_0_comp_nf; +extern compop_func op_56e0_0_comp_nf; +extern compop_func op_56e8_0_comp_nf; +extern compop_func op_56f0_0_comp_nf; +extern compop_func op_56f8_0_comp_nf; +extern compop_func op_56f9_0_comp_nf; +extern compop_func op_57c0_0_comp_nf; +extern compop_func op_57c8_0_comp_nf; +extern compop_func op_57d0_0_comp_nf; +extern compop_func op_57d8_0_comp_nf; +extern compop_func op_57e0_0_comp_nf; +extern compop_func op_57e8_0_comp_nf; +extern compop_func op_57f0_0_comp_nf; +extern compop_func op_57f8_0_comp_nf; +extern compop_func op_57f9_0_comp_nf; +extern compop_func op_58c0_0_comp_nf; +extern compop_func op_58c8_0_comp_nf; +extern compop_func op_58d0_0_comp_nf; +extern compop_func op_58d8_0_comp_nf; +extern compop_func op_58e0_0_comp_nf; +extern compop_func op_58e8_0_comp_nf; +extern compop_func op_58f0_0_comp_nf; +extern compop_func op_58f8_0_comp_nf; +extern compop_func op_58f9_0_comp_nf; +extern compop_func op_59c0_0_comp_nf; +extern compop_func op_59c8_0_comp_nf; +extern compop_func op_59d0_0_comp_nf; +extern compop_func op_59d8_0_comp_nf; +extern compop_func op_59e0_0_comp_nf; +extern compop_func op_59e8_0_comp_nf; +extern compop_func op_59f0_0_comp_nf; +extern compop_func op_59f8_0_comp_nf; +extern compop_func op_59f9_0_comp_nf; +extern compop_func op_5ac0_0_comp_nf; +extern compop_func op_5ac8_0_comp_nf; +extern compop_func op_5ad0_0_comp_nf; +extern compop_func op_5ad8_0_comp_nf; +extern compop_func op_5ae0_0_comp_nf; +extern compop_func op_5ae8_0_comp_nf; +extern compop_func op_5af0_0_comp_nf; +extern compop_func op_5af8_0_comp_nf; +extern compop_func op_5af9_0_comp_nf; +extern compop_func op_5bc0_0_comp_nf; +extern compop_func op_5bc8_0_comp_nf; +extern compop_func op_5bd0_0_comp_nf; +extern compop_func op_5bd8_0_comp_nf; +extern compop_func op_5be0_0_comp_nf; +extern compop_func op_5be8_0_comp_nf; +extern compop_func op_5bf0_0_comp_nf; +extern compop_func op_5bf8_0_comp_nf; +extern compop_func op_5bf9_0_comp_nf; +extern compop_func op_5cc0_0_comp_nf; +extern compop_func op_5cc8_0_comp_nf; +extern compop_func op_5cd0_0_comp_nf; +extern compop_func op_5cd8_0_comp_nf; +extern compop_func op_5ce0_0_comp_nf; +extern compop_func op_5ce8_0_comp_nf; +extern compop_func op_5cf0_0_comp_nf; +extern compop_func op_5cf8_0_comp_nf; +extern compop_func op_5cf9_0_comp_nf; +extern compop_func op_5dc0_0_comp_nf; +extern compop_func op_5dc8_0_comp_nf; +extern compop_func op_5dd0_0_comp_nf; +extern compop_func op_5dd8_0_comp_nf; +extern compop_func op_5de0_0_comp_nf; +extern compop_func op_5de8_0_comp_nf; +extern compop_func op_5df0_0_comp_nf; +extern compop_func op_5df8_0_comp_nf; +extern compop_func op_5df9_0_comp_nf; +extern compop_func op_5ec0_0_comp_nf; +extern compop_func op_5ec8_0_comp_nf; +extern compop_func op_5ed0_0_comp_nf; +extern compop_func op_5ed8_0_comp_nf; +extern compop_func op_5ee0_0_comp_nf; +extern compop_func op_5ee8_0_comp_nf; +extern compop_func op_5ef0_0_comp_nf; +extern compop_func op_5ef8_0_comp_nf; +extern compop_func op_5ef9_0_comp_nf; +extern compop_func op_5fc0_0_comp_nf; +extern compop_func op_5fc8_0_comp_nf; +extern compop_func op_5fd0_0_comp_nf; +extern compop_func op_5fd8_0_comp_nf; +extern compop_func op_5fe0_0_comp_nf; +extern compop_func op_5fe8_0_comp_nf; +extern compop_func op_5ff0_0_comp_nf; +extern compop_func op_5ff8_0_comp_nf; +extern compop_func op_5ff9_0_comp_nf; +extern compop_func op_6000_0_comp_nf; +extern compop_func op_6001_0_comp_nf; +extern compop_func op_60ff_0_comp_nf; +extern compop_func op_6100_0_comp_nf; +extern compop_func op_6101_0_comp_nf; +extern compop_func op_61ff_0_comp_nf; +extern compop_func op_6200_0_comp_nf; +extern compop_func op_6201_0_comp_nf; +extern compop_func op_62ff_0_comp_nf; +extern compop_func op_6300_0_comp_nf; +extern compop_func op_6301_0_comp_nf; +extern compop_func op_63ff_0_comp_nf; +extern compop_func op_6400_0_comp_nf; +extern compop_func op_6401_0_comp_nf; +extern compop_func op_64ff_0_comp_nf; +extern compop_func op_6500_0_comp_nf; +extern compop_func op_6501_0_comp_nf; +extern compop_func op_65ff_0_comp_nf; +extern compop_func op_6600_0_comp_nf; +extern compop_func op_6601_0_comp_nf; +extern compop_func op_66ff_0_comp_nf; +extern compop_func op_6700_0_comp_nf; +extern compop_func op_6701_0_comp_nf; +extern compop_func op_67ff_0_comp_nf; +extern compop_func op_6800_0_comp_nf; +extern compop_func op_6801_0_comp_nf; +extern compop_func op_68ff_0_comp_nf; +extern compop_func op_6900_0_comp_nf; +extern compop_func op_6901_0_comp_nf; +extern compop_func op_69ff_0_comp_nf; +extern compop_func op_6a00_0_comp_nf; +extern compop_func op_6a01_0_comp_nf; +extern compop_func op_6aff_0_comp_nf; +extern compop_func op_6b00_0_comp_nf; +extern compop_func op_6b01_0_comp_nf; +extern compop_func op_6bff_0_comp_nf; +extern compop_func op_6c00_0_comp_nf; +extern compop_func op_6c01_0_comp_nf; +extern compop_func op_6cff_0_comp_nf; +extern compop_func op_6d00_0_comp_nf; +extern compop_func op_6d01_0_comp_nf; +extern compop_func op_6dff_0_comp_nf; +extern compop_func op_6e00_0_comp_nf; +extern compop_func op_6e01_0_comp_nf; +extern compop_func op_6eff_0_comp_nf; +extern compop_func op_6f00_0_comp_nf; +extern compop_func op_6f01_0_comp_nf; +extern compop_func op_6fff_0_comp_nf; +extern compop_func op_7000_0_comp_nf; +extern compop_func op_8000_0_comp_nf; +extern compop_func op_8010_0_comp_nf; +extern compop_func op_8018_0_comp_nf; +extern compop_func op_8020_0_comp_nf; +extern compop_func op_8028_0_comp_nf; +extern compop_func op_8030_0_comp_nf; +extern compop_func op_8038_0_comp_nf; +extern compop_func op_8039_0_comp_nf; +extern compop_func op_803a_0_comp_nf; +extern compop_func op_803b_0_comp_nf; +extern compop_func op_803c_0_comp_nf; +extern compop_func op_8040_0_comp_nf; +extern compop_func op_8050_0_comp_nf; +extern compop_func op_8058_0_comp_nf; +extern compop_func op_8060_0_comp_nf; +extern compop_func op_8068_0_comp_nf; +extern compop_func op_8070_0_comp_nf; +extern compop_func op_8078_0_comp_nf; +extern compop_func op_8079_0_comp_nf; +extern compop_func op_807a_0_comp_nf; +extern compop_func op_807b_0_comp_nf; +extern compop_func op_807c_0_comp_nf; +extern compop_func op_8080_0_comp_nf; +extern compop_func op_8090_0_comp_nf; +extern compop_func op_8098_0_comp_nf; +extern compop_func op_80a0_0_comp_nf; +extern compop_func op_80a8_0_comp_nf; +extern compop_func op_80b0_0_comp_nf; +extern compop_func op_80b8_0_comp_nf; +extern compop_func op_80b9_0_comp_nf; +extern compop_func op_80ba_0_comp_nf; +extern compop_func op_80bb_0_comp_nf; +extern compop_func op_80bc_0_comp_nf; +extern compop_func op_80c0_0_comp_nf; +extern compop_func op_80d0_0_comp_nf; +extern compop_func op_80d8_0_comp_nf; +extern compop_func op_80e0_0_comp_nf; +extern compop_func op_80e8_0_comp_nf; +extern compop_func op_80f0_0_comp_nf; +extern compop_func op_80f8_0_comp_nf; +extern compop_func op_80f9_0_comp_nf; +extern compop_func op_80fa_0_comp_nf; +extern compop_func op_80fb_0_comp_nf; +extern compop_func op_80fc_0_comp_nf; +extern compop_func op_8110_0_comp_nf; +extern compop_func op_8118_0_comp_nf; +extern compop_func op_8120_0_comp_nf; +extern compop_func op_8128_0_comp_nf; +extern compop_func op_8130_0_comp_nf; +extern compop_func op_8138_0_comp_nf; +extern compop_func op_8139_0_comp_nf; +extern compop_func op_8150_0_comp_nf; +extern compop_func op_8158_0_comp_nf; +extern compop_func op_8160_0_comp_nf; +extern compop_func op_8168_0_comp_nf; +extern compop_func op_8170_0_comp_nf; +extern compop_func op_8178_0_comp_nf; +extern compop_func op_8179_0_comp_nf; +extern compop_func op_8190_0_comp_nf; +extern compop_func op_8198_0_comp_nf; +extern compop_func op_81a0_0_comp_nf; +extern compop_func op_81a8_0_comp_nf; +extern compop_func op_81b0_0_comp_nf; +extern compop_func op_81b8_0_comp_nf; +extern compop_func op_81b9_0_comp_nf; +extern compop_func op_81c0_0_comp_nf; +extern compop_func op_81d0_0_comp_nf; +extern compop_func op_81d8_0_comp_nf; +extern compop_func op_81e0_0_comp_nf; +extern compop_func op_81e8_0_comp_nf; +extern compop_func op_81f0_0_comp_nf; +extern compop_func op_81f8_0_comp_nf; +extern compop_func op_81f9_0_comp_nf; +extern compop_func op_81fa_0_comp_nf; +extern compop_func op_81fb_0_comp_nf; +extern compop_func op_81fc_0_comp_nf; +extern compop_func op_9000_0_comp_nf; +extern compop_func op_9010_0_comp_nf; +extern compop_func op_9018_0_comp_nf; +extern compop_func op_9020_0_comp_nf; +extern compop_func op_9028_0_comp_nf; +extern compop_func op_9030_0_comp_nf; +extern compop_func op_9038_0_comp_nf; +extern compop_func op_9039_0_comp_nf; +extern compop_func op_903a_0_comp_nf; +extern compop_func op_903b_0_comp_nf; +extern compop_func op_903c_0_comp_nf; +extern compop_func op_9040_0_comp_nf; +extern compop_func op_9048_0_comp_nf; +extern compop_func op_9050_0_comp_nf; +extern compop_func op_9058_0_comp_nf; +extern compop_func op_9060_0_comp_nf; +extern compop_func op_9068_0_comp_nf; +extern compop_func op_9070_0_comp_nf; +extern compop_func op_9078_0_comp_nf; +extern compop_func op_9079_0_comp_nf; +extern compop_func op_907a_0_comp_nf; +extern compop_func op_907b_0_comp_nf; +extern compop_func op_907c_0_comp_nf; +extern compop_func op_9080_0_comp_nf; +extern compop_func op_9088_0_comp_nf; +extern compop_func op_9090_0_comp_nf; +extern compop_func op_9098_0_comp_nf; +extern compop_func op_90a0_0_comp_nf; +extern compop_func op_90a8_0_comp_nf; +extern compop_func op_90b0_0_comp_nf; +extern compop_func op_90b8_0_comp_nf; +extern compop_func op_90b9_0_comp_nf; +extern compop_func op_90ba_0_comp_nf; +extern compop_func op_90bb_0_comp_nf; +extern compop_func op_90bc_0_comp_nf; +extern compop_func op_90c0_0_comp_nf; +extern compop_func op_90c8_0_comp_nf; +extern compop_func op_90d0_0_comp_nf; +extern compop_func op_90d8_0_comp_nf; +extern compop_func op_90e0_0_comp_nf; +extern compop_func op_90e8_0_comp_nf; +extern compop_func op_90f0_0_comp_nf; +extern compop_func op_90f8_0_comp_nf; +extern compop_func op_90f9_0_comp_nf; +extern compop_func op_90fa_0_comp_nf; +extern compop_func op_90fb_0_comp_nf; +extern compop_func op_90fc_0_comp_nf; +extern compop_func op_9100_0_comp_nf; +extern compop_func op_9108_0_comp_nf; +extern compop_func op_9110_0_comp_nf; +extern compop_func op_9118_0_comp_nf; +extern compop_func op_9120_0_comp_nf; +extern compop_func op_9128_0_comp_nf; +extern compop_func op_9130_0_comp_nf; +extern compop_func op_9138_0_comp_nf; +extern compop_func op_9139_0_comp_nf; +extern compop_func op_9140_0_comp_nf; +extern compop_func op_9148_0_comp_nf; +extern compop_func op_9150_0_comp_nf; +extern compop_func op_9158_0_comp_nf; +extern compop_func op_9160_0_comp_nf; +extern compop_func op_9168_0_comp_nf; +extern compop_func op_9170_0_comp_nf; +extern compop_func op_9178_0_comp_nf; +extern compop_func op_9179_0_comp_nf; +extern compop_func op_9180_0_comp_nf; +extern compop_func op_9188_0_comp_nf; +extern compop_func op_9190_0_comp_nf; +extern compop_func op_9198_0_comp_nf; +extern compop_func op_91a0_0_comp_nf; +extern compop_func op_91a8_0_comp_nf; +extern compop_func op_91b0_0_comp_nf; +extern compop_func op_91b8_0_comp_nf; +extern compop_func op_91b9_0_comp_nf; +extern compop_func op_91c0_0_comp_nf; +extern compop_func op_91c8_0_comp_nf; +extern compop_func op_91d0_0_comp_nf; +extern compop_func op_91d8_0_comp_nf; +extern compop_func op_91e0_0_comp_nf; +extern compop_func op_91e8_0_comp_nf; +extern compop_func op_91f0_0_comp_nf; +extern compop_func op_91f8_0_comp_nf; +extern compop_func op_91f9_0_comp_nf; +extern compop_func op_91fa_0_comp_nf; +extern compop_func op_91fb_0_comp_nf; +extern compop_func op_91fc_0_comp_nf; +extern compop_func op_b000_0_comp_nf; +extern compop_func op_b010_0_comp_nf; +extern compop_func op_b018_0_comp_nf; +extern compop_func op_b020_0_comp_nf; +extern compop_func op_b028_0_comp_nf; +extern compop_func op_b030_0_comp_nf; +extern compop_func op_b038_0_comp_nf; +extern compop_func op_b039_0_comp_nf; +extern compop_func op_b03a_0_comp_nf; +extern compop_func op_b03b_0_comp_nf; +extern compop_func op_b03c_0_comp_nf; +extern compop_func op_b040_0_comp_nf; +extern compop_func op_b048_0_comp_nf; +extern compop_func op_b050_0_comp_nf; +extern compop_func op_b058_0_comp_nf; +extern compop_func op_b060_0_comp_nf; +extern compop_func op_b068_0_comp_nf; +extern compop_func op_b070_0_comp_nf; +extern compop_func op_b078_0_comp_nf; +extern compop_func op_b079_0_comp_nf; +extern compop_func op_b07a_0_comp_nf; +extern compop_func op_b07b_0_comp_nf; +extern compop_func op_b07c_0_comp_nf; +extern compop_func op_b080_0_comp_nf; +extern compop_func op_b088_0_comp_nf; +extern compop_func op_b090_0_comp_nf; +extern compop_func op_b098_0_comp_nf; +extern compop_func op_b0a0_0_comp_nf; +extern compop_func op_b0a8_0_comp_nf; +extern compop_func op_b0b0_0_comp_nf; +extern compop_func op_b0b8_0_comp_nf; +extern compop_func op_b0b9_0_comp_nf; +extern compop_func op_b0ba_0_comp_nf; +extern compop_func op_b0bb_0_comp_nf; +extern compop_func op_b0bc_0_comp_nf; +extern compop_func op_b0c0_0_comp_nf; +extern compop_func op_b0c8_0_comp_nf; +extern compop_func op_b0d0_0_comp_nf; +extern compop_func op_b0d8_0_comp_nf; +extern compop_func op_b0e0_0_comp_nf; +extern compop_func op_b0e8_0_comp_nf; +extern compop_func op_b0f0_0_comp_nf; +extern compop_func op_b0f8_0_comp_nf; +extern compop_func op_b0f9_0_comp_nf; +extern compop_func op_b0fa_0_comp_nf; +extern compop_func op_b0fb_0_comp_nf; +extern compop_func op_b0fc_0_comp_nf; +extern compop_func op_b100_0_comp_nf; +extern compop_func op_b108_0_comp_nf; +extern compop_func op_b110_0_comp_nf; +extern compop_func op_b118_0_comp_nf; +extern compop_func op_b120_0_comp_nf; +extern compop_func op_b128_0_comp_nf; +extern compop_func op_b130_0_comp_nf; +extern compop_func op_b138_0_comp_nf; +extern compop_func op_b139_0_comp_nf; +extern compop_func op_b140_0_comp_nf; +extern compop_func op_b148_0_comp_nf; +extern compop_func op_b150_0_comp_nf; +extern compop_func op_b158_0_comp_nf; +extern compop_func op_b160_0_comp_nf; +extern compop_func op_b168_0_comp_nf; +extern compop_func op_b170_0_comp_nf; +extern compop_func op_b178_0_comp_nf; +extern compop_func op_b179_0_comp_nf; +extern compop_func op_b180_0_comp_nf; +extern compop_func op_b188_0_comp_nf; +extern compop_func op_b190_0_comp_nf; +extern compop_func op_b198_0_comp_nf; +extern compop_func op_b1a0_0_comp_nf; +extern compop_func op_b1a8_0_comp_nf; +extern compop_func op_b1b0_0_comp_nf; +extern compop_func op_b1b8_0_comp_nf; +extern compop_func op_b1b9_0_comp_nf; +extern compop_func op_b1c0_0_comp_nf; +extern compop_func op_b1c8_0_comp_nf; +extern compop_func op_b1d0_0_comp_nf; +extern compop_func op_b1d8_0_comp_nf; +extern compop_func op_b1e0_0_comp_nf; +extern compop_func op_b1e8_0_comp_nf; +extern compop_func op_b1f0_0_comp_nf; +extern compop_func op_b1f8_0_comp_nf; +extern compop_func op_b1f9_0_comp_nf; +extern compop_func op_b1fa_0_comp_nf; +extern compop_func op_b1fb_0_comp_nf; +extern compop_func op_b1fc_0_comp_nf; +extern compop_func op_c000_0_comp_nf; +extern compop_func op_c010_0_comp_nf; +extern compop_func op_c018_0_comp_nf; +extern compop_func op_c020_0_comp_nf; +extern compop_func op_c028_0_comp_nf; +extern compop_func op_c030_0_comp_nf; +extern compop_func op_c038_0_comp_nf; +extern compop_func op_c039_0_comp_nf; +extern compop_func op_c03a_0_comp_nf; +extern compop_func op_c03b_0_comp_nf; +extern compop_func op_c03c_0_comp_nf; +extern compop_func op_c040_0_comp_nf; +extern compop_func op_c050_0_comp_nf; +extern compop_func op_c058_0_comp_nf; +extern compop_func op_c060_0_comp_nf; +extern compop_func op_c068_0_comp_nf; +extern compop_func op_c070_0_comp_nf; +extern compop_func op_c078_0_comp_nf; +extern compop_func op_c079_0_comp_nf; +extern compop_func op_c07a_0_comp_nf; +extern compop_func op_c07b_0_comp_nf; +extern compop_func op_c07c_0_comp_nf; +extern compop_func op_c080_0_comp_nf; +extern compop_func op_c090_0_comp_nf; +extern compop_func op_c098_0_comp_nf; +extern compop_func op_c0a0_0_comp_nf; +extern compop_func op_c0a8_0_comp_nf; +extern compop_func op_c0b0_0_comp_nf; +extern compop_func op_c0b8_0_comp_nf; +extern compop_func op_c0b9_0_comp_nf; +extern compop_func op_c0ba_0_comp_nf; +extern compop_func op_c0bb_0_comp_nf; +extern compop_func op_c0bc_0_comp_nf; +extern compop_func op_c0c0_0_comp_nf; +extern compop_func op_c0d0_0_comp_nf; +extern compop_func op_c0d8_0_comp_nf; +extern compop_func op_c0e0_0_comp_nf; +extern compop_func op_c0e8_0_comp_nf; +extern compop_func op_c0f0_0_comp_nf; +extern compop_func op_c0f8_0_comp_nf; +extern compop_func op_c0f9_0_comp_nf; +extern compop_func op_c0fa_0_comp_nf; +extern compop_func op_c0fb_0_comp_nf; +extern compop_func op_c0fc_0_comp_nf; +extern compop_func op_c110_0_comp_nf; +extern compop_func op_c118_0_comp_nf; +extern compop_func op_c120_0_comp_nf; +extern compop_func op_c128_0_comp_nf; +extern compop_func op_c130_0_comp_nf; +extern compop_func op_c138_0_comp_nf; +extern compop_func op_c139_0_comp_nf; +extern compop_func op_c140_0_comp_nf; +extern compop_func op_c148_0_comp_nf; +extern compop_func op_c150_0_comp_nf; +extern compop_func op_c158_0_comp_nf; +extern compop_func op_c160_0_comp_nf; +extern compop_func op_c168_0_comp_nf; +extern compop_func op_c170_0_comp_nf; +extern compop_func op_c178_0_comp_nf; +extern compop_func op_c179_0_comp_nf; +extern compop_func op_c188_0_comp_nf; +extern compop_func op_c190_0_comp_nf; +extern compop_func op_c198_0_comp_nf; +extern compop_func op_c1a0_0_comp_nf; +extern compop_func op_c1a8_0_comp_nf; +extern compop_func op_c1b0_0_comp_nf; +extern compop_func op_c1b8_0_comp_nf; +extern compop_func op_c1b9_0_comp_nf; +extern compop_func op_c1c0_0_comp_nf; +extern compop_func op_c1d0_0_comp_nf; +extern compop_func op_c1d8_0_comp_nf; +extern compop_func op_c1e0_0_comp_nf; +extern compop_func op_c1e8_0_comp_nf; +extern compop_func op_c1f0_0_comp_nf; +extern compop_func op_c1f8_0_comp_nf; +extern compop_func op_c1f9_0_comp_nf; +extern compop_func op_c1fa_0_comp_nf; +extern compop_func op_c1fb_0_comp_nf; +extern compop_func op_c1fc_0_comp_nf; +extern compop_func op_d000_0_comp_nf; +extern compop_func op_d010_0_comp_nf; +extern compop_func op_d018_0_comp_nf; +extern compop_func op_d020_0_comp_nf; +extern compop_func op_d028_0_comp_nf; +extern compop_func op_d030_0_comp_nf; +extern compop_func op_d038_0_comp_nf; +extern compop_func op_d039_0_comp_nf; +extern compop_func op_d03a_0_comp_nf; +extern compop_func op_d03b_0_comp_nf; +extern compop_func op_d03c_0_comp_nf; +extern compop_func op_d040_0_comp_nf; +extern compop_func op_d048_0_comp_nf; +extern compop_func op_d050_0_comp_nf; +extern compop_func op_d058_0_comp_nf; +extern compop_func op_d060_0_comp_nf; +extern compop_func op_d068_0_comp_nf; +extern compop_func op_d070_0_comp_nf; +extern compop_func op_d078_0_comp_nf; +extern compop_func op_d079_0_comp_nf; +extern compop_func op_d07a_0_comp_nf; +extern compop_func op_d07b_0_comp_nf; +extern compop_func op_d07c_0_comp_nf; +extern compop_func op_d080_0_comp_nf; +extern compop_func op_d088_0_comp_nf; +extern compop_func op_d090_0_comp_nf; +extern compop_func op_d098_0_comp_nf; +extern compop_func op_d0a0_0_comp_nf; +extern compop_func op_d0a8_0_comp_nf; +extern compop_func op_d0b0_0_comp_nf; +extern compop_func op_d0b8_0_comp_nf; +extern compop_func op_d0b9_0_comp_nf; +extern compop_func op_d0ba_0_comp_nf; +extern compop_func op_d0bb_0_comp_nf; +extern compop_func op_d0bc_0_comp_nf; +extern compop_func op_d0c0_0_comp_nf; +extern compop_func op_d0c8_0_comp_nf; +extern compop_func op_d0d0_0_comp_nf; +extern compop_func op_d0d8_0_comp_nf; +extern compop_func op_d0e0_0_comp_nf; +extern compop_func op_d0e8_0_comp_nf; +extern compop_func op_d0f0_0_comp_nf; +extern compop_func op_d0f8_0_comp_nf; +extern compop_func op_d0f9_0_comp_nf; +extern compop_func op_d0fa_0_comp_nf; +extern compop_func op_d0fb_0_comp_nf; +extern compop_func op_d0fc_0_comp_nf; +extern compop_func op_d100_0_comp_nf; +extern compop_func op_d108_0_comp_nf; +extern compop_func op_d110_0_comp_nf; +extern compop_func op_d118_0_comp_nf; +extern compop_func op_d120_0_comp_nf; +extern compop_func op_d128_0_comp_nf; +extern compop_func op_d130_0_comp_nf; +extern compop_func op_d138_0_comp_nf; +extern compop_func op_d139_0_comp_nf; +extern compop_func op_d140_0_comp_nf; +extern compop_func op_d148_0_comp_nf; +extern compop_func op_d150_0_comp_nf; +extern compop_func op_d158_0_comp_nf; +extern compop_func op_d160_0_comp_nf; +extern compop_func op_d168_0_comp_nf; +extern compop_func op_d170_0_comp_nf; +extern compop_func op_d178_0_comp_nf; +extern compop_func op_d179_0_comp_nf; +extern compop_func op_d180_0_comp_nf; +extern compop_func op_d188_0_comp_nf; +extern compop_func op_d190_0_comp_nf; +extern compop_func op_d198_0_comp_nf; +extern compop_func op_d1a0_0_comp_nf; +extern compop_func op_d1a8_0_comp_nf; +extern compop_func op_d1b0_0_comp_nf; +extern compop_func op_d1b8_0_comp_nf; +extern compop_func op_d1b9_0_comp_nf; +extern compop_func op_d1c0_0_comp_nf; +extern compop_func op_d1c8_0_comp_nf; +extern compop_func op_d1d0_0_comp_nf; +extern compop_func op_d1d8_0_comp_nf; +extern compop_func op_d1e0_0_comp_nf; +extern compop_func op_d1e8_0_comp_nf; +extern compop_func op_d1f0_0_comp_nf; +extern compop_func op_d1f8_0_comp_nf; +extern compop_func op_d1f9_0_comp_nf; +extern compop_func op_d1fa_0_comp_nf; +extern compop_func op_d1fb_0_comp_nf; +extern compop_func op_d1fc_0_comp_nf; +extern compop_func op_e000_0_comp_nf; +extern compop_func op_e008_0_comp_nf; +extern compop_func op_e010_0_comp_nf; +extern compop_func op_e018_0_comp_nf; +extern compop_func op_e020_0_comp_nf; +extern compop_func op_e028_0_comp_nf; +extern compop_func op_e030_0_comp_nf; +extern compop_func op_e038_0_comp_nf; +extern compop_func op_e040_0_comp_nf; +extern compop_func op_e048_0_comp_nf; +extern compop_func op_e050_0_comp_nf; +extern compop_func op_e058_0_comp_nf; +extern compop_func op_e060_0_comp_nf; +extern compop_func op_e068_0_comp_nf; +extern compop_func op_e070_0_comp_nf; +extern compop_func op_e078_0_comp_nf; +extern compop_func op_e080_0_comp_nf; +extern compop_func op_e088_0_comp_nf; +extern compop_func op_e090_0_comp_nf; +extern compop_func op_e098_0_comp_nf; +extern compop_func op_e0a0_0_comp_nf; +extern compop_func op_e0a8_0_comp_nf; +extern compop_func op_e0b0_0_comp_nf; +extern compop_func op_e0b8_0_comp_nf; +extern compop_func op_e0d0_0_comp_nf; +extern compop_func op_e0d8_0_comp_nf; +extern compop_func op_e0e0_0_comp_nf; +extern compop_func op_e0e8_0_comp_nf; +extern compop_func op_e0f0_0_comp_nf; +extern compop_func op_e0f8_0_comp_nf; +extern compop_func op_e0f9_0_comp_nf; +extern compop_func op_e100_0_comp_nf; +extern compop_func op_e108_0_comp_nf; +extern compop_func op_e110_0_comp_nf; +extern compop_func op_e118_0_comp_nf; +extern compop_func op_e120_0_comp_nf; +extern compop_func op_e128_0_comp_nf; +extern compop_func op_e130_0_comp_nf; +extern compop_func op_e138_0_comp_nf; +extern compop_func op_e140_0_comp_nf; +extern compop_func op_e148_0_comp_nf; +extern compop_func op_e150_0_comp_nf; +extern compop_func op_e158_0_comp_nf; +extern compop_func op_e160_0_comp_nf; +extern compop_func op_e168_0_comp_nf; +extern compop_func op_e170_0_comp_nf; +extern compop_func op_e178_0_comp_nf; +extern compop_func op_e180_0_comp_nf; +extern compop_func op_e188_0_comp_nf; +extern compop_func op_e190_0_comp_nf; +extern compop_func op_e198_0_comp_nf; +extern compop_func op_e1a0_0_comp_nf; +extern compop_func op_e1a8_0_comp_nf; +extern compop_func op_e1b0_0_comp_nf; +extern compop_func op_e1b8_0_comp_nf; +extern compop_func op_e1d0_0_comp_nf; +extern compop_func op_e1d8_0_comp_nf; +extern compop_func op_e1e0_0_comp_nf; +extern compop_func op_e1e8_0_comp_nf; +extern compop_func op_e1f0_0_comp_nf; +extern compop_func op_e1f8_0_comp_nf; +extern compop_func op_e1f9_0_comp_nf; +extern compop_func op_e2d0_0_comp_nf; +extern compop_func op_e2d8_0_comp_nf; +extern compop_func op_e2e0_0_comp_nf; +extern compop_func op_e2e8_0_comp_nf; +extern compop_func op_e2f0_0_comp_nf; +extern compop_func op_e2f8_0_comp_nf; +extern compop_func op_e2f9_0_comp_nf; +extern compop_func op_e3d0_0_comp_nf; +extern compop_func op_e3d8_0_comp_nf; +extern compop_func op_e3e0_0_comp_nf; +extern compop_func op_e3e8_0_comp_nf; +extern compop_func op_e3f0_0_comp_nf; +extern compop_func op_e3f8_0_comp_nf; +extern compop_func op_e3f9_0_comp_nf; +extern compop_func op_e6d0_0_comp_nf; +extern compop_func op_e6d8_0_comp_nf; +extern compop_func op_e6e0_0_comp_nf; +extern compop_func op_e6e8_0_comp_nf; +extern compop_func op_e6f0_0_comp_nf; +extern compop_func op_e6f8_0_comp_nf; +extern compop_func op_e6f9_0_comp_nf; +extern compop_func op_e7d0_0_comp_nf; +extern compop_func op_e7d8_0_comp_nf; +extern compop_func op_e7e0_0_comp_nf; +extern compop_func op_e7e8_0_comp_nf; +extern compop_func op_e7f0_0_comp_nf; +extern compop_func op_e7f8_0_comp_nf; +extern compop_func op_e7f9_0_comp_nf; +extern compop_func op_efc0_0_comp_nf; +extern compop_func op_efd0_0_comp_nf; +extern compop_func op_efe8_0_comp_nf; +extern compop_func op_eff0_0_comp_nf; +extern compop_func op_eff8_0_comp_nf; +extern compop_func op_eff9_0_comp_nf; +extern compop_func op_f200_0_comp_nf; +extern compop_func op_f208_0_comp_nf; +extern compop_func op_f210_0_comp_nf; +extern compop_func op_f218_0_comp_nf; +extern compop_func op_f220_0_comp_nf; +extern compop_func op_f228_0_comp_nf; +extern compop_func op_f230_0_comp_nf; +extern compop_func op_f238_0_comp_nf; +extern compop_func op_f239_0_comp_nf; +extern compop_func op_f23a_0_comp_nf; +extern compop_func op_f23b_0_comp_nf; +extern compop_func op_f23c_0_comp_nf; +extern compop_func op_f240_0_comp_nf; +extern compop_func op_f250_0_comp_nf; +extern compop_func op_f258_0_comp_nf; +extern compop_func op_f260_0_comp_nf; +extern compop_func op_f268_0_comp_nf; +extern compop_func op_f270_0_comp_nf; +extern compop_func op_f278_0_comp_nf; +extern compop_func op_f279_0_comp_nf; +extern compop_func op_f280_0_comp_nf; +extern compop_func op_f2c0_0_comp_nf; +extern compop_func op_f600_0_comp_nf; +extern compop_func op_f608_0_comp_nf; +extern compop_func op_f610_0_comp_nf; +extern compop_func op_f618_0_comp_nf; +extern compop_func op_f620_0_comp_nf; diff --git a/src/jit/arm/flags_arm.h b/src/jit/arm/flags_arm.h new file mode 100644 index 000000000..c8272def2 --- /dev/null +++ b/src/jit/arm/flags_arm.h @@ -0,0 +1,68 @@ +/* + * compiler/flags_arm.h - Native flags definitions for ARM + * + * Copyright (c) 2013 Jens Heitmann of ARAnyM dev team (see AUTHORS) + * + * Inspired by Christian Bauer's Basilisk II + * + * Original 68040 JIT compiler for UAE, copyright 2000-2002 Bernd Meyer + * + * Adaptation for Basilisk II and improvements, copyright 2000-2002 + * Gwenole Beauchesne + * + * Basilisk II (C) 1997-2002 Christian Bauer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef NATIVE_FLAGS_ARM_H +#define NATIVE_FLAGS_ARM_H + +/* Native integer code conditions */ +enum +{ + NATIVE_CC_EQ = 0, + NATIVE_CC_NE = 1, + NATIVE_CC_CS = 2, + NATIVE_CC_CC = 3, + NATIVE_CC_MI = 4, + NATIVE_CC_PL = 5, + NATIVE_CC_VS = 6, + NATIVE_CC_VC = 7, + NATIVE_CC_HI = 8, + NATIVE_CC_LS = 9, + NATIVE_CC_GE = 10, + NATIVE_CC_LT = 11, + NATIVE_CC_GT = 12, + NATIVE_CC_LE = 13, + NATIVE_CC_AL = 14, + + // For FBcc, we need some pseudo condition codes + NATIVE_CC_F_OGT = 16 + 2, + NATIVE_CC_F_OGE = 16 + 3, + NATIVE_CC_F_OLT = 16 + 4, + NATIVE_CC_F_OLE = 16 + 5, + NATIVE_CC_F_OGL = 16 + 6, + NATIVE_CC_F_OR = 16 + 7, + NATIVE_CC_F_UN = 16 + 8, + NATIVE_CC_F_UEQ = 16 + 9, + NATIVE_CC_F_UGT = 16 + 10, + NATIVE_CC_F_UGE = 16 + 11, + NATIVE_CC_F_ULT = 16 + 12, + NATIVE_CC_F_ULE = 16 + 13, + NATIVE_CC_F_NEVER = 32 +}; + +#endif /* NATIVE_FLAGS_ARM_H */ diff --git a/src/jit/arm/gencomp_arm.c b/src/jit/arm/gencomp_arm.c new file mode 100644 index 000000000..993151566 --- /dev/null +++ b/src/jit/arm/gencomp_arm.c @@ -0,0 +1,5099 @@ +/* + * compiler/gencomp_arm2.c - MC680x0 compilation generator (ARM Adaption JIT v1 & JIT v2) + * + * Based on work Copyright 1995, 1996 Bernd Schmidt + * Changes for UAE-JIT Copyright 2000 Bernd Meyer + * + * Adaptation for ARAnyM/ARM, copyright 2001-2015 + * Milan Jurik, Jens Heitmann + * + * Basilisk II (C) 1997-2005 Christian Bauer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Notes + * ===== + * + * Advantages of JIT v2 + * - Processor independent style + * - Reduced overhead + * - Easier to understand / read + * - Easier to optimize + * - More precise flag handling + * - Better optimization for different CPU version ARM, ARMv6 etc.. + * + * Disadvantages of JIT v2 + * - Less generated + * - Requires more code implementation by hand (MidFunc) + * - MIDFUNCS are more CPU minded (closer to raw) + * - Separate code for each instruction (but this could be also an advantage, because you can concentrate on it) + * + * Additional note: + * - current using jnf_xxx calls for non-flag operations and + * jff_xxx for flag operations + * + * Still todo: + * - Optimize genamode, genastore, gen_writeXXX, gen_readXXX, genmovemXXX + * + */ + +#define CC_FOR_BUILD 1 +#include "sysconfig.h" + +#include "sysdeps.h" +#include "readcpu.h" + +#include +#include +#include +#include +#include +#include +#undef abort + +#define BOOL_TYPE "int" +#define failure global_failure=1 +#define FAILURE global_failure=1 +#define isjump global_isjump=1 +#define is_const_jump global_iscjump=1 +#define isaddx global_isaddx=1 +#define uses_cmov global_cmov=1 +#define mayfail global_mayfail=1 +#define uses_fpu global_fpu=1 + +int hack_opcode; + +static int global_failure; +static int global_isjump; +static int global_iscjump; +static int global_isaddx; +static int global_cmov; +static int long_opcode; +static int global_mayfail; +static int global_fpu; + +static char endstr[1000]; +static char lines[100000]; +static int comp_index = 0; + +#include "flags_arm.h" + +#ifndef __attribute__ +# ifndef __GNUC__ +# define __attribute__(x) +# endif +#endif + + +static int cond_codes[] = { // + NATIVE_CC_AL, -1, // + NATIVE_CC_HI, NATIVE_CC_LS, // + NATIVE_CC_CC, NATIVE_CC_CS, // + NATIVE_CC_NE, NATIVE_CC_EQ, // + NATIVE_CC_VC, NATIVE_CC_VS, // + NATIVE_CC_PL, NATIVE_CC_MI, // + NATIVE_CC_GE, NATIVE_CC_LT, // + NATIVE_CC_GT, NATIVE_CC_LE // + }; + +__attribute__((format(printf, 1, 2))) +static void comprintf(const char *format, ...) +{ + va_list args; + + va_start(args, format); + comp_index += vsprintf(lines + comp_index, format, args); + va_end(args); +} + +static void com_discard(void) +{ + comp_index = 0; +} + +static void com_flush(void) +{ + int i; + for (i = 0; i < comp_index; i++) + putchar(lines[i]); + com_discard(); +} + + +static FILE *headerfile; +static FILE *stblfile; + +static int using_prefetch; +static int using_exception_3; +static int cpu_level; +static int noflags; + +/* For the current opcode, the next lower level that will have different code. + * Initialized to -1 for each opcode. If it remains unchanged, indicates we + * are done with that opcode. */ +static int next_cpu_level; + +static int *opcode_map; +static int *opcode_next_clev; +static int *opcode_last_postfix; +static unsigned long *counts; + +static void read_counts(void) +{ + FILE *file; + unsigned long opcode, count, total; + char name[20]; + int nr = 0; + memset(counts, 0, 65536 * sizeof *counts); + + file = fopen("frequent.68k", "r"); + if (file) { + if (fscanf(file, "Total: %lu\n", &total) != 1) + { + assert(0); + } + while (fscanf(file, "%lx: %lu %s\n", &opcode, &count, name) == 3) { + opcode_next_clev[nr] = 4; + opcode_last_postfix[nr] = -1; + opcode_map[nr++] = opcode; + counts[opcode] = count; + } + fclose(file); + } + if (nr == nr_cpuop_funcs) + return; + for (opcode = 0; opcode < 0x10000; opcode++) { + if (table68k[opcode].handler == -1 && table68k[opcode].mnemo != i_ILLG + && counts[opcode] == 0) { + opcode_next_clev[nr] = 4; + opcode_last_postfix[nr] = -1; + opcode_map[nr++] = opcode; + counts[opcode] = count; + } + } + assert (nr == nr_cpuop_funcs); +} + +static int n_braces = 0; +static int insn_n_cycles; + +static void start_brace(void) { + n_braces++; + comprintf("{"); +} + +static void close_brace(void) { + assert(n_braces > 0); + n_braces--; + comprintf("}"); +} + +static void finish_braces(void) { + while (n_braces > 0) + close_brace(); +} + +static inline void gen_update_next_handler(void) { + return; /* Can anything clever be done here? */ +} + +static void gen_writebyte(const char *address, const char *source) +{ + comprintf("\twritebyte(%s, %s, scratchie);\n", address, source); +} + +static void gen_writeword(const char *address, const char *source) +{ + comprintf("\twriteword(%s, %s, scratchie);\n", address, source); +} + +static void gen_writelong(const char *address, const char *source) +{ + comprintf("\twritelong(%s, %s, scratchie);\n", address, source); +} + +static void gen_readbyte(const char *address, const char* dest) +{ + comprintf("\treadbyte(%s, %s, scratchie);\n", address, dest); +} + +static void gen_readword(const char *address, const char *dest) +{ + comprintf("\treadword(%s,%s,scratchie);\n", address, dest); +} + +static void gen_readlong(const char *address, const char *dest) +{ + comprintf("\treadlong(%s, %s, scratchie);\n", address, dest); +} + +static const char * +gen_nextilong(void) { + static char buffer[80]; + + sprintf(buffer, "comp_get_ilong((m68k_pc_offset+=4)-4)"); + insn_n_cycles += 4; + + long_opcode = 1; + return buffer; +} + +static const char * +gen_nextiword(void) { + static char buffer[80]; + + sprintf(buffer, "comp_get_iword((m68k_pc_offset+=2)-2)"); + insn_n_cycles += 2; + + long_opcode = 1; + return buffer; +} + +static const char * +gen_nextibyte(void) { + static char buffer[80]; + + sprintf(buffer, "comp_get_ibyte((m68k_pc_offset+=2)-2)"); + insn_n_cycles += 2; + + long_opcode = 1; + return buffer; +} + +#if defined(USE_JIT_FPU) +// Only used by FPU (future), get rid of unused warning +static void +swap_opcode (void) +{ + comprintf("#if defined(HAVE_GET_WORD_UNSWAPPED) && !defined(FULLMMU)\n"); + comprintf("\topcode = do_byteswap_16(opcode);\n"); + comprintf("#endif\n"); +} +#endif + +static void sync_m68k_pc(void) { + comprintf("\t if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc();\n"); +} + +/* getv == 1: fetch data; getv != 0: check for odd address. If movem != 0, + * the calling routine handles Apdi and Aipi modes. + * gb-- movem == 2 means the same thing but for a MOVE16 instruction */ +static void genamode(amodes mode, const char *reg, wordsizes size, const char *name, int getv, int movem) +{ + start_brace(); + switch (mode) + { + case Dreg: /* Do we need to check dodgy here? */ + assert (!movem); + if (getv == 1 || getv == 2) + { + /* We generate the variable even for getv==2, so we can use + it as a destination for MOVE */ + comprintf("\tint %s = %s;\n", name, reg); + } + return; + + case Areg: + assert (!movem); + if (getv == 1 || getv == 2) + { + /* see above */ + comprintf("\tint %s = dodgy ? scratchie++ : %s + 8;\n", name, reg); + if (getv == 1) + { + comprintf("\tif (dodgy) \n"); + comprintf("\t\tmov_l_rr(%s, %s + 8);\n", name, reg); + } + } + return; + + case Aind: + comprintf("\tint %sa = dodgy ? scratchie++ : %s + 8;\n", name, reg); + comprintf("\tif (dodgy)\n"); + comprintf("\t\tmov_l_rr(%sa, %s + 8);\n", name, reg); + break; + case Aipi: + comprintf("\tint %sa = scratchie++;\n", name); + comprintf("\tmov_l_rr(%sa, %s + 8);\n", name, reg); + break; + case Apdi: + switch (size) + { + case sz_byte: + if (movem) + { + comprintf("\tint %sa = dodgy ? scratchie++ : %s + 8;\n", name, reg); + comprintf("\tif (dodgy)\n"); + comprintf("\t\tmov_l_rr(%sa, 8 + %s);\n", name, reg); + } else + { + start_brace(); + comprintf("\tint %sa = dodgy ? scratchie++ : %s + 8;\n", name, reg); + comprintf("\tlea_l_brr(%s + 8, %s + 8, (uae_s32)-areg_byteinc[%s]);\n", reg, reg, reg); + comprintf("\tif (dodgy)\n"); + comprintf("\t\tmov_l_rr(%sa, 8 + %s);\n", name, reg); + } + break; + case sz_word: + if (movem) + { + comprintf("\tint %sa=dodgy?scratchie++:%s+8;\n", name, reg); + comprintf("\tif (dodgy) \n"); + comprintf("\tmov_l_rr(%sa,8+%s);\n", name, reg); + } else + { + start_brace(); + comprintf("\tint %sa = dodgy ? scratchie++ : %s + 8;\n", name, reg); + comprintf("\tlea_l_brr(%s + 8, %s + 8, -2);\n", reg, reg); + comprintf("\tif (dodgy)\n"); + comprintf("\t\tmov_l_rr(%sa, 8 + %s);\n", name, reg); + } + break; + case sz_long: + if (movem) + { + comprintf("\tint %sa = dodgy ? scratchie++ : %s + 8;\n", name, reg); + comprintf("\tif (dodgy)\n"); + comprintf("\t\tmov_l_rr(%sa, 8 + %s);\n", name, reg); + } else + { + start_brace(); + comprintf("\tint %sa = dodgy ? scratchie++ : %s + 8;\n", name, reg); + comprintf("\tlea_l_brr(%s + 8, %s + 8, -4);\n", reg, reg); + comprintf("\tif (dodgy)\n"); + comprintf("\t\tmov_l_rr(%sa, 8 + %s);\n", name, reg); + } + break; + default: + assert(0); + break; + } + break; + case Ad16: + comprintf("\tint %sa = scratchie++;\n", name); + comprintf("\tmov_l_rr(%sa, 8 + %s);\n", name, reg); + comprintf("\tlea_l_brr(%sa, %sa, (uae_s32)(uae_s16)%s);\n", name, name, gen_nextiword()); + break; + case Ad8r: + comprintf("\tint %sa = scratchie++;\n", name); + comprintf("\tcalc_disp_ea_020(%s + 8, %s, %sa, scratchie);\n", reg, gen_nextiword(), name); + break; + + case PC16: + comprintf("\tint %sa = scratchie++;\n", name); + comprintf("\tuae_u32 address = start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset;\n"); + comprintf("\tuae_s32 PC16off = (uae_s32)(uae_s16)%s;\n", gen_nextiword()); + comprintf("\tmov_l_ri(%sa, address + PC16off);\n", name); + break; + + case PC8r: + comprintf("\tint pctmp = scratchie++;\n"); + comprintf("\tint %sa = scratchie++;\n", name); + comprintf("\tuae_u32 address = start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset;\n"); + start_brace(); + comprintf("\tmov_l_ri(pctmp,address);\n"); + + comprintf("\tcalc_disp_ea_020(pctmp, %s, %sa, scratchie);\n", gen_nextiword(), name); + break; + case absw: + comprintf("\tint %sa = scratchie++;\n", name); + comprintf("\tmov_l_ri(%sa, (uae_s32)(uae_s16)%s);\n", name, gen_nextiword()); + break; + case absl: + comprintf("\tint %sa = scratchie++;\n", name); + comprintf("\tmov_l_ri(%sa, %s); /* absl */\n", name, gen_nextilong()); + break; + case imm: + assert (getv == 1); + switch (size) + { + case sz_byte: + comprintf("\tint %s = scratchie++;\n", name); + comprintf("\tmov_l_ri(%s, (uae_s32)(uae_s8)%s);\n", name, gen_nextibyte()); + break; + case sz_word: + comprintf("\tint %s = scratchie++;\n", name); + comprintf("\tmov_l_ri(%s, (uae_s32)(uae_s16)%s);\n", name, gen_nextiword()); + break; + case sz_long: + comprintf("\tint %s = scratchie++;\n", name); + comprintf("\tmov_l_ri(%s, %s);\n", name, gen_nextilong()); + break; + default: + assert(0); + break; + } + return; + case imm0: + assert (getv == 1); + comprintf("\tint %s = scratchie++;\n", name); + comprintf("\tmov_l_ri(%s, (uae_s32)(uae_s8)%s);\n", name, gen_nextibyte()); + return; + case imm1: + assert (getv == 1); + comprintf("\tint %s = scratchie++;\n", name); + comprintf("\tmov_l_ri(%s, (uae_s32)(uae_s16)%s);\n", name, gen_nextiword()); + return; + case imm2: + assert (getv == 1); + comprintf("\tint %s = scratchie++;\n", name); + comprintf("\tmov_l_ri(%s, %s);\n", name, gen_nextilong()); + return; + case immi: + assert (getv == 1); + comprintf("\tint %s = scratchie++;\n", name); + comprintf("\tmov_l_ri(%s, %s);\n", name, reg); + return; + default: + assert(0); + break; + } + + /* We get here for all non-reg non-immediate addressing modes to + * actually fetch the value. */ + if (getv == 1) + { + char astring[80]; + sprintf(astring, "%sa", name); + switch (size) + { + case sz_byte: + insn_n_cycles += 2; + break; + case sz_word: + insn_n_cycles += 2; + break; + case sz_long: + insn_n_cycles += 4; + break; + default: + assert(0); + break; + } + start_brace(); + comprintf("\tint %s = scratchie++;\n", name); + switch (size) + { + case sz_byte: + gen_readbyte(astring, name); + break; + case sz_word: + gen_readword(astring, name); + break; + case sz_long: + gen_readlong(astring, name); + break; + default: + assert(0); + break; + } + } + + /* We now might have to fix up the register for pre-dec or post-inc + * addressing modes. */ + if (!movem) + { + switch (mode) + { + case Aipi: + switch (size) + { + case sz_byte: + comprintf("\tlea_l_brr(%s + 8,%s + 8, areg_byteinc[%s]);\n", reg, reg, reg); + break; + case sz_word: + comprintf("\tlea_l_brr(%s + 8, %s + 8, 2);\n", reg, reg); + break; + case sz_long: + comprintf("\tlea_l_brr(%s + 8, %s + 8, 4);\n", reg, reg); + break; + default: + assert(0); + break; + } + break; + case Apdi: + break; + default: + break; + } + } +} + +static void genastore(const char *from, amodes mode, const char *reg, wordsizes size, const char *to) +{ + switch (mode) + { + case Dreg: + switch (size) + { + case sz_byte: + comprintf("\tif(%s != %s)\n", reg, from); + comprintf("\t\tmov_b_rr(%s, %s);\n", reg, from); + break; + case sz_word: + comprintf("\tif(%s != %s)\n", reg, from); + comprintf("\t\tmov_w_rr(%s, %s);\n", reg, from); + break; + case sz_long: + comprintf("\tif(%s != %s)\n", reg, from); + comprintf("\t\tmov_l_rr(%s, %s);\n", reg, from); + break; + default: + assert(0); + break; + } + break; + case Areg: + switch (size) + { + case sz_word: + comprintf("\tif(%s + 8 != %s)\n", reg, from); + comprintf("\t\tmov_w_rr(%s + 8, %s);\n", reg, from); + break; + case sz_long: + comprintf("\tif(%s + 8 != %s)\n", reg, from); + comprintf("\t\tmov_l_rr(%s + 8, %s);\n", reg, from); + break; + default: + assert(0); + break; + } + break; + + case Apdi: + case absw: + case PC16: + case PC8r: + case Ad16: + case Ad8r: + case Aipi: + case Aind: + case absl: + { + char astring[80]; + sprintf(astring, "%sa", to); + + switch (size) + { + case sz_byte: + insn_n_cycles += 2; + gen_writebyte(astring, from); + break; + case sz_word: + insn_n_cycles += 2; + gen_writeword(astring, from); + break; + case sz_long: + insn_n_cycles += 4; + gen_writelong(astring, from); + break; + default: + assert(0); + break; + } + } + break; + case imm: + case imm0: + case imm1: + case imm2: + case immi: + assert(0); + break; + default: + assert(0); + break; + } +} + +static void gen_move16(uae_u32 opcode, struct instr *curi) { +#if defined(USE_JIT2) + comprintf("\tint src=scratchie++;\n"); + comprintf("\tint dst=scratchie++;\n"); + + uae_u32 masked_op = (opcode & 0xfff8); + if (masked_op == 0xf620) { + // POSTINCREMENT SOURCE AND DESTINATION version + comprintf("\t uae_u16 dstreg = ((%s)>>12) & 0x07;\n", gen_nextiword()); + comprintf("\t jnf_MOVE(src, srcreg + 8);"); + comprintf("\t jnf_MOVE(dst, dstreg + 8);"); + comprintf("\t if (srcreg != dstreg)\n"); + comprintf("\t jnf_ADD_imm(srcreg + 8, srcreg + 8, 16);"); + comprintf("\t jnf_ADD_imm(dstreg + 8, dstreg + 8, 16);"); + } else { + /* Other variants */ + genamode(curi->smode, "srcreg", curi->size, "src", 0, 2); + genamode(curi->dmode, "dstreg", curi->size, "dst", 0, 2); + switch (masked_op) { + case 0xf600: + comprintf("\t jnf_ADD_imm(srcreg + 8, srcreg + 8, 16);"); + break; + case 0xf608: + comprintf("\t jnf_ADD_imm(dstreg + 8, dstreg + 8, 16);"); + break; + } + } + comprintf("\t jnf_MOVE16(dst, src);"); +#else + comprintf("\tint src=scratchie++;\n"); + comprintf("\tint dst=scratchie++;\n"); + + if ((opcode & 0xfff8) == 0xf620) { + /* MOVE16 (Ax)+,(Ay)+ */ + comprintf("\tuae_u16 dstreg=((%s)>>12)&0x07;\n", gen_nextiword()); + comprintf("\tmov_l_rr(src,8+srcreg);\n"); + comprintf("\tmov_l_rr(dst,8+dstreg);\n"); + } else { + /* Other variants */ + genamode(curi->smode, "srcreg", curi->size, "src", 0, 2); + genamode(curi->dmode, "dstreg", curi->size, "dst", 0, 2); + comprintf("\tmov_l_rr(src,srca);\n"); + comprintf("\tmov_l_rr(dst,dsta);\n"); + } + + /* Align on 16-byte boundaries */ + comprintf("\tand_l_ri(src,~15);\n"); + comprintf("\tand_l_ri(dst,~15);\n"); + + if ((opcode & 0xfff8) == 0xf620) { + comprintf("\tif (srcreg != dstreg)\n"); + comprintf("\tarm_ADD_l_ri8(srcreg+8,16);\n"); + comprintf("\tarm_ADD_l_ri8(dstreg+8,16);\n"); + } else if ((opcode & 0xfff8) == 0xf600) + comprintf("\tarm_ADD_l_ri8(srcreg+8,16);\n"); + else if ((opcode & 0xfff8) == 0xf608) + comprintf("\tarm_ADD_l_ri8(dstreg+8,16);\n"); + + start_brace(); + comprintf("\tint tmp=scratchie;\n"); + comprintf("\tscratchie+=4;\n"); + + comprintf("\tget_n_addr(src,src,scratchie);\n" + "\tget_n_addr(dst,dst,scratchie);\n" + "\tmov_l_rR(tmp+0,src,0);\n" + "\tmov_l_rR(tmp+1,src,4);\n" + "\tmov_l_rR(tmp+2,src,8);\n" + "\tmov_l_rR(tmp+3,src,12);\n" + "\tmov_l_Rr(dst,tmp+0,0);\n" + "\tforget_about(tmp+0);\n" + "\tmov_l_Rr(dst,tmp+1,4);\n" + "\tforget_about(tmp+1);\n" + "\tmov_l_Rr(dst,tmp+2,8);\n" + "\tforget_about(tmp+2);\n" + "\tmov_l_Rr(dst,tmp+3,12);\n"); + close_brace(); +#endif +} + +static void genmovemel(uae_u16 opcode) { + comprintf("\tuae_u16 mask = %s;\n", gen_nextiword()); + comprintf("\tint native=scratchie++;\n"); + comprintf("\tint i;\n"); + comprintf("\tsigned char offset=0;\n"); + genamode(table68k[opcode].dmode, "dstreg", table68k[opcode].size, "src", 2, + 1); + comprintf("\tget_n_addr(srca,native,scratchie);\n"); + + comprintf("\tfor (i=0;i<16;i++) {\n" + "\t\tif ((mask>>i)&1) {\n"); + switch (table68k[opcode].size) { + case sz_long: + comprintf("\t\t\tmov_l_rR(i,native,offset);\n" + "\t\t\tmid_bswap_32(i);\n" + "\t\t\toffset+=4;\n"); + break; + case sz_word: + comprintf("\t\t\tmov_w_rR(i,native,offset);\n" + "\t\t\tmid_bswap_16(i);\n" + "\t\t\tsign_extend_16_rr(i,i);\n" + "\t\t\toffset+=2;\n"); + break; + default: + assert(0); + break; + } + comprintf("\t\t}\n" + "\t}"); + if (table68k[opcode].dmode == Aipi) { + comprintf("\t\t\tlea_l_brr(8+dstreg,srca,offset);\n"); + } +} + +static void genmovemle(uae_u16 opcode) { + comprintf("\tuae_u16 mask = %s;\n", gen_nextiword()); + comprintf("\tint native=scratchie++;\n"); + comprintf("\tint i;\n"); + comprintf("\tint tmp=scratchie++;\n"); + comprintf("\tsigned char offset=0;\n"); + genamode(table68k[opcode].dmode, "dstreg", table68k[opcode].size, "src", 2, + 1); + + comprintf("\tget_n_addr(srca,native,scratchie);\n"); + + if (table68k[opcode].dmode != Apdi) { + comprintf("\tfor (i=0;i<16;i++) {\n" + "\t\tif ((mask>>i)&1) {\n"); + switch (table68k[opcode].size) { + case sz_long: + comprintf("\t\t\tmov_l_rr(tmp,i);\n" + "\t\t\tmid_bswap_32(tmp);\n" + "\t\t\tmov_l_Rr(native,tmp,offset);\n" + "\t\t\toffset+=4;\n"); + break; + case sz_word: + comprintf("\t\t\tmov_l_rr(tmp,i);\n" + "\t\t\tmid_bswap_16(tmp);\n" + "\t\t\tmov_w_Rr(native,tmp,offset);\n" + "\t\t\toffset+=2;\n"); + break; + default: + assert(0); + break; + } + } else { /* Pre-decrement */ + comprintf("\tfor (i=0;i<16;i++) {\n" + "\t\tif ((mask>>i)&1) {\n"); + switch (table68k[opcode].size) { + case sz_long: + comprintf("\t\t\toffset-=4;\n" + "\t\t\tmov_l_rr(tmp,15-i);\n" + "\t\t\tmid_bswap_32(tmp);\n" + "\t\t\tmov_l_Rr(native,tmp,offset);\n"); + break; + case sz_word: + comprintf("\t\t\toffset-=2;\n" + "\t\t\tmov_l_rr(tmp,15-i);\n" + "\t\t\tmid_bswap_16(tmp);\n" + "\t\t\tmov_w_Rr(native,tmp,offset);\n"); + break; + default: + assert(0); + break; + } + } + + comprintf("\t\t}\n" + "\t}"); + if (table68k[opcode].dmode == Apdi) { + comprintf("\t\t\tlea_l_brr(8+dstreg,srca,(uae_s32)offset);\n"); + } +} + +static void duplicate_carry(void) { + comprintf("\tif (needed_flags&FLAG_X) duplicate_carry();\n"); +} + +typedef enum { + flag_logical_noclobber, + flag_logical, + flag_add, + flag_sub, + flag_cmp, + flag_addx, + flag_subx, + flag_zn, + flag_av, + flag_sv, + flag_and, + flag_or, + flag_eor, + flag_mov +} flagtypes; + +#if !defined(USE_JIT2) +static void genflags(flagtypes type, wordsizes size, const char *value, const char *src, const char *dst) +{ + if (noflags) { + switch (type) { + case flag_cmp: + comprintf("\tdont_care_flags();\n"); + comprintf("/* Weird --- CMP with noflags ;-) */\n"); + return; + case flag_add: + case flag_sub: + comprintf("\tdont_care_flags();\n"); + { + const char* op; + switch (type) { + case flag_add: + op = "add"; + break; // nf + case flag_sub: + op = "sub"; + break; // nf + default: + assert(0); + break; + } + switch (size) { + case sz_byte: + comprintf("\t%s_b(%s,%s);\n", op, dst, src); + break; + case sz_word: + comprintf("\t%s_w(%s,%s);\n", op, dst, src); + break; + case sz_long: + comprintf("\t%s_l(%s,%s);\n", op, dst, src); + break; + } + return; + } + break; + + case flag_and: + comprintf("\tdont_care_flags();\n"); + switch (size) { + case sz_byte: + comprintf("if (kill_rodent(dst)) {\n"); + comprintf("\tzero_extend_8_rr(scratchie,%s);\n", src); + comprintf("\tor_l_ri(scratchie,0xffffff00);\n"); // nf + comprintf("\tarm_AND_l(%s,scratchie);\n", dst); + comprintf("\tforget_about(scratchie);\n"); + comprintf("\t} else \n" + "\tarm_AND_b(%s,%s);\n", dst, src); + break; + case sz_word: + comprintf("if (kill_rodent(dst)) {\n"); + comprintf("\tzero_extend_16_rr(scratchie,%s);\n", src); + comprintf("\tor_l_ri(scratchie,0xffff0000);\n"); // nf + comprintf("\tarm_AND_l(%s,scratchie);\n", dst); + comprintf("\tforget_about(scratchie);\n"); + comprintf("\t} else \n" + "\tarm_AND_w(%s,%s);\n", dst, src); + break; + case sz_long: + comprintf("\tarm_AND_l(%s,%s);\n", dst, src); + break; + } + return; + + case flag_mov: + comprintf("\tdont_care_flags();\n"); + switch (size) { + case sz_byte: + comprintf("if (kill_rodent(dst)) {\n"); + comprintf("\tzero_extend_8_rr(scratchie,%s);\n", src); + comprintf("\tand_l_ri(%s,0xffffff00);\n", dst); // nf + comprintf("\tarm_ORR_l(%s,scratchie);\n", dst); + comprintf("\tforget_about(scratchie);\n"); + comprintf("\t} else \n" + "\tmov_b_rr(%s,%s);\n", dst, src); + break; + case sz_word: + comprintf("if (kill_rodent(dst)) {\n"); + comprintf("\tzero_extend_16_rr(scratchie,%s);\n", src); + comprintf("\tand_l_ri(%s,0xffff0000);\n", dst); // nf + comprintf("\tarm_ORR_l(%s,scratchie);\n", dst); + comprintf("\tforget_about(scratchie);\n"); + comprintf("\t} else \n" + "\tmov_w_rr(%s,%s);\n", dst, src); + break; + case sz_long: + comprintf("\tmov_l_rr(%s,%s);\n", dst, src); + break; + } + return; + + case flag_or: + case flag_eor: + comprintf("\tdont_care_flags();\n"); + start_brace(); + { + const char* op; + switch (type) { + case flag_or: + op = "ORR"; + break; // nf + case flag_eor: + op = "EOR"; + break; // nf + default: + assert(0); + break; + } + switch (size) { + case sz_byte: + comprintf("if (kill_rodent(dst)) {\n"); + comprintf("\tzero_extend_8_rr(scratchie,%s);\n", src); + comprintf("\tarm_%s_l(%s,scratchie);\n", op, dst); + comprintf("\tforget_about(scratchie);\n"); + comprintf("\t} else \n" + "\tarm_%s_b(%s,%s);\n", op, dst, src); + break; + case sz_word: + comprintf("if (kill_rodent(dst)) {\n"); + comprintf("\tzero_extend_16_rr(scratchie,%s);\n", src); + comprintf("\tarm_%s_l(%s,scratchie);\n", op, dst); + comprintf("\tforget_about(scratchie);\n"); + comprintf("\t} else \n" + "\tarm_%s_w(%s,%s);\n", op, dst, src); + break; + case sz_long: + comprintf("\tarm_%s_l(%s,%s);\n", op, dst, src); + break; + } + close_brace(); + return; + } + + case flag_addx: + case flag_subx: + comprintf("\tdont_care_flags();\n"); + { + const char* op; + switch (type) { + case flag_addx: + op = "adc"; + break; + case flag_subx: + op = "sbb"; + break; + default: + assert(0); + break; + } + comprintf("\trestore_carry();\n"); /* Reload the X flag into C */ + switch (size) { + case sz_byte: + comprintf("\t%s_b(%s,%s);\n", op, dst, src); + break; + case sz_word: + comprintf("\t%s_w(%s,%s);\n", op, dst, src); + break; + case sz_long: + comprintf("\t%s_l(%s,%s);\n", op, dst, src); + break; + } + return; + } + break; + default: + return; + } + } + + /* Need the flags, but possibly not all of them */ + switch (type) { + case flag_logical_noclobber: + failure; + /* fall through */ + + case flag_and: + case flag_or: + case flag_eor: + comprintf("\tdont_care_flags();\n"); + start_brace(); + { + const char* op; + switch (type) { + case flag_and: + op = "and"; + break; + case flag_or: + op = "or"; + break; + case flag_eor: + op = "xor"; + break; + default: + assert(0); + break; + } + switch (size) { + case sz_byte: + comprintf("\tstart_needflags();\n" + "\t%s_b(%s,%s);\n", op, dst, src); + break; + case sz_word: + comprintf("\tstart_needflags();\n" + "\t%s_w(%s,%s);\n", op, dst, src); + break; + case sz_long: + comprintf("\tstart_needflags();\n" + "\t%s_l(%s,%s);\n", op, dst, src); + break; + } + comprintf("\tlive_flags();\n"); + comprintf("\tend_needflags();\n"); + close_brace(); + return; + } + + case flag_mov: + comprintf("\tdont_care_flags();\n"); + start_brace(); + { + switch (size) { + case sz_byte: + comprintf("\tif (%s!=%s) {\n", src, dst); + comprintf("\tmov_b_ri(%s,0);\n" + "\tstart_needflags();\n", dst); + comprintf("\tor_b(%s,%s);\n", dst, src); + comprintf("\t} else {\n"); + comprintf("\tmov_b_rr(%s,%s);\n", dst, src); + comprintf("\ttest_b_rr(%s,%s);\n", dst, dst); + comprintf("\t}\n"); + break; + case sz_word: + comprintf("\tif (%s!=%s) {\n", src, dst); + comprintf("\tmov_w_ri(%s,0);\n" + "\tstart_needflags();\n", dst); + comprintf("\tor_w(%s,%s);\n", dst, src); + comprintf("\t} else {\n"); + comprintf("\tmov_w_rr(%s,%s);\n", dst, src); + comprintf("\ttest_w_rr(%s,%s);\n", dst, dst); + comprintf("\t}\n"); + break; + case sz_long: + comprintf("\tif (%s!=%s) {\n", src, dst); + comprintf("\tmov_l_ri(%s,0);\n" + "\tstart_needflags();\n", dst); + comprintf("\tor_l(%s,%s);\n", dst, src); + comprintf("\t} else {\n"); + comprintf("\tmov_l_rr(%s,%s);\n", dst, src); + comprintf("\ttest_l_rr(%s,%s);\n", dst, dst); + comprintf("\t}\n"); + break; + } + comprintf("\tlive_flags();\n"); + comprintf("\tend_needflags();\n"); + close_brace(); + return; + } + + case flag_logical: + comprintf("\tdont_care_flags();\n"); + start_brace(); + switch (size) { + case sz_byte: + comprintf("\tstart_needflags();\n" + "\ttest_b_rr(%s,%s);\n", value, value); + break; + case sz_word: + comprintf("\tstart_needflags();\n" + "\ttest_w_rr(%s,%s);\n", value, value); + break; + case sz_long: + comprintf("\tstart_needflags();\n" + "\ttest_l_rr(%s,%s);\n", value, value); + break; + } + comprintf("\tlive_flags();\n"); + comprintf("\tend_needflags();\n"); + close_brace(); + return; + + case flag_add: + case flag_sub: + case flag_cmp: + comprintf("\tdont_care_flags();\n"); + { + const char* op; + switch (type) { + case flag_add: + op = "add"; + break; + case flag_sub: + op = "sub"; + break; + case flag_cmp: + op = "cmp"; + break; + default: + assert(0); + break; + } + switch (size) { + case sz_byte: + comprintf("\tstart_needflags();\n" + "\t%s_b(%s,%s);\n", op, dst, src); + break; + case sz_word: + comprintf("\tstart_needflags();\n" + "\t%s_w(%s,%s);\n", op, dst, src); + break; + case sz_long: + comprintf("\tstart_needflags();\n" + "\t%s_l(%s,%s);\n", op, dst, src); + break; + } + comprintf("\tlive_flags();\n"); + comprintf("\tend_needflags();\n"); + if (type != flag_cmp) { + duplicate_carry(); + } + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + + return; + } + + case flag_addx: + case flag_subx: + uses_cmov; + comprintf("\tdont_care_flags();\n"); + { + const char* op; + switch (type) { + case flag_addx: + op = "adc"; + break; + case flag_subx: + op = "sbb"; + break; + default: + assert(0); + break; + } + start_brace(); + comprintf("\tint zero=scratchie++;\n" + "\tint one=scratchie++;\n" + "\tif (needed_flags&FLAG_Z) {\n" + "\tmov_l_ri(zero,0);\n" + "\tmov_l_ri(one,-1);\n" + "\tmake_flags_live();\n" + "\tcmov_l_rr(zero,one,%d);\n" + "\t}\n", NATIVE_CC_NE); + comprintf("\trestore_carry();\n"); /* Reload the X flag into C */ + switch (size) { + case sz_byte: + comprintf("\tstart_needflags();\n" + "\t%s_b(%s,%s);\n", op, dst, src); + break; + case sz_word: + comprintf("\tstart_needflags();\n" + "\t%s_w(%s,%s);\n", op, dst, src); + break; + case sz_long: + comprintf("\tstart_needflags();\n" + "\t%s_l(%s,%s);\n", op, dst, src); + break; + } + comprintf("\tlive_flags();\n"); + comprintf("\tif (needed_flags&FLAG_Z) {\n" + "\tcmov_l_rr(zero,one,%d);\n" + "\tset_zero(zero, one);\n" /* No longer need one */ + "\tlive_flags();\n" + "\t}\n", NATIVE_CC_NE); + comprintf("\tend_needflags();\n"); + duplicate_carry(); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + return; + } + default: + failure; + break; + } +} +#endif + +static void gen_abcd(uae_u32 opcode, struct instr *curi, const char* ssize) { +#if 0 +#else + (void) opcode; + (void) curi; + (void) ssize; + failure; + /* No BCD maths for me.... */ +#endif +} + +static void gen_add(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + + comprintf("\t dont_care_flags();\n"); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + // Use tmp register to avoid destroying upper part in .B., .W cases + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ADD_%s(tmp,dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + duplicate_carry(); + comprintf( + "\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\t jnf_ADD(tmp,dst,src);\n"); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "dst"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + genflags(flag_add, curi->size, "", "src", "dst"); + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_adda(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", sz_long, "dst", 1, 0); + start_brace(); + comprintf("\t jnf_ADDA_%s(dst, src);\n", ssize); + genastore("dst", curi->dmode, "dstreg", sz_long, "dst"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", sz_long, "dst", 1, 0); + start_brace(); + comprintf("\tint tmp=scratchie++;\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tsign_extend_8_rr(tmp,src);\n"); + break; + case sz_word: + comprintf("\tsign_extend_16_rr(tmp,src);\n"); + break; + case sz_long: + comprintf("\ttmp=src;\n"); + break; + default: + assert(0); + break; + } + comprintf("\tarm_ADD_l(dst,tmp);\n"); + genastore("dst", curi->dmode, "dstreg", sz_long, "dst"); +#endif +} + +static void gen_addx(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + isaddx; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + + // Use tmp register to avoid destroying upper part in .B., .W cases + comprintf("\t dont_care_flags();\n"); + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t restore_carry();\n"); /* Reload the X flag into C */ + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ADDX_%s(tmp,dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + duplicate_carry(); + comprintf("\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\t restore_carry();\n"); /* Reload the X flag into C */ + comprintf("\t jnf_ADDX(tmp,dst,src);\n"); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "dst"); +#else + (void) ssize; + isaddx; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + genflags(flag_addx, curi->size, "", "src", "dst"); + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_and(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + + comprintf("\t dont_care_flags();\n"); + comprintf("\t int tmp=scratchie++;\n"); + start_brace(); + if (!noflags) { + comprintf("\t jff_AND_%s(tmp,dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_AND(tmp,dst,src);\n"); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "dst"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + genflags(flag_and, curi->size, "", "src", "dst"); + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_andsr(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ANDSR(ARM_CCR_MAP[src & 0xF], (src & 0x10));\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } +#else + (void) curi; + failure; + isjump; +#endif +} + +static void gen_asl(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\t dont_care_flags();\n"); + comprintf("\t int tmp=scratchie++;\n"); + + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + + if (curi->smode != immi) { + if (!noflags) { + start_brace(); + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ASL_%s_reg(tmp,data,cnt);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf( + "\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + start_brace(); + comprintf("\t jnf_LSL_reg(tmp,data,cnt);\n"); + } + } else { + start_brace(); + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ASL_%s_imm(tmp,data,srcreg);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf( + "\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\t jnf_LSL_imm(tmp,data,srcreg);\n"); + } + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "data"); +#else + (void) ssize; + + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\tdont_care_flags();\n"); + /* Except for the handling of the V flag, this is identical to + LSL. The handling of V is, uhm, unpleasant, so if it's needed, + let the normal emulation handle it. Shoulders of giants kinda + thing ;-) */ + comprintf("if (needed_flags & FLAG_V) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + if (curi->smode != immi) { + if (!noflags) { + uses_cmov; + start_brace(); + comprintf("\tint highmask;\n" + "\tint cdata=scratchie++;\n" + "\tint tmpcnt=scratchie++;\n"); + comprintf("\tmov_l_rr(tmpcnt,cnt);\n" + "\tand_l_ri(tmpcnt,63);\n" + "\tmov_l_ri(cdata,0);\n" + "\tcmov_l_rr(cdata,data,%d);\n", NATIVE_CC_NE); + /* cdata is now either data (for shift count!=0) or + 0 (for shift count==0) */ + switch (curi->size) { + case sz_byte: + comprintf("\tshll_b_rr(data,cnt);\n" + "\thighmask=0x38;\n"); + break; + case sz_word: + comprintf("\tshll_w_rr(data,cnt);\n" + "\thighmask=0x30;\n"); + break; + case sz_long: + comprintf("\tshll_l_rr(data,cnt);\n" + "\thighmask=0x20;\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(cnt,highmask);\n" + "mov_l_ri(scratchie,0);\n" + "cmov_l_rr(scratchie,data,%d);\n", NATIVE_CC_EQ); + switch (curi->size) { + case sz_byte: + comprintf("\tmov_b_rr(data,scratchie);\n"); + break; + case sz_word: + comprintf("\tmov_w_rr(data,scratchie);\n"); + break; + case sz_long: + comprintf("\tmov_l_rr(data,scratchie);\n"); + break; + default: + assert(0); + break; + } + /* Result of shift is now in data. Now we need to determine + the carry by shifting cdata one less */ + comprintf("\tsub_l_ri(tmpcnt,1);\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshll_b_rr(cdata,tmpcnt);\n"); + break; + case sz_word: + comprintf("\tshll_w_rr(cdata,tmpcnt);\n"); + break; + case sz_long: + comprintf("\tshll_l_rr(cdata,tmpcnt);\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(tmpcnt,highmask);\n" + "mov_l_ri(scratchie,0);\n" + "cmov_l_rr(cdata,scratchie,%d);\n", NATIVE_CC_NE); + /* And create the flags */ + comprintf("\tstart_needflags();\n"); + + comprintf("\tif (needed_flags & FLAG_ZNV)\n"); + switch (curi->size) { + case sz_byte: + comprintf("\t test_b_rr(data,data);\n"); + comprintf("\t bt_l_ri(cdata,7);\n"); + break; + case sz_word: + comprintf("\t test_w_rr(data,data);\n"); + comprintf("\t bt_l_ri(cdata,15);\n"); + break; + case sz_long: + comprintf("\t test_l_rr(data,data);\n"); + comprintf("\t bt_l_ri(cdata,31);\n"); + break; + } + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } else { + uses_cmov; + start_brace(); + comprintf("\tint highmask;\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshll_b_rr(data,cnt);\n" + "\thighmask=0x38;\n"); + break; + case sz_word: + comprintf("\tshll_w_rr(data,cnt);\n" + "\thighmask=0x30;\n"); + break; + case sz_long: + comprintf("\tshll_l_rr(data,cnt);\n" + "\thighmask=0x20;\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(cnt,highmask);\n" + "mov_l_ri(scratchie,0);\n" + "cmov_l_rr(scratchie,data,%d);\n", NATIVE_CC_EQ); + switch (curi->size) { + case sz_byte: + comprintf("\tmov_b_rr(data,scratchie);\n"); + break; + case sz_word: + comprintf("\tmov_w_rr(data,scratchie);\n"); + break; + case sz_long: + comprintf("\tmov_l_rr(data,scratchie);\n"); + break; + default: + assert(0); + break; + } + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } + } else { + start_brace(); + comprintf("\tint tmp=scratchie++;\n" + "\tint bp;\n" + "\tmov_l_rr(tmp,data);\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshll_b_ri(data,srcreg);\n" + "\tbp=8-srcreg;\n"); + break; + case sz_word: + comprintf("\tshll_w_ri(data,srcreg);\n" + "\tbp=16-srcreg;\n"); + break; + case sz_long: + comprintf("\tshll_l_ri(data,srcreg);\n" + "\tbp=32-srcreg;\n"); + break; + default: + assert(0); + break; + } + + if (!noflags) { + comprintf("\tstart_needflags();\n"); + comprintf("\tif (needed_flags & FLAG_ZNV)\n"); + switch (curi->size) { + case sz_byte: + comprintf("\t test_b_rr(data,data);\n"); + break; + case sz_word: + comprintf("\t test_w_rr(data,data);\n"); + break; + case sz_long: + comprintf("\t test_l_rr(data,data);\n"); + break; + } + comprintf("\t bt_l_ri(tmp,bp);\n"); /* Set C */ + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } +#endif +} + +static void gen_aslw(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ASLW(tmp,src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_ASLW(tmp,src);\n"); + } + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + (void) curi; + failure; +#endif +} + +static void gen_asr(uae_u32 opcode, struct instr *curi, const char* ssize) { +#if defined(USE_JIT2) + (void)opcode; + + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\t dont_care_flags();\n"); + + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + if (curi->smode != immi) { + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ASR_%s_reg(tmp,data,cnt);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf( + "if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\t jnf_ASR_%s_reg(tmp,data,cnt);\n", ssize); + } + } else { + char *op; + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + op = "ff"; + } else + op = "nf"; + + comprintf("\t j%s_ASR_%s_imm(tmp,data,srcreg);\n", op, ssize); + if (!noflags) { + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf( + "\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "data"); +#else + (void) opcode; + (void) ssize; + + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\tdont_care_flags();\n"); + + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + if (curi->smode != immi) { + if (!noflags) { + uses_cmov; + start_brace(); + comprintf("\tint highmask;\n" + "\tint width;\n" + "\tint cdata=scratchie++;\n" + "\tint tmpcnt=scratchie++;\n" + "\tint highshift=scratchie++;\n"); + comprintf("\tmov_l_rr(tmpcnt,cnt);\n" + "\tand_l_ri(tmpcnt,63);\n" + "\tmov_l_ri(cdata,0);\n" + "\tcmov_l_rr(cdata,data,%d);\n", NATIVE_CC_NE); + /* cdata is now either data (for shift count!=0) or + 0 (for shift count==0) */ + switch (curi->size) { + case sz_byte: + comprintf("\tshra_b_rr(data,cnt);\n" + "\thighmask=0x38;\n" + "\twidth=8;\n"); + break; + case sz_word: + comprintf("\tshra_w_rr(data,cnt);\n" + "\thighmask=0x30;\n" + "\twidth=16;\n"); + break; + case sz_long: + comprintf("\tshra_l_rr(data,cnt);\n" + "\thighmask=0x20;\n" + "\twidth=32;\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(cnt,highmask);\n" + "mov_l_ri(highshift,0);\n" + "mov_l_ri(scratchie,width/2);\n" + "cmov_l_rr(highshift,scratchie,%d);\n", NATIVE_CC_NE); + /* The x86 masks out bits, so we now make sure that things + really get shifted as much as planned */ + switch (curi->size) { + case sz_byte: + comprintf("\tshra_b_rr(data,highshift);\n"); + break; + case sz_word: + comprintf("\tshra_w_rr(data,highshift);\n"); + break; + case sz_long: + comprintf("\tshra_l_rr(data,highshift);\n"); + break; + default: + assert(0); + break; + } + /* And again */ + switch (curi->size) { + case sz_byte: + comprintf("\tshra_b_rr(data,highshift);\n"); + break; + case sz_word: + comprintf("\tshra_w_rr(data,highshift);\n"); + break; + case sz_long: + comprintf("\tshra_l_rr(data,highshift);\n"); + break; + default: + assert(0); + break; + } + + /* Result of shift is now in data. Now we need to determine + the carry by shifting cdata one less */ + comprintf("\tsub_l_ri(tmpcnt,1);\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshra_b_rr(cdata,tmpcnt);\n"); + break; + case sz_word: + comprintf("\tshra_w_rr(cdata,tmpcnt);\n"); + break; + case sz_long: + comprintf("\tshra_l_rr(cdata,tmpcnt);\n"); + break; + default: + assert(0); + break; + } + /* If the shift count was higher than the width, we need + to pick up the sign from data */ + comprintf("test_l_ri(tmpcnt,highmask);\n" + "cmov_l_rr(cdata,data,%d);\n", NATIVE_CC_NE); + /* And create the flags */ + comprintf("\tstart_needflags();\n"); + comprintf("\tif (needed_flags & FLAG_ZNV)\n"); + switch (curi->size) { + case sz_byte: + comprintf("\t test_b_rr(data,data);\n"); + break; + case sz_word: + comprintf("\t test_w_rr(data,data);\n"); + break; + case sz_long: + comprintf("\t test_l_rr(data,data);\n"); + break; + } + comprintf("\t bt_l_ri(cdata,0);\n"); /* Set C */ + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } else { + uses_cmov; + start_brace(); + comprintf("\tint highmask;\n" + "\tint width;\n" + "\tint highshift=scratchie++;\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshra_b_rr(data,cnt);\n" + "\thighmask=0x38;\n" + "\twidth=8;\n"); + break; + case sz_word: + comprintf("\tshra_w_rr(data,cnt);\n" + "\thighmask=0x30;\n" + "\twidth=16;\n"); + break; + case sz_long: + comprintf("\tshra_l_rr(data,cnt);\n" + "\thighmask=0x20;\n" + "\twidth=32;\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(cnt,highmask);\n" + "mov_l_ri(highshift,0);\n" + "mov_l_ri(scratchie,width/2);\n" + "cmov_l_rr(highshift,scratchie,%d);\n", NATIVE_CC_NE); + /* The x86 masks out bits, so we now make sure that things + really get shifted as much as planned */ + switch (curi->size) { + case sz_byte: + comprintf("\tshra_b_rr(data,highshift);\n"); + break; + case sz_word: + comprintf("\tshra_w_rr(data,highshift);\n"); + break; + case sz_long: + comprintf("\tshra_l_rr(data,highshift);\n"); + break; + default: + assert(0); + break; + } + /* And again */ + switch (curi->size) { + case sz_byte: + comprintf("\tshra_b_rr(data,highshift);\n"); + break; + case sz_word: + comprintf("\tshra_w_rr(data,highshift);\n"); + break; + case sz_long: + comprintf("\tshra_l_rr(data,highshift);\n"); + break; + default: + assert(0); + break; + } + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } + } else { + start_brace(); + comprintf("\tint tmp=scratchie++;\n" + "\tint bp;\n" + "\tmov_l_rr(tmp,data);\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshra_b_ri(data,srcreg);\n" + "\tbp=srcreg-1;\n"); + break; + case sz_word: + comprintf("\tshra_w_ri(data,srcreg);\n" + "\tbp=srcreg-1;\n"); + break; + case sz_long: + comprintf("\tshra_l_ri(data,srcreg);\n" + "\tbp=srcreg-1;\n"); + break; + default: + assert(0); + break; + } + + if (!noflags) { + comprintf("\tstart_needflags();\n"); + comprintf("\tif (needed_flags & FLAG_ZNV)\n"); + switch (curi->size) { + case sz_byte: + comprintf("\t test_b_rr(data,data);\n"); + break; + case sz_word: + comprintf("\t test_w_rr(data,data);\n"); + break; + case sz_long: + comprintf("\t test_l_rr(data,data);\n"); + break; + } + comprintf("\t bt_l_ri(tmp,bp);\n"); /* Set C */ + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } +#endif +} + +static void gen_asrw(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\t int tmp = scratchie++;\n"); + + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ASRW(tmp,src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_ASRW(tmp,src);\n"); + } + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + (void) curi; + failure; +#endif +} + +static void gen_bchg(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_BCHG_%s(dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_BCHG_%s(dst,src);\n", ssize); + comprintf("\t dont_care_flags();\n"); + } + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + comprintf("\tint s=scratchie++;\n" + "\tint tmp=scratchie++;\n" + "\tmov_l_rr(s,src);\n"); + if (curi->size == sz_byte) + comprintf("\tand_l_ri(s,7);\n"); + else + comprintf("\tand_l_ri(s,31);\n"); + + comprintf("\tbtc_l_rr(dst,s);\n" /* Answer now in C */ + "\tsbb_l(s,s);\n" /* s is 0 if bit was 0, -1 otherwise */ + "\tmake_flags_live();\n" /* Get the flags back */ + "\tdont_care_flags();\n"); + if (!noflags) { + comprintf("\tstart_needflags();\n" + "\tset_zero(s,tmp);\n" + "\tlive_flags();\n" + "\tend_needflags();\n"); + } + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_bclr(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_BCLR_%s(dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_BCLR_%s(dst,src);\n", ssize); + comprintf("\t dont_care_flags();\n"); + } + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + comprintf("\tint s=scratchie++;\n" + "\tint tmp=scratchie++;\n" + "\tmov_l_rr(s,src);\n"); + if (curi->size == sz_byte) + comprintf("\tand_l_ri(s,7);\n"); + else + comprintf("\tand_l_ri(s,31);\n"); + + comprintf("\tbtr_l_rr(dst,s);\n" /* Answer now in C */ + "\tsbb_l(s,s);\n" /* s is 0 if bit was 0, -1 otherwise */ + "\tmake_flags_live();\n" /* Get the flags back */ + "\tdont_care_flags();\n"); + if (!noflags) { + comprintf("\tstart_needflags();\n" + "\tset_zero(s,tmp);\n" + "\tlive_flags();\n" + "\tend_needflags();\n"); + } + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_bset(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_BSET_%s(dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_BSET_%s(dst,src);\n", ssize); + comprintf("\t dont_care_flags();\n"); + } + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + comprintf("\tint s=scratchie++;\n" + "\tint tmp=scratchie++;\n" + "\tmov_l_rr(s,src);\n"); + if (curi->size == sz_byte) + comprintf("\tand_l_ri(s,7);\n"); + else + comprintf("\tand_l_ri(s,31);\n"); + + comprintf("\tbts_l_rr(dst,s);\n" /* Answer now in C */ + "\tsbb_l(s,s);\n" /* s is 0 if bit was 0, -1 otherwise */ + "\tmake_flags_live();\n" /* Get the flags back */ + "\tdont_care_flags();\n"); + if (!noflags) { + comprintf("\tstart_needflags();\n" + "\tset_zero(s,tmp);\n" + "\tlive_flags();\n" + "\tend_needflags();\n"); + } + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_btst(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + + // If we are not interested in flags it is not necessary to do + // anything with the data + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_BTST_%s(dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t dont_care_flags();\n"); + } +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + comprintf("\tint s=scratchie++;\n" + "\tint tmp=scratchie++;\n" + "\tmov_l_rr(s,src);\n"); + if (curi->size == sz_byte) + comprintf("\tand_l_ri(s,7);\n"); + else + comprintf("\tand_l_ri(s,31);\n"); + + comprintf("\tbt_l_rr(dst,s);\n" /* Answer now in C */ + "\tsbb_l(s,s);\n" /* s is 0 if bit was 0, -1 otherwise */ + "\tmake_flags_live();\n" /* Get the flags back */ + "\tdont_care_flags();\n"); + if (!noflags) { + comprintf("\tstart_needflags();\n" + "\tset_zero(s,tmp);\n" + "\tlive_flags();\n" + "\tend_needflags();\n"); + } +#endif +} + +static void gen_clr(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 2, 0); + comprintf("\t dont_care_flags();\n"); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_CLR(tmp);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_CLR(tmp);\n"); + } + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + genamode(curi->smode, "srcreg", curi->size, "src", 2, 0); + start_brace(); + comprintf("\tint dst=scratchie++;\n"); + comprintf("\tmov_l_ri(dst,0);\n"); + genflags(flag_logical, curi->size, "dst", "", ""); + genastore("dst", curi->smode, "srcreg", curi->size, "src"); +#endif +} + +static void gen_cmp(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + comprintf("\t dont_care_flags();\n"); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_CMP_%s(dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("/* Weird --- CMP with noflags ;-) */\n"); + } +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + genflags(flag_cmp, curi->size, "", "src", "dst"); +#endif +} + +static void gen_cmpa(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", sz_long, "dst", 1, 0); + start_brace(); + if (!noflags) { + comprintf("\t dont_care_flags();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_CMPA_%s(dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\tdont_care_flags();\n"); + comprintf("/* Weird --- CMP with noflags ;-) */\n"); + } +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", sz_long, "dst", 1, 0); + start_brace(); + comprintf("\tint tmps=scratchie++;\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tsign_extend_8_rr(tmps,src);\n"); + break; + case sz_word: + comprintf("\tsign_extend_16_rr(tmps,src);\n"); + break; + case sz_long: + comprintf("tmps=src;\n"); + break; + default: + assert(0); + break; + } + genflags(flag_cmp, sz_long, "", "tmps", "dst"); +#endif +} + +static void gen_dbcc(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if 0 + isjump; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "offs", 1, 0); + + comprintf("uae_u32 voffs;\n"); + comprintf("voffs = get_const(offs);\n"); + /* That offs is an immediate, so we can clobber it with abandon */ + switch (curi->size) { + case sz_word: + comprintf("\t voffs = (uae_s32)((uae_s16)voffs);\n"); + break; + default: + assert(0); /* Seems this only comes in word flavour */ + break; + } + comprintf("\t voffs -= m68k_pc_offset - m68k_pc_offset_thisinst - 2;\n"); + comprintf("\t voffs += (uintptr)comp_pc_p + m68k_pc_offset;\n"); + + comprintf("\t add_const_v(PC_P, m68k_pc_offset);\n"); + comprintf("\t m68k_pc_offset = 0;\n"); + + start_brace(); + + if (curi->cc >= 2) { + comprintf("\t make_flags_live();\n"); /* Load the flags */ + } + + assert(curi->size == sz_word); + + switch (curi->cc) { + case 0: /* This is an elaborate nop? */ + break; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + comprintf("\t start_needflags();\n"); + comprintf("\t jnf_DBcc(src,voffs,%d);\n", curi->cc); + comprintf("\t end_needflags();\n"); + break; + default: + assert(0); + break; + } + genastore("src", curi->smode, "srcreg", curi->size, "src"); + gen_update_next_handler(); +#else + isjump; + uses_cmov; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "offs", 1, 0); + + /* That offs is an immediate, so we can clobber it with abandon */ + switch (curi->size) { + case sz_word: + comprintf("\tsign_extend_16_rr(offs,offs);\n"); + break; + default: + assert(0); /* Seems this only comes in word flavour */ + break; + } + comprintf("\tsub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2);\n"); + comprintf("\tarm_ADD_l_ri(offs,(uintptr)comp_pc_p);\n"); + /* New PC, + once the + offset_68k is + * also added */ + /* Let's fold in the m68k_pc_offset at this point */ + comprintf("\tarm_ADD_l_ri(offs,m68k_pc_offset);\n"); + comprintf("\tarm_ADD_l_ri(PC_P,m68k_pc_offset);\n"); + comprintf("\tm68k_pc_offset=0;\n"); + + start_brace(); + comprintf("\tint nsrc=scratchie++;\n"); + + if (curi->cc >= 2) { + comprintf("\tmake_flags_live();\n"); /* Load the flags */ + } + + assert (curi->size == sz_word); + + switch (curi->cc) { + case 0: /* This is an elaborate nop? */ + break; + case 1: + comprintf("\tstart_needflags();\n"); + comprintf("\tsub_w_ri(src,1);\n"); + comprintf("\t end_needflags();\n"); + start_brace(); + comprintf("\tuae_u32 v2,v;\n" + "\tuae_u32 v1=get_const(PC_P);\n"); + comprintf("\tv2=get_const(offs);\n" + "\tregister_branch(v1,v2,%d);\n", NATIVE_CC_CC); + break; + + case 8: + failure; + break; /* Work out details! FIXME */ + case 9: + failure; + break; /* Not critical, though! */ + + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + comprintf("\tmov_l_rr(nsrc,src);\n"); + comprintf("\tlea_l_brr(scratchie,src,(uae_s32)-1);\n" + "\tmov_w_rr(src,scratchie);\n"); + comprintf("\tcmov_l_rr(offs,PC_P,%d);\n", cond_codes[curi->cc]); + comprintf("\tcmov_l_rr(src,nsrc,%d);\n", cond_codes[curi->cc]); + /* OK, now for cc=true, we have src==nsrc and offs==PC_P, + so whether we move them around doesn't matter. However, + if cc=false, we have offs==jump_pc, and src==nsrc-1 */ + + comprintf("\t start_needflags();\n"); + comprintf("\ttest_w_rr(nsrc,nsrc);\n"); + comprintf("\t end_needflags();\n"); + comprintf("\tcmov_l_rr(PC_P,offs,%d);\n", NATIVE_CC_NE); + break; + default: + assert(0); + break; + } + genastore("src", curi->smode, "srcreg", curi->size, "src"); + gen_update_next_handler(); +#endif +} + +static void gen_eor(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + + comprintf("\t dont_care_flags();\n"); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags) { + comprintf("\t jff_EOR_%s(tmp,dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_EOR(tmp,dst,src);\n"); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "dst"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + genflags(flag_eor, curi->size, "", "src", "dst"); + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_eorsr(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_EORSR(ARM_CCR_MAP[src & 0xF], ((src & 0x10) >> 4));\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } +#else + (void) curi; + failure; + isjump; +#endif +} + +static void gen_exg(uae_u32 opcode, struct instr *curi, const char* ssize) { +#if 0 +#else + (void) opcode; + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + comprintf("\tint tmp=scratchie++;\n" + "\tmov_l_rr(tmp,src);\n"); + genastore("dst", curi->smode, "srcreg", curi->size, "src"); + genastore("tmp", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_ext(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", sz_long, "src", 1, 0); + comprintf("\t dont_care_flags();\n"); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_EXT_%s(tmp,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_EXT_%s(tmp,src);\n", ssize); + } + genastore("tmp", curi->smode, "srcreg", + curi->size == sz_word ? sz_word : sz_long, "src"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", sz_long, "src", 1, 0); + comprintf("\tdont_care_flags();\n"); + start_brace(); + switch (curi->size) { + case sz_byte: + comprintf("\tint dst = src;\n" + "\tsign_extend_8_rr(src,src);\n"); + break; + case sz_word: + comprintf("\tint dst = scratchie++;\n" + "\tsign_extend_8_rr(dst,src);\n"); + break; + case sz_long: + comprintf("\tint dst = src;\n" + "\tsign_extend_16_rr(src,src);\n"); + break; + default: + assert(0); + break; + } + genflags(flag_logical, curi->size == sz_word ? sz_word : sz_long, "dst", "", + ""); + genastore("dst", curi->smode, "srcreg", + curi->size == sz_word ? sz_word : sz_long, "src"); +#endif +} + +static void gen_lsl(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\tdont_care_flags();\n"); + + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + comprintf("\t int tmp=scratchie++;\n"); + if (curi->smode != immi) { + if (!noflags) { + start_brace(); + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_LSL_%s_reg(tmp,data,cnt);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf( + "\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + start_brace(); + comprintf("\t jnf_LSL_reg(tmp,data,cnt);\n"); + } + } else { + start_brace(); + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_LSL_%s_imm(tmp,data,srcreg);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf( + "\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\t jnf_LSL_imm(tmp,data,srcreg);\n"); + } + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "data"); +#else + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\tdont_care_flags();\n"); + + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + if (curi->smode != immi) { + if (!noflags) { + uses_cmov; + start_brace(); + comprintf("\tint highmask;\n" + "\tint cdata=scratchie++;\n" + "\tint tmpcnt=scratchie++;\n"); + comprintf("\tmov_l_rr(tmpcnt,cnt);\n" + "\tand_l_ri(tmpcnt,63);\n" + "\tmov_l_ri(cdata,0);\n" + "\tcmov_l_rr(cdata,data,%d);\n", NATIVE_CC_NE); + /* cdata is now either data (for shift count!=0) or + 0 (for shift count==0) */ + switch (curi->size) { + case sz_byte: + comprintf("\tshll_b_rr(data,cnt);\n" + "\thighmask=0x38;\n"); + break; + case sz_word: + comprintf("\tshll_w_rr(data,cnt);\n" + "\thighmask=0x30;\n"); + break; + case sz_long: + comprintf("\tshll_l_rr(data,cnt);\n" + "\thighmask=0x20;\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(cnt,highmask);\n" + "mov_l_ri(scratchie,0);\n" + "cmov_l_rr(scratchie,data,%d);\n", NATIVE_CC_EQ); + switch (curi->size) { + case sz_byte: + comprintf("\tmov_b_rr(data,scratchie);\n"); + break; + case sz_word: + comprintf("\tmov_w_rr(data,scratchie);\n"); + break; + case sz_long: + comprintf("\tmov_l_rr(data,scratchie);\n"); + break; + default: + assert(0); + break; + } + /* Result of shift is now in data. Now we need to determine + the carry by shifting cdata one less */ + comprintf("\tsub_l_ri(tmpcnt,1);\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshll_b_rr(cdata,tmpcnt);\n"); + break; + case sz_word: + comprintf("\tshll_w_rr(cdata,tmpcnt);\n"); + break; + case sz_long: + comprintf("\tshll_l_rr(cdata,tmpcnt);\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(tmpcnt,highmask);\n" + "mov_l_ri(scratchie,0);\n" + "cmov_l_rr(cdata,scratchie,%d);\n", NATIVE_CC_NE); + /* And create the flags */ + comprintf("\tstart_needflags();\n"); + comprintf("\tif (needed_flags & FLAG_ZNV)\n"); + switch (curi->size) { + case sz_byte: + comprintf("\t test_b_rr(data,data);\n"); + comprintf("\t bt_l_ri(cdata,7);\n"); + break; + case sz_word: + comprintf("\t test_w_rr(data,data);\n"); + comprintf("\t bt_l_ri(cdata,15);\n"); + break; + case sz_long: + comprintf("\t test_l_rr(data,data);\n"); + comprintf("\t bt_l_ri(cdata,31);\n"); + break; + } + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } else { + uses_cmov; + start_brace(); + comprintf("\tint highmask;\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshll_b_rr(data,cnt);\n" + "\thighmask=0x38;\n"); + break; + case sz_word: + comprintf("\tshll_w_rr(data,cnt);\n" + "\thighmask=0x30;\n"); + break; + case sz_long: + comprintf("\tshll_l_rr(data,cnt);\n" + "\thighmask=0x20;\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(cnt,highmask);\n" + "mov_l_ri(scratchie,0);\n" + "cmov_l_rr(scratchie,data,%d);\n", NATIVE_CC_EQ); + switch (curi->size) { + case sz_byte: + comprintf("\tmov_b_rr(data,scratchie);\n"); + break; + case sz_word: + comprintf("\tmov_w_rr(data,scratchie);\n"); + break; + case sz_long: + comprintf("\tmov_l_rr(data,scratchie);\n"); + break; + default: + assert(0); + break; + } + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } + } else { + start_brace(); + comprintf("\tint tmp=scratchie++;\n" + "\tint bp;\n" + "\tmov_l_rr(tmp,data);\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshll_b_ri(data,srcreg);\n" + "\tbp=8-srcreg;\n"); + break; + case sz_word: + comprintf("\tshll_w_ri(data,srcreg);\n" + "\tbp=16-srcreg;\n"); + break; + case sz_long: + comprintf("\tshll_l_ri(data,srcreg);\n" + "\tbp=32-srcreg;\n"); + break; + default: + assert(0); + break; + } + + if (!noflags) { + comprintf("\tstart_needflags();\n"); + comprintf("\tif (needed_flags & FLAG_ZNV)\n"); + switch (curi->size) { + case sz_byte: + comprintf("\t test_b_rr(data,data);\n"); + break; + case sz_word: + comprintf("\t test_w_rr(data,data);\n"); + break; + case sz_long: + comprintf("\t test_l_rr(data,data);\n"); + break; + } + comprintf("\t bt_l_ri(tmp,bp);\n"); /* Set C */ + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } +#endif +} + +static void gen_lslw(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_LSLW(tmp,src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_LSLW(tmp,src);\n"); + } + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + (void) curi; + failure; +#endif +} + +static void gen_lsr(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\t dont_care_flags();\n"); + + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + comprintf("\t int tmp=scratchie++;\n"); + if (curi->smode != immi) { + if (!noflags) { + start_brace(); + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_LSR_%s_reg(tmp,data,cnt);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + start_brace(); + comprintf("\t jnf_LSR_%s_reg(tmp,data,cnt);\n", ssize); + } + } else { + start_brace(); + char *op; + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + op = "ff"; + } else + op = "nf"; + + comprintf("\t j%s_LSR_%s_imm(tmp,data,srcreg);\n", op, ssize); + + if (!noflags) { + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf( + "\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "data"); +#else + (void) ssize; + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\tdont_care_flags();\n"); + + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + if (curi->smode != immi) { + if (!noflags) { + uses_cmov; + start_brace(); + comprintf("\tint highmask;\n" + "\tint cdata=scratchie++;\n" + "\tint tmpcnt=scratchie++;\n"); + comprintf("\tmov_l_rr(tmpcnt,cnt);\n" + "\tand_l_ri(tmpcnt,63);\n" + "\tmov_l_ri(cdata,0);\n" + "\tcmov_l_rr(cdata,data,%d);\n", NATIVE_CC_NE); + /* cdata is now either data (for shift count!=0) or + 0 (for shift count==0) */ + switch (curi->size) { + case sz_byte: + comprintf("\tshrl_b_rr(data,cnt);\n" + "\thighmask=0x38;\n"); + break; + case sz_word: + comprintf("\tshrl_w_rr(data,cnt);\n" + "\thighmask=0x30;\n"); + break; + case sz_long: + comprintf("\tshrl_l_rr(data,cnt);\n" + "\thighmask=0x20;\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(cnt,highmask);\n" + "mov_l_ri(scratchie,0);\n" + "cmov_l_rr(scratchie,data,%d);\n", NATIVE_CC_EQ); + switch (curi->size) { + case sz_byte: + comprintf("\tmov_b_rr(data,scratchie);\n"); + break; + case sz_word: + comprintf("\tmov_w_rr(data,scratchie);\n"); + break; + case sz_long: + comprintf("\tmov_l_rr(data,scratchie);\n"); + break; + default: + assert(0); + break; + } + /* Result of shift is now in data. Now we need to determine + the carry by shifting cdata one less */ + comprintf("\tsub_l_ri(tmpcnt,1);\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshrl_b_rr(cdata,tmpcnt);\n"); + break; + case sz_word: + comprintf("\tshrl_w_rr(cdata,tmpcnt);\n"); + break; + case sz_long: + comprintf("\tshrl_l_rr(cdata,tmpcnt);\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(tmpcnt,highmask);\n" + "mov_l_ri(scratchie,0);\n" + "cmov_l_rr(cdata,scratchie,%d);\n", NATIVE_CC_NE); + /* And create the flags */ + comprintf("\tstart_needflags();\n"); + comprintf("\tif (needed_flags & FLAG_ZNV)\n"); + switch (curi->size) { + case sz_byte: + comprintf("\t test_b_rr(data,data);\n"); + break; + case sz_word: + comprintf("\t test_w_rr(data,data);\n"); + break; + case sz_long: + comprintf("\t test_l_rr(data,data);\n"); + break; + } + comprintf("\t bt_l_ri(cdata,0);\n"); /* Set C */ + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } else { + uses_cmov; + start_brace(); + comprintf("\tint highmask;\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshrl_b_rr(data,cnt);\n" + "\thighmask=0x38;\n"); + break; + case sz_word: + comprintf("\tshrl_w_rr(data,cnt);\n" + "\thighmask=0x30;\n"); + break; + case sz_long: + comprintf("\tshrl_l_rr(data,cnt);\n" + "\thighmask=0x20;\n"); + break; + default: + assert(0); + break; + } + comprintf("test_l_ri(cnt,highmask);\n" + "mov_l_ri(scratchie,0);\n" + "cmov_l_rr(scratchie,data,%d);\n", NATIVE_CC_EQ); + switch (curi->size) { + case sz_byte: + comprintf("\tmov_b_rr(data,scratchie);\n"); + break; + case sz_word: + comprintf("\tmov_w_rr(data,scratchie);\n"); + break; + case sz_long: + comprintf("\tmov_l_rr(data,scratchie);\n"); + break; + default: + assert(0); + break; + } + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } + } else { + start_brace(); + comprintf("\tint tmp=scratchie++;\n" + "\tint bp;\n" + "\tmov_l_rr(tmp,data);\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tshrl_b_ri(data,srcreg);\n" + "\tbp=srcreg-1;\n"); + break; + case sz_word: + comprintf("\tshrl_w_ri(data,srcreg);\n" + "\tbp=srcreg-1;\n"); + break; + case sz_long: + comprintf("\tshrl_l_ri(data,srcreg);\n" + "\tbp=srcreg-1;\n"); + break; + default: + assert(0); + break; + } + + if (!noflags) { + comprintf("\tstart_needflags();\n"); + comprintf("\tif (needed_flags & FLAG_ZNV)\n"); + switch (curi->size) { + case sz_byte: + comprintf("\t test_b_rr(data,data);\n"); + break; + case sz_word: + comprintf("\t test_w_rr(data,data);\n"); + break; + case sz_long: + comprintf("\t test_l_rr(data,data);\n"); + break; + } + comprintf("\t bt_l_ri(tmp,bp);\n"); /* Set C */ + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("\t duplicate_carry();\n"); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } + genastore("data", curi->dmode, "dstreg", curi->size, "data"); + } +#endif +} + +static void gen_lsrw(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\t int tmp = scratchie++;\n"); + + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_LSRW(tmp,src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_LSRW(tmp,src);\n"); + } + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + (void) curi; + failure; +#endif +} + +static void gen_move(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + switch (curi->dmode) { + case Dreg: + case Areg: + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 2, 0); + comprintf("\t dont_care_flags();\n"); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags && curi->dmode == Dreg) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_MOVE_%s(tmp, src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t tmp = src;\n"); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "dst"); + break; + + default: /* It goes to memory, not a register */ + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 2, 0); + comprintf("\t dont_care_flags();\n"); + start_brace(); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_TST_%s(src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } + genastore("src", curi->dmode, "dstreg", curi->size, "dst"); + break; + } +#else + (void) ssize; + + switch (curi->dmode) { + case Dreg: + case Areg: + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 2, 0); + genflags(flag_mov, curi->size, "", "src", "dst"); + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); + break; + default: /* It goes to memory, not a register */ + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 2, 0); + genflags(flag_logical, curi->size, "src", "", ""); + genastore("src", curi->dmode, "dstreg", curi->size, "dst"); + break; + } +#endif +} + +static void gen_movea(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 2, 0); + + start_brace(); + comprintf("\t jnf_MOVEA_%s(dst, src);\n", ssize); + genastore("dst", curi->dmode, "dstreg", sz_long, "dst"); +#else + (void) ssize; + + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 2, 0); + + start_brace(); + comprintf("\tint tmps=scratchie++;\n"); + switch (curi->size) { + case sz_word: + comprintf("\tsign_extend_16_rr(dst,src);\n"); + break; + case sz_long: + comprintf("\tmov_l_rr(dst,src);\n"); + break; + default: + assert(0); + break; + } + genastore("dst", curi->dmode, "dstreg", sz_long, "dst"); +#endif +} + +static void gen_mull(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + comprintf("\t uae_u16 extra=%s;\n", gen_nextiword()); + comprintf("\t int r2=(extra>>12)&7;\n" + "\t int tmp=scratchie++;\n"); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + /* The two operands are in dst and r2 */ + if (!noflags) { + comprintf("\t if (extra & 0x0400) {\n"); /* Need full 64 bit result */ + comprintf("\t int r3=(extra & 7);\n"); + comprintf("\t mov_l_rr(r3,dst);\n"); /* operands now in r3 and r2 */ + comprintf("\t if (extra & 0x0800) { \n"); /* signed */ + comprintf("\t\t jff_MULS64(r2,r3);\n"); + comprintf("\t } else { \n"); + comprintf("\t\t jff_MULU64(r2,r3);\n"); + comprintf("\t } \n"); /* The result is in r2/r3, with r2 holding the lower 32 bits */ + comprintf("\t } else {\n"); /* Only want 32 bit result */ + /* operands in dst and r2, result goes into r2 */ + /* shouldn't matter whether it's signed or unsigned?!? */ + comprintf("\t if (extra & 0x0800) { \n"); /* signed */ + comprintf("\t jff_MULS32(r2,dst);\n"); + comprintf("\t } else { \n"); + comprintf("\t\t jff_MULU32(r2,dst);\n"); + comprintf("\t } \n"); /* The result is in r2, with r2 holding the lower 32 bits */ + comprintf("\t }\n"); + } else { + comprintf("\t if (extra & 0x0400) {\n"); /* Need full 64 bit result */ + comprintf("\t int r3=(extra & 7);\n"); + comprintf("\t mov_l_rr(r3,dst);\n"); /* operands now in r3 and r2 */ + comprintf("\t if (extra & 0x0800) { \n"); /* signed */ + comprintf("\t\t jnf_MULS64(r2,r3);\n"); + comprintf("\t } else { \n"); + comprintf("\t\t jnf_MULU64(r2,r3);\n"); + comprintf("\t } \n"); /* The result is in r2/r3, with r2 holding the lower 32 bits */ + comprintf("\t } else {\n"); /* Only want 32 bit result */ + /* operands in dst and r2, result foes into r2 */ + /* shouldn't matter whether it's signed or unsigned?!? */ + comprintf("\t if (extra & 0x0800) { \n"); /* signed */ + comprintf("\t jnf_MULS32(r2,dst);\n"); + comprintf("\t } else { \n"); + comprintf("\t\t jnf_MULU32(r2,dst);\n"); + comprintf("\t } \n"); /* The result is in r2, with r2 holding the lower 32 bits */ + comprintf("\t }\n"); + } +#else + if (!noflags) { + failure; + return; + } + comprintf("\tuae_u16 extra=%s;\n", gen_nextiword()); + comprintf("\tint r2=(extra>>12)&7;\n" + "\tint tmp=scratchie++;\n"); + + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + /* The two operands are in dst and r2 */ + comprintf("\tif (extra&0x0400) {\n" /* Need full 64 bit result */ + "\tint r3=(extra&7);\n" + "\tmov_l_rr(r3,dst);\n"); /* operands now in r3 and r2 */ + comprintf("\tif (extra&0x0800) { \n" /* signed */ + "\t\timul_64_32(r2,r3);\n" + "\t} else { \n" + "\t\tmul_64_32(r2,r3);\n" + "\t} \n"); + /* The result is in r2/tmp, with r2 holding the lower 32 bits */ + comprintf("\t} else {\n"); /* Only want 32 bit result */ + /* operands in dst and r2, result foes into r2 */ + /* shouldn't matter whether it's signed or unsigned?!? */ + comprintf("\timul_32_32(r2,dst);\n" + "\t}\n"); +#endif +} + +static void gen_muls(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", sz_word, "src", 1, 0); + genamode(curi->dmode, "dstreg", sz_word, "dst", 1, 0); + start_brace(); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_MULS(dst,src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_MULS(dst,src);\n"); + } + genastore("dst", curi->dmode, "dstreg", sz_long, "dst"); +#else + comprintf("\tdont_care_flags();\n"); + genamode(curi->smode, "srcreg", sz_word, "src", 1, 0); + genamode(curi->dmode, "dstreg", sz_word, "dst", 1, 0); + comprintf("\tsign_extend_16_rr(scratchie,src);\n" + "\tsign_extend_16_rr(dst,dst);\n" + "\timul_32_32(dst,scratchie);\n"); + genflags(flag_logical, sz_long, "dst", "", ""); + genastore("dst", curi->dmode, "dstreg", sz_long, "dst"); +#endif +} + +static void gen_mulu(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", sz_word, "src", 1, 0); + genamode(curi->dmode, "dstreg", sz_word, "dst", 1, 0); + start_brace(); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_MULU(dst,src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_MULU(dst,src);\n"); + } + genastore("dst", curi->dmode, "dstreg", sz_long, "dst"); +#else + comprintf("\tdont_care_flags();\n"); + genamode(curi->smode, "srcreg", sz_word, "src", 1, 0); + genamode(curi->dmode, "dstreg", sz_word, "dst", 1, 0); + /* To do 16x16 unsigned multiplication, we actually use + 32x32 signed, and zero-extend the registers first. + That solves the problem of MUL needing dedicated registers + on the x86 */ + comprintf("\tzero_extend_16_rr(scratchie,src);\n" + "\tzero_extend_16_rr(dst,dst);\n" + "\timul_32_32(dst,scratchie);\n"); + genflags(flag_logical, sz_long, "dst", "", ""); + genastore("dst", curi->dmode, "dstreg", sz_long, "dst"); + +#endif +} + +static void gen_nbcd(uae_u32 opcode, struct instr *curi, const char* ssize) { +#if 0 +#else + (void) opcode; + (void) curi; + (void) ssize; + failure; + /* Nope! */ +#endif +} + +static void gen_neg(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_NEG_%s(tmp,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + duplicate_carry(); + comprintf("\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\t jnf_NEG(tmp,src);\n"); + } + + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\tint dst=scratchie++;\n"); + comprintf("\tmov_l_ri(dst,0);\n"); + genflags(flag_sub, curi->size, "", "src", "dst"); + genastore("dst", curi->smode, "srcreg", curi->size, "src"); +#endif +} + +static void gen_negx(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + isaddx; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\t int dst=scratchie++;\n"); + + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t restore_inverted_carry();\n"); /* Reload the X flag into C */ + comprintf("\t start_needflags();\n"); + comprintf("\t jff_NEGX_%s(dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + duplicate_carry(); + comprintf("\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\t restore_inverted_carry();\n"); /* Reload the X flag into C */ + comprintf("\t jnf_NEGX(dst,src);\n"); + } + + genastore("dst", curi->smode, "srcreg", curi->size, "src"); +#else + (void) ssize; + isaddx; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\tint dst=scratchie++;\n"); + comprintf("\tmov_l_ri(dst,0);\n"); + genflags(flag_subx, curi->size, "", "src", "dst"); + genastore("dst", curi->smode, "srcreg", curi->size, "src"); +#endif +} + +static void gen_not(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + comprintf("\t dont_care_flags();\n"); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_NOT_%s(tmp,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_NOT(tmp,src);\n", ssize); + } + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\tint dst=scratchie++;\n"); + comprintf("\tmov_l_ri(dst,0xffffffff);\n"); + genflags(flag_eor, curi->size, "", "src", "dst"); + genastore("dst", curi->smode, "srcreg", curi->size, "src"); +#endif +} + +static void gen_or(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + + comprintf("\t dont_care_flags();\n"); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags) { + comprintf("\t jff_OR_%s(tmp, dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_OR(tmp, dst,src);\n"); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "dst"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + genflags(flag_or, curi->size, "", "src", "dst"); + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_orsr(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ORSR(ARM_CCR_MAP[src & 0xF], ((src & 0x10) >> 4));\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } +#else + (void) curi; + failure; + isjump; +#endif +} + +static void gen_rol(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ROL_%s(tmp,data,cnt);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_ROL_%s(tmp,data,cnt);\n", ssize); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "data"); +#else + (void) ssize; + + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\tdont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + start_brace(); + + switch (curi->size) { + case sz_long: + comprintf("\t rol_l_rr(data,cnt);\n"); + break; + case sz_word: + comprintf("\t rol_w_rr(data,cnt);\n"); + break; + case sz_byte: + comprintf("\t rol_b_rr(data,cnt);\n"); + break; + } + + if (!noflags) { + comprintf("\tstart_needflags();\n"); + comprintf("\tif (needed_flags & FLAG_ZNV)\n"); + switch (curi->size) { + case sz_byte: + comprintf("\t test_b_rr(data,data);\n"); + break; + case sz_word: + comprintf("\t test_w_rr(data,data);\n"); + break; + case sz_long: + comprintf("\t test_l_rr(data,data);\n"); + break; + } + comprintf("\t bt_l_ri(data,0x00);\n"); /* Set C */ + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } + genastore("data", curi->dmode, "dstreg", curi->size, "data"); +#endif +} + +static void gen_rolw(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\t int tmp = scratchie++;\n"); + + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ROLW(tmp,src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_ROLW(tmp,src);\n"); + } + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + (void) curi; + failure; +#endif +} + +static void gen_ror(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ROR_%s(tmp,data,cnt);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_ROR_%s(tmp,data,cnt);\n", ssize); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "data"); +#else + (void) ssize; + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + comprintf("\tdont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + start_brace(); + + switch (curi->size) { + case sz_long: + comprintf("\t ror_l_rr(data,cnt);\n"); + break; + case sz_word: + comprintf("\t ror_w_rr(data,cnt);\n"); + break; + case sz_byte: + comprintf("\t ror_b_rr(data,cnt);\n"); + break; + } + + if (!noflags) { + comprintf("\tstart_needflags();\n"); + comprintf("\tif (needed_flags & FLAG_ZNV)\n"); + switch (curi->size) { + case sz_byte: + comprintf("\t test_b_rr(data,data);\n"); + break; + case sz_word: + comprintf("\t test_w_rr(data,data);\n"); + break; + case sz_long: + comprintf("\t test_l_rr(data,data);\n"); + break; + } + switch (curi->size) { + case sz_byte: + comprintf("\t bt_l_ri(data,0x07);\n"); + break; + case sz_word: + comprintf("\t bt_l_ri(data,0x0f);\n"); + break; + case sz_long: + comprintf("\t bt_l_ri(data,0x1f);\n"); + break; + } + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } + genastore("data", curi->dmode, "dstreg", curi->size, "data"); +#endif +} + +static void gen_rorw(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\t int tmp = scratchie++;\n"); + + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_RORW(tmp,src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } else { + comprintf("\t jnf_RORW(tmp,src);\n"); + } + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + (void) curi; + failure; +#endif +} + +static void gen_roxl(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + isaddx; + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t restore_carry();\n"); /* Reload the X flag into C */ + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ROXL_%s(tmp,data,cnt);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + duplicate_carry(); + } else { + comprintf("\t restore_carry();\n"); /* Reload the X flag into C */ + comprintf("\t jnf_ROXL_%s(tmp,data,cnt);\n", ssize); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "data"); +#else + (void) curi; + (void) ssize; + failure; +#endif +} + +static void gen_roxlw(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + isaddx; + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\t int tmp = scratchie++;\n"); + + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t restore_carry();\n"); /* Reload the X flag into C */ + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ROXLW(tmp,src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + duplicate_carry(); + } else { + comprintf("\t restore_carry();\n"); /* Reload the X flag into C */ + comprintf("\t jnf_ROXLW(tmp,src);\n"); + } + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + (void) curi; + failure; +#endif +} + +static void gen_roxr(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + mayfail; + if (curi->smode == Dreg) { + comprintf("if ((uae_u32)srcreg==(uae_u32)dstreg) {\n" + " FAIL(1);\n" + " return;\n" + "} \n"); + start_brace(); + } + isaddx; + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "cnt", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "data", 1, 0); + start_brace(); + comprintf("\t int tmp=scratchie++;\n"); + + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t restore_carry();\n"); /* Reload the X flag into C */ + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ROXR_%s(tmp,data,cnt);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + duplicate_carry(); + } else { + comprintf("\t restore_carry();\n"); /* Reload the X flag into C */ + comprintf("\t jnf_ROXR_%s(tmp,data,cnt);\n", ssize); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "data"); +#else + (void) curi; + failure; +#endif +} + +static void gen_roxrw(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + isaddx; + comprintf("\t dont_care_flags();\n"); + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf("\t int tmp = scratchie++;\n"); + + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t restore_carry();\n"); /* Reload the X flag into C */ + comprintf("\t start_needflags();\n"); + comprintf("\t jff_ROXRW(tmp,src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + duplicate_carry(); + } else { + comprintf("\t restore_carry();\n"); /* Reload the X flag into C */ + comprintf("\t jnf_ROXRW(tmp,src);\n"); + } + genastore("tmp", curi->smode, "srcreg", curi->size, "src"); +#else + (void) curi; + failure; +#endif +} + +static void gen_sbcd(uae_u32 opcode, struct instr *curi, const char* ssize) { +#if 0 +#else + (void) opcode; + (void) curi; + (void) ssize; + failure; + /* I don't think so! */ +#endif +} + +static void gen_scc(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if 0 + genamode(curi->smode, "srcreg", curi->size, "src", 2, 0); + start_brace(); + comprintf("\t int val = scratchie++;\n"); + switch (curi->cc) { + case 0: /* Unconditional set */ + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + comprintf("\t make_flags_live();\n"); /* Load the flags */ + comprintf("\t jnf_Scc_ri(val,%d);\n", curi->cc); + break; + default: + assert(0); + break; + } + genastore("val", curi->smode, "srcreg", curi->size, "src"); +#else + genamode(curi->smode, "srcreg", curi->size, "src", 2, 0); + start_brace(); + comprintf("\tint val = scratchie++;\n"); + + /* We set val to 0 if we really should use 255, and to 1 for real 0 */ + switch (curi->cc) { + case 0: /* Unconditional set */ + comprintf("\tmov_l_ri(val,0);\n"); + break; + case 1: + /* Unconditional not-set */ + comprintf("\tmov_l_ri(val,1);\n"); + break; + case 8: + failure; + break; /* Work out details! FIXME */ + case 9: + failure; + break; /* Not critical, though! */ + + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + comprintf("\tmake_flags_live();\n"); /* Load the flags */ + /* All condition codes can be inverted by changing the LSB */ + comprintf("\tsetcc(val,%d);\n", cond_codes[curi->cc] ^ 1); + break; + default: + assert(0); + break; + } + comprintf("\tsub_b_ri(val,1);\n"); + genastore("val", curi->smode, "srcreg", curi->size, "src"); +#endif +} + +static void gen_sub(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + + comprintf("\t dont_care_flags();\n"); + start_brace(); + // Use tmp register to avoid destroying upper part in .B., .W cases + comprintf("\t int tmp=scratchie++;\n"); + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_SUB_%s(tmp,dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + duplicate_carry(); + comprintf( + "\t if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\t jnf_SUB_%s(tmp,dst,src);\n", ssize); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "dst"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + genflags(flag_sub, curi->size, "", "src", "dst"); + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_suba(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", sz_long, "dst", 1, 0); + start_brace(); + comprintf("\t jnf_SUBA_%s(dst, src);\n", ssize); + genastore("dst", curi->dmode, "dstreg", sz_long, "dst"); +#else + (void) ssize; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", sz_long, "dst", 1, 0); + start_brace(); + comprintf("\tint tmp=scratchie++;\n"); + switch (curi->size) { + case sz_byte: + comprintf("\tsign_extend_8_rr(tmp,src);\n"); + break; + case sz_word: + comprintf("\tsign_extend_16_rr(tmp,src);\n"); + break; + case sz_long: + comprintf("\ttmp=src;\n"); + break; + default: + assert(0); + break; + } + comprintf("\tsub_l(dst,tmp);\n"); + genastore("dst", curi->dmode, "dstreg", sz_long, "dst"); +#endif +} + +static void gen_subx(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; +#if defined(USE_JIT2) + isaddx; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + start_brace(); + comprintf("\tint tmp=scratchie++;\n"); + comprintf("\tdont_care_flags();\n"); + if (!noflags) { + comprintf("\t make_flags_live();\n"); + comprintf("\t restore_inverted_carry();\n"); /* Reload the X flag into C */ + comprintf("\t start_needflags();\n"); + comprintf("\t jff_SUBX_%s(tmp,dst,src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + duplicate_carry(); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\t restore_inverted_carry();\n"); /* Reload the X flag into C */ + comprintf("\t jnf_SUBX(tmp,dst,src);\n"); + } + genastore("tmp", curi->dmode, "dstreg", curi->size, "dst"); +#else + (void) ssize; + isaddx; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 1, 0); + genflags(flag_subx, curi->size, "", "src", "dst"); + genastore("dst", curi->dmode, "dstreg", curi->size, "dst"); +#endif +} + +static void gen_swap(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", sz_long, "src", 1, 0); + comprintf("\t dont_care_flags();\n"); + start_brace(); + + if (!noflags) { + comprintf("\t start_needflags();\n"); + comprintf("\t jff_SWAP(src);\n"); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); + } else { + comprintf("\t jnf_SWAP(src);\n"); + } + genastore("src", curi->smode, "srcreg", sz_long, "src"); +#else + genamode(curi->smode, "srcreg", sz_long, "src", 1, 0); + comprintf("\tdont_care_flags();\n"); + comprintf("\tarm_ROR_l_ri8(src,16);\n"); + genflags(flag_logical, sz_long, "src", "", ""); + genastore("src", curi->smode, "srcreg", sz_long, "src"); +#endif +} + +static void gen_tst(uae_u32 opcode, struct instr *curi, const char* ssize) { + (void) opcode; + (void) ssize; +#if defined(USE_JIT2) + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + comprintf("\t dont_care_flags();\n"); + if (!noflags) { + start_brace(); + comprintf("\t start_needflags();\n"); + comprintf("\t jff_TST_%s(src);\n", ssize); + comprintf("\t live_flags();\n"); + comprintf("\t end_needflags();\n"); + } +#else + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + genflags(flag_logical, curi->size, "src", "", ""); +#endif +} + +static int /* returns zero for success, non-zero for failure */ +gen_opcode(unsigned long int opcode) { + struct instr *curi = table68k + opcode; + const char* ssize = NULL; + + insn_n_cycles = 2; + global_failure = 0; + long_opcode = 0; + global_isjump = 0; + global_iscjump = 0; + global_isaddx = 0; + global_cmov = 0; + global_fpu = 0; + global_mayfail = 0; + hack_opcode = opcode; + endstr[0] = 0; + + start_brace(); + comprintf("\tuae_u8 scratchie=S1;\n"); + switch (curi->plev) { + case 0: /* not privileged */ + break; + case 1: /* unprivileged only on 68000 */ + if (cpu_level == 0) + break; + if (next_cpu_level < 0) + next_cpu_level = 0; + + /* fall through */ + case 2: /* priviledged */ + failure; /* Easy ones first */ + break; + case 3: /* privileged if size == word */ + if (curi->size == sz_byte) + break; + failure; + break; + } + switch (curi->size) { + case sz_byte: + ssize = "b"; + break; + case sz_word: + ssize = "w"; + break; + case sz_long: + ssize = "l"; + break; + default: + assert(0); + break; + } + (void) ssize; + + switch (curi->mnemo) { + case i_AND: + gen_and(opcode, curi, ssize); + break; + + case i_OR: + gen_or(opcode, curi, ssize); + break; + + case i_EOR: + gen_eor(opcode, curi, ssize); + break; + + case i_ORSR: + gen_orsr(opcode, curi, ssize); + break; + + case i_EORSR: + gen_eorsr(opcode, curi, ssize); + break; + + case i_ANDSR: + gen_andsr(opcode, curi, ssize); + break; + + case i_SUB: + gen_sub(opcode, curi, ssize); + break; + + case i_SUBA: + gen_suba(opcode, curi, ssize); + break; + + case i_SUBX: + gen_subx(opcode, curi, ssize); + break; + + case i_SBCD: + gen_sbcd(opcode, curi, ssize); + break; + + case i_ADD: + gen_add(opcode, curi, ssize); + break; + + case i_ADDA: + gen_adda(opcode, curi, ssize); + break; + + case i_ADDX: + gen_addx(opcode, curi, ssize); + break; + + case i_ABCD: + gen_abcd(opcode, curi, ssize); + break; + + case i_NEG: + gen_neg(opcode, curi, ssize); + break; + + case i_NEGX: + gen_negx(opcode, curi, ssize); + break; + + case i_NBCD: + gen_nbcd(opcode, curi, ssize); + break; + + case i_CLR: + gen_clr(opcode, curi, ssize); + break; + + case i_NOT: + gen_not(opcode, curi, ssize); + break; + + case i_TST: + gen_tst(opcode, curi, ssize); + break; + + case i_BCHG: + gen_bchg(opcode, curi, ssize); + break; + + case i_BCLR: + gen_bclr(opcode, curi, ssize); + break; + + case i_BSET: + gen_bset(opcode, curi, ssize); + break; + + case i_BTST: + gen_btst(opcode, curi, ssize); + break; + + case i_CMPM: + case i_CMP: + gen_cmp(opcode, curi, ssize); + break; + + case i_CMPA: + gen_cmpa(opcode, curi, ssize); + break; + + /* The next two are coded a little unconventional, but they are doing + * weird things... */ + case i_MVPRM: + isjump; + failure; + break; + + case i_MVPMR: + isjump; + failure; + break; + + case i_MOVE: + gen_move(opcode, curi, ssize); + break; + + case i_MOVEA: + gen_movea(opcode, curi, ssize); + break; + + case i_MVSR2: + isjump; + failure; + break; + + case i_MV2SR: + isjump; + failure; + break; + + case i_SWAP: + gen_swap(opcode, curi, ssize); + break; + + case i_EXG: + gen_exg(opcode, curi, ssize); + break; + + case i_EXT: + gen_ext(opcode, curi, ssize); + break; + + case i_MVMEL: + genmovemel(opcode); + break; + + case i_MVMLE: + genmovemle(opcode); + break; + + case i_TRAP: + isjump; + failure; + break; + + case i_MVR2USP: + isjump; + failure; + break; + + case i_MVUSP2R: + isjump; + failure; + break; + + case i_RESET: + isjump; + failure; + break; + + case i_NOP: + break; + + case i_STOP: + isjump; + failure; + break; + + case i_RTE: + isjump; + failure; + break; + + case i_RTD: + genamode(curi->smode, "srcreg", curi->size, "offs", 1, 0); + /* offs is constant */ + comprintf("\tarm_ADD_l_ri8(offs,4);\n"); + start_brace(); + comprintf("\tint newad=scratchie++;\n" + "\treadlong(15,newad,scratchie);\n" + "\tmov_l_mr((uintptr)®s.pc,newad);\n" + "\tget_n_addr_jmp(newad,PC_P,scratchie);\n" + "\tmov_l_mr((uintptr)®s.pc_oldp,PC_P);\n" + "\tm68k_pc_offset=0;\n" + "\tarm_ADD_l(15,offs);\n"); + gen_update_next_handler(); + isjump; + break; + + case i_LINK: + genamode(curi->smode, "srcreg", sz_long, "src", 1, 0); + genamode(curi->dmode, "dstreg", curi->size, "offs", 1, 0); + comprintf("\tsub_l_ri(15,4);\n" + "\twritelong_clobber(15,src,scratchie);\n" + "\tmov_l_rr(src,15);\n"); + if (curi->size == sz_word) + comprintf("\tsign_extend_16_rr(offs,offs);\n"); + comprintf("\tarm_ADD_l(15,offs);\n"); + genastore("src", curi->smode, "srcreg", sz_long, "src"); + break; + + case i_UNLK: + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + comprintf("\tmov_l_rr(15,src);\n" + "\treadlong(15,src,scratchie);\n" + "\tarm_ADD_l_ri8(15,4);\n"); + genastore("src", curi->smode, "srcreg", curi->size, "src"); + break; + + case i_RTS: + comprintf("\tint newad=scratchie++;\n" + "\treadlong(15,newad,scratchie);\n" + "\tmov_l_mr((uintptr)®s.pc,newad);\n" + "\tget_n_addr_jmp(newad,PC_P,scratchie);\n" + "\tmov_l_mr((uintptr)®s.pc_oldp,PC_P);\n" + "\tm68k_pc_offset=0;\n" + "\tlea_l_brr(15,15,4);\n"); + gen_update_next_handler(); + isjump; + break; + + case i_TRAPV: + isjump; + failure; + break; + + case i_RTR: + isjump; + failure; + break; + + case i_JSR: + isjump; + genamode(curi->smode, "srcreg", curi->size, "src", 0, 0); + start_brace(); + comprintf( + "\tuae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset;\n"); + comprintf("\tint ret=scratchie++;\n" + "\tmov_l_ri(ret,retadd);\n" + "\tsub_l_ri(15,4);\n" + "\twritelong_clobber(15,ret,scratchie);\n"); + comprintf("\tmov_l_mr((uintptr)®s.pc,srca);\n" + "\tget_n_addr_jmp(srca,PC_P,scratchie);\n" + "\tmov_l_mr((uintptr)®s.pc_oldp,PC_P);\n" + "\tm68k_pc_offset=0;\n"); + gen_update_next_handler(); + break; + + case i_JMP: + isjump; + genamode(curi->smode, "srcreg", curi->size, "src", 0, 0); + comprintf("\tmov_l_mr((uintptr)®s.pc,srca);\n" + "\tget_n_addr_jmp(srca,PC_P,scratchie);\n" + "\tmov_l_mr((uintptr)®s.pc_oldp,PC_P);\n" + "\tm68k_pc_offset=0;\n"); + gen_update_next_handler(); + break; + + case i_BSR: + is_const_jump; + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + start_brace(); + comprintf( + "\tuae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset;\n"); + comprintf("\tint ret=scratchie++;\n" + "\tmov_l_ri(ret,retadd);\n" + "\tsub_l_ri(15,4);\n" + "\twritelong_clobber(15,ret,scratchie);\n"); + comprintf("\tarm_ADD_l_ri(src,m68k_pc_offset_thisinst+2);\n"); + comprintf("\tm68k_pc_offset=0;\n"); + comprintf("\tarm_ADD_l(PC_P,src);\n"); + comprintf("\tcomp_pc_p=(uae_u8*)get_const(PC_P);\n"); + break; + + case i_Bcc: + comprintf("\tuae_u32 v,v1,v2;\n"); + genamode(curi->smode, "srcreg", curi->size, "src", 1, 0); + /* That source is an immediate, so we can clobber it with abandon */ + switch (curi->size) { + case sz_byte: + comprintf("\tsign_extend_8_rr(src,src);\n"); + break; + case sz_word: + comprintf("\tsign_extend_16_rr(src,src);\n"); + break; + case sz_long: + break; + } + comprintf( + "\tsub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2);\n"); + /* Leave the following as "add" --- it will allow it to be optimized + away due to src being a constant ;-) */ + comprintf("\tarm_ADD_l_ri(src,(uintptr)comp_pc_p);\n"); + comprintf("\tmov_l_ri(PC_P,(uintptr)comp_pc_p);\n"); + /* Now they are both constant. Might as well fold in m68k_pc_offset */ + comprintf("\tarm_ADD_l_ri(src,m68k_pc_offset);\n"); + comprintf("\tarm_ADD_l_ri(PC_P,m68k_pc_offset);\n"); + comprintf("\tm68k_pc_offset=0;\n"); + + if (curi->cc >= 2) { + comprintf("\tv1=get_const(PC_P);\n" + "\tv2=get_const(src);\n" + "\tregister_branch(v1,v2,%d);\n", cond_codes[curi->cc]); + comprintf("\tmake_flags_live();\n"); /* Load the flags */ + isjump; + } else { + is_const_jump; + } + + switch (curi->cc) { + case 0: /* Unconditional jump */ + comprintf("\tmov_l_rr(PC_P,src);\n"); + comprintf("\tcomp_pc_p=(uae_u8*)get_const(PC_P);\n"); + break; + case 1: + break; /* This is silly! */ + case 8: + failure; + break; /* Work out details! FIXME */ + case 9: + failure; + break; /* Not critical, though! */ + + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + default: + assert(0); + break; + } + break; + + case i_LEA: + genamode(curi->smode, "srcreg", curi->size, "src", 0, 0); + genamode(curi->dmode, "dstreg", curi->size, "dst", 2, 0); + genastore("srca", curi->dmode, "dstreg", curi->size, "dst"); + break; + + case i_PEA: + if (table68k[opcode].smode == Areg || table68k[opcode].smode == Aind + || table68k[opcode].smode == Aipi + || table68k[opcode].smode == Apdi + || table68k[opcode].smode == Ad16 + || table68k[opcode].smode == Ad8r) + comprintf("if (srcreg==7) dodgy=1;\n"); + + genamode(curi->smode, "srcreg", curi->size, "src", 0, 0); + genamode(Apdi, "7", sz_long, "dst", 2, 0); + genastore("srca", Apdi, "7", sz_long, "dst"); + break; + + case i_DBcc: + gen_dbcc(opcode, curi, ssize); + break; + + case i_Scc: + gen_scc(opcode, curi, ssize); + break; + + case i_DIVU: + isjump; + failure; + break; + + case i_DIVS: + isjump; + failure; + break; + + case i_MULU: + gen_mulu(opcode, curi, ssize); + break; + + case i_MULS: + gen_muls(opcode, curi, ssize); + break; + + case i_CHK: + isjump; + failure; + break; + + case i_CHK2: + isjump; + failure; + break; + + case i_ASR: + gen_asr(opcode, curi, ssize); + break; + + case i_ASL: + gen_asl(opcode, curi, ssize); + break; + + case i_LSR: + gen_lsr(opcode, curi, ssize); + break; + + case i_LSL: + gen_lsl(opcode, curi, ssize); + break; + + case i_ROL: + gen_rol(opcode, curi, ssize); + break; + + case i_ROR: + gen_ror(opcode, curi, ssize); + break; + + case i_ROXL: + gen_roxl(opcode, curi, ssize); + break; + + case i_ROXR: + gen_roxr(opcode, curi, ssize); + break; + + case i_ASRW: + gen_asrw(opcode, curi, ssize); + break; + + case i_ASLW: + gen_aslw(opcode, curi, ssize); + break; + + case i_LSRW: + gen_lsrw(opcode, curi, ssize); + break; + + case i_LSLW: + gen_lslw(opcode, curi, ssize); + break; + + case i_ROLW: + gen_rolw(opcode, curi, ssize); + break; + + case i_RORW: + gen_rorw(opcode, curi, ssize); + break; + + case i_ROXLW: + gen_roxlw(opcode, curi, ssize); + break; + + case i_ROXRW: + gen_roxrw(opcode, curi, ssize); + break; + + case i_MOVEC2: + isjump; + failure; + break; + + case i_MOVE2C: + isjump; + failure; + break; + + case i_CAS: + failure; + break; + + case i_CAS2: + failure; + break; + + case i_MOVES: + /* ignore DFC and SFC because we have no MMU */ + isjump; + failure; + break; + + case i_BKPT: + /* only needed for hardware emulators */ + isjump; + failure; + break; + + case i_CALLM: + /* not present in 68030 */ + isjump; + failure; + break; + + case i_RTM: + /* not present in 68030 */ + isjump; + failure; + break; + + case i_TRAPcc: + isjump; + failure; + break; + + case i_DIVL: + isjump; + failure; + break; + + case i_MULL: + gen_mull(opcode, curi, ssize); + break; + + case i_BFTST: + case i_BFEXTU: + case i_BFCHG: + case i_BFEXTS: + case i_BFCLR: + case i_BFFFO: + case i_BFSET: + case i_BFINS: + failure; + break; + case i_PACK: + failure; + break; + case i_UNPK: + failure; + break; + case i_TAS: + failure; + break; + case i_FPP: + uses_fpu; +#ifdef USE_JIT_FPU + mayfail; + comprintf("\tuae_u16 extra=%s;\n",gen_nextiword()); + swap_opcode(); + comprintf("\tcomp_fpp_opp(opcode,extra);\n"); +#else + failure; +#endif + break; + case i_FBcc: + uses_fpu; +#ifdef USE_JIT_FPU + isjump; + uses_cmov; + mayfail; + swap_opcode(); + comprintf("\tcomp_fbcc_opp(opcode);\n"); +#else + isjump; + failure; +#endif + break; + case i_FDBcc: + uses_fpu; + isjump; + failure; + break; + case i_FScc: + uses_fpu; +#ifdef USE_JIT_FPU + mayfail; + uses_cmov; + comprintf("\tuae_u16 extra=%s;\n",gen_nextiword()); + swap_opcode(); + comprintf("\tcomp_fscc_opp(opcode,extra);\n"); +#else + failure; +#endif + break; + case i_FTRAPcc: + uses_fpu; + isjump; + failure; + break; + case i_FSAVE: + uses_fpu; + failure; + break; + case i_FRESTORE: + uses_fpu; + failure; + break; + + case i_CINVL: + case i_CINVP: + case i_CINVA: + isjump; /* Not really, but it's probably a good idea to stop + translating at this point */ + failure; + comprintf("\tflush_icache();\n"); /* Differentiate a bit more? */ + break; + case i_CPUSHL: + case i_CPUSHP: + case i_CPUSHA: + isjump; /* Not really, but it's probably a good idea to stop + translating at this point */ + failure; + break; + + case i_MOVE16: + gen_move16(opcode, curi); + break; + +#ifdef UAE + case i_MMUOP030: + case i_PFLUSHN: + case i_PFLUSH: + case i_PFLUSHAN: + case i_PFLUSHA: + case i_PLPAR: + case i_PLPAW: + case i_PTESTR: + case i_PTESTW: + case i_LPSTOP: + case i_PULSE: + case i_HALT: + isjump; + failure; + break; +#endif + case i_EMULOP_RETURN: + isjump; + failure; + break; + + case i_EMULOP: + failure; + break; + + case i_NATFEAT_ID: + case i_NATFEAT_CALL: + failure; + break; + + case i_MMUOP: + isjump; + failure; + break; + default: + assert(0); + break; + } + comprintf("%s", endstr); + finish_braces(); + sync_m68k_pc(); + if (global_mayfail) + comprintf("\tif (failure) m68k_pc_offset=m68k_pc_offset_thisinst;\n"); + return global_failure; +} + +static void generate_includes(FILE * f) { + fprintf(f, "#include \"sysdeps.h\"\n"); + fprintf(f, "#include \"machdep/m68k.h\"\n"); + fprintf(f, "#include \"memory-uae.h\"\n"); + fprintf(f, "#include \"readcpu.h\"\n"); + fprintf(f, "#include \"newcpu.h\"\n"); + fprintf(f, "#include \"comptbl.h\"\n"); + fprintf(f, "#include \"debug.h\"\n"); +} + +static int postfix; + +static char *decodeEA (amodes mode, wordsizes size) +{ + static char buffer[80]; + + buffer[0] = 0; + switch (mode){ + case Dreg: + strcpy (buffer,"Dn"); + break; + case Areg: + strcpy (buffer,"An"); + break; + case Aind: + strcpy (buffer,"(An)"); + break; + case Aipi: + strcpy (buffer,"(An)+"); + break; + case Apdi: + strcpy (buffer,"-(An)"); + break; + case Ad16: + strcpy (buffer,"(d16,An)"); + break; + case Ad8r: + strcpy (buffer,"(d8,An,Xn)"); + break; + case PC16: + strcpy (buffer,"(d16,PC)"); + break; + case PC8r: + strcpy (buffer,"(d8,PC,Xn)"); + break; + case absw: + strcpy (buffer,"(xxx).W"); + break; + case absl: + strcpy (buffer,"(xxx).L"); + break; + case imm: + switch (size){ + case sz_byte: + strcpy (buffer,"#.B"); + break; + case sz_word: + strcpy (buffer,"#.W"); + break; + case sz_long: + strcpy (buffer,"#.L"); + break; + default: + break; + } + break; + case imm0: + strcpy (buffer,"#.B"); + break; + case imm1: + strcpy (buffer,"#.W"); + break; + case imm2: + strcpy (buffer,"#.L"); + break; + case immi: + strcpy (buffer,"#"); + break; + + default: + break; + } + return buffer; +} + +static char *outopcode (const char *name, int opcode) +{ + static char out[100]; + struct instr *ins; + + ins = &table68k[opcode]; + strcpy (out, name); + if (ins->smode == immi) + strcat (out, "Q"); + if (ins->size == sz_byte) + strcat (out,".B"); + if (ins->size == sz_word) + strcat (out,".W"); + if (ins->size == sz_long) + strcat (out,".L"); + strcat (out," "); + if (ins->suse) + strcat (out, decodeEA (ins->smode, ins->size)); + if (ins->duse) { + if (ins->suse) strcat (out,","); + strcat (out, decodeEA (ins->dmode, ins->size)); + } + return out; +} + + +static void generate_one_opcode(int rp, int noflags) { + int i; + uae_u16 smsk, dmsk; + int opcode = opcode_map[rp]; + int aborted = 0; + int have_srcreg = 0; + int have_dstreg = 0; + const char *name; + + if (table68k[opcode].mnemo == i_ILLG || table68k[opcode].clev > cpu_level) + return; + + for (i = 0; lookuptab[i].name[0]; i++) { + if (table68k[opcode].mnemo == lookuptab[i].mnemo) + break; + } + + if (table68k[opcode].handler != -1) + return; + + switch (table68k[opcode].stype) { + case 0: + smsk = 7; + break; + case 1: + smsk = 255; + break; + case 2: + smsk = 15; + break; + case 3: + smsk = 7; + break; + case 4: + smsk = 7; + break; + case 5: + smsk = 63; + break; + case 6: + smsk = 255; + break; + case 7: + smsk = 3; + break; + default: + assert(0); + break; + } + dmsk = 7; + + next_cpu_level = -1; + if (table68k[opcode].suse && table68k[opcode].smode != imm + && table68k[opcode].smode != imm0 && table68k[opcode].smode != imm1 + && table68k[opcode].smode != imm2 && table68k[opcode].smode != absw + && table68k[opcode].smode != absl && table68k[opcode].smode != PC8r + && table68k[opcode].smode != PC16) { + have_srcreg = 1; + if (table68k[opcode].spos == -1) { + if (((int) table68k[opcode].sreg) >= 128) + comprintf("\tuae_s32 srcreg = (uae_s32)(uae_s8)%d;\n", + (int) table68k[opcode].sreg); + else + comprintf("\tuae_s32 srcreg = %d;\n", + (int) table68k[opcode].sreg); + } else { + char source[100]; + int pos = table68k[opcode].spos; + + comprintf( + "#if defined(HAVE_GET_WORD_UNSWAPPED) && !defined(FULLMMU)\n"); + + if (pos < 8 && (smsk >> (8 - pos)) != 0) + sprintf(source, "(((opcode >> %d) | (opcode << %d)) & %d)", + pos ^ 8, 8 - pos, dmsk); + else if (pos != 8) + sprintf(source, "((opcode >> %d) & %d)", pos ^ 8, smsk); + else + sprintf(source, "(opcode & %d)", smsk); + + if (table68k[opcode].stype == 3) + comprintf("\tuae_u32 srcreg = imm8_table[%s];\n", source); + else if (table68k[opcode].stype == 1) + comprintf("\tuae_u32 srcreg = (uae_s32)(uae_s8)%s;\n", source); + else + comprintf("\tuae_u32 srcreg = %s;\n", source); + + comprintf("#else\n"); + + if (pos) + sprintf(source, "((opcode >> %d) & %d)", pos, smsk); + else + sprintf(source, "(opcode & %d)", smsk); + + if (table68k[opcode].stype == 3) + comprintf("\tuae_s32 srcreg = imm8_table[%s];\n", source); + else if (table68k[opcode].stype == 1) + comprintf("\tuae_s32 srcreg = (uae_s32)(uae_s8)%s;\n", source); + else + comprintf("\tuae_s32 srcreg = %s;\n", source); + + comprintf("#endif\n"); + } + } + if (table68k[opcode].duse + /* Yes, the dmode can be imm, in case of LINK or DBcc */ + && table68k[opcode].dmode != imm && table68k[opcode].dmode != imm0 + && table68k[opcode].dmode != imm1 && table68k[opcode].dmode != imm2 + && table68k[opcode].dmode != absw + && table68k[opcode].dmode != absl) { + have_dstreg = 1; + if (table68k[opcode].dpos == -1) { + if (((int) table68k[opcode].dreg) >= 128) + comprintf("\tuae_s32 dstreg = (uae_s32)(uae_s8)%d;\n", + (int) table68k[opcode].dreg); + else + comprintf("\tuae_s32 dstreg = %d;\n", + (int) table68k[opcode].dreg); + } else { + int pos = table68k[opcode].dpos; + + comprintf( + "#if defined(HAVE_GET_WORD_UNSWAPPED) && !defined(FULLMMU)\n"); + + if (pos < 8 && (dmsk >> (8 - pos)) != 0) + comprintf( + "\tuae_u32 dstreg = ((opcode >> %d) | (opcode << %d)) & %d;\n", + pos ^ 8, 8 - pos, dmsk); + else if (pos != 8) + comprintf("\tuae_u32 dstreg = (opcode >> %d) & %d;\n", pos ^ 8, + dmsk); + else + comprintf("\tuae_u32 dstreg = opcode & %d;\n", dmsk); + + comprintf("#else\n"); + + if (pos) + comprintf("\tuae_u32 dstreg = (opcode >> %d) & %d;\n", pos, + dmsk); + else + comprintf("\tuae_u32 dstreg = opcode & %d;\n", dmsk); + + comprintf("#endif\n"); + } + } + + if (have_srcreg && have_dstreg + && (table68k[opcode].dmode == Areg || table68k[opcode].dmode == Aind + || table68k[opcode].dmode == Aipi + || table68k[opcode].dmode == Apdi + || table68k[opcode].dmode == Ad16 + || table68k[opcode].dmode == Ad8r) + && (table68k[opcode].smode == Areg || table68k[opcode].smode == Aind + || table68k[opcode].smode == Aipi + || table68k[opcode].smode == Apdi + || table68k[opcode].smode == Ad16 + || table68k[opcode].smode == Ad8r)) { + comprintf("\tuae_u32 dodgy=(srcreg==(uae_s32)dstreg);\n"); + } else { + comprintf("\tuae_u32 dodgy=0;\n"); + } + comprintf("\tuae_u32 m68k_pc_offset_thisinst=m68k_pc_offset;\n"); + comprintf("\tm68k_pc_offset+=2;\n"); + + aborted = gen_opcode(opcode); + { + int flags = 0; + if (global_isjump) + flags |= 1; + if (long_opcode) + flags |= 2; + if (global_cmov) + flags |= 4; + if (global_isaddx) + flags |= 8; + if (global_iscjump) + flags |= 16; + if (global_fpu) + flags |= 32; + + comprintf("}\n"); + + name = lookuptab[i].name; + if (aborted) { + fprintf(stblfile, "{ NULL, 0x%08x, %d }, /* %s */\n", opcode, flags, name); + com_discard(); + } else { + const char *tbl = noflags ? "nf" : "ff"; + fprintf(stblfile, + "{ op_%x_%d_comp_%s, %d, 0x%08x }, /* %s */\n", + opcode, postfix, tbl, opcode, flags, name); + fprintf(headerfile, "extern compop_func op_%x_%d_comp_%s;\n", + opcode, postfix, tbl); + printf ("/* %s */\n", outopcode (name, opcode)); + printf( + "void REGPARAM2 op_%x_%d_comp_%s(uae_u32 opcode) /* %s */\n{\n", + opcode, postfix, tbl, name); + com_flush(); + } + } + opcode_next_clev[rp] = next_cpu_level; + opcode_last_postfix[rp] = postfix; +} + +static void generate_func(int noflags) { + int i, j, rp; + const char *tbl = noflags ? "nf" : "ff"; + + using_prefetch = 0; + using_exception_3 = 0; + for (i = 0; i < 1; i++) /* We only do one level! */ + { + cpu_level = 4 - i; + postfix = i; + + fprintf(stblfile, "const struct comptbl op_smalltbl_%d_comp_%s[] = {\n", + postfix, tbl); + + /* sam: this is for people with low memory (eg. me :)) */ + printf("\n" + "#if !defined(PART_1) && !defined(PART_2) && " + "!defined(PART_3) && !defined(PART_4) && " + "!defined(PART_5) && !defined(PART_6) && " + "!defined(PART_7) && !defined(PART_8)" + "\n" + "#define PART_1 1\n" + "#define PART_2 1\n" + "#define PART_3 1\n" + "#define PART_4 1\n" + "#define PART_5 1\n" + "#define PART_6 1\n" + "#define PART_7 1\n" + "#define PART_8 1\n" + "#endif\n\n"); + + rp = 0; + for (j = 1; j <= 8; ++j) { + int k = (j * nr_cpuop_funcs) / 8; + printf("#ifdef PART_%d\n", j); + for (; rp < k; rp++) + generate_one_opcode(rp, noflags); + printf("#endif\n\n"); + } + + fprintf(stblfile, "{ 0, 65536, 0 }};\n"); + } + +} + +#if (defined(OS_cygwin) || defined(OS_mingw)) && defined(EXTENDED_SIGSEGV) +void cygwin_mingw_abort() +{ +#undef abort + abort(); +} +#endif + +int main(void) +{ + init_table68k(); + + opcode_map = (int *) malloc(sizeof(int) * nr_cpuop_funcs); + opcode_last_postfix = (int *) malloc(sizeof(int) * nr_cpuop_funcs); + opcode_next_clev = (int *) malloc(sizeof(int) * nr_cpuop_funcs); + counts = (unsigned long *) malloc(65536 * sizeof(unsigned long)); + read_counts(); + + /* It would be a lot nicer to put all in one file (we'd also get rid of + * cputbl.h that way), but cpuopti can't cope. That could be fixed, but + * I don't dare to touch the 68k version. */ + + headerfile = fopen("comptbl.h", "wb"); + fprintf (headerfile, "" + "extern const struct comptbl op_smalltbl_0_comp_nf[];\n" + "extern const struct comptbl op_smalltbl_0_comp_ff[];\n" + ""); + + stblfile = fopen("compstbl_arm.cpp", "wb"); + if (freopen("compemu_arm.cpp", "wb", stdout) == NULL) + { + assert(0); + } + + generate_includes(stdout); + generate_includes(stblfile); + + printf("#include \"jit/compemu.h\"\n"); + + noflags = 0; + generate_func(noflags); + + free(opcode_map); + free(opcode_last_postfix); + free(opcode_next_clev); + free(counts); + + opcode_map = (int *) malloc(sizeof(int) * nr_cpuop_funcs); + opcode_last_postfix = (int *) malloc(sizeof(int) * nr_cpuop_funcs); + opcode_next_clev = (int *) malloc(sizeof(int) * nr_cpuop_funcs); + counts = (unsigned long *) malloc(65536 * sizeof(unsigned long)); + read_counts(); + noflags = 1; + generate_func(noflags); + + free(opcode_map); + free(opcode_last_postfix); + free(opcode_next_clev); + free(counts); + + free(table68k); + fclose(stblfile); + fclose(headerfile); + return 0; +} diff --git a/src/jit/compemu.cpp b/src/jit/compemu.cpp index bfeaa884e..0f7aa75a8 100644 --- a/src/jit/compemu.cpp +++ b/src/jit/compemu.cpp @@ -1,53950 +1,9 @@ -#include "sysconfig.h" -#if defined(JIT) -#include "sysdeps.h" -#include "options.h" -#include "memory.h" -#include "newcpu.h" -#include "custom.h" -#include "comptbl.h" -#include "compemu.h" - -#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) -#define PART_1 1 -#define PART_2 1 -#define PART_3 1 -#define PART_4 1 -#define PART_5 1 -#define PART_6 1 -#define PART_7 1 -#define PART_8 1 -#endif - -#ifdef USE_JIT_FPU -extern void comp_fpp_opp(); -extern void comp_fscc_opp(); -extern void comp_fbcc_opp(); -#endif - -#ifdef PART_1 -/* OR.B #.B,Dn */ -uae_u32 REGPARAM2 op_0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_OR_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(An) */ -uae_u32 REGPARAM2 op_10_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_18_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,-(An) */ -uae_u32 REGPARAM2 op_20_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_28_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_30_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_38_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_39_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ORSR.B #.W */ -uae_u32 REGPARAM2 op_3c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - make_flags_live(); - jff_ORSR(ARM_CCR_MAP[src & 0xF], ((src & 0x10) >> 4)); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,Dn */ -uae_u32 REGPARAM2 op_40_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_OR_w_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(An) */ -uae_u32 REGPARAM2 op_50_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_58_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,-(An) */ -uae_u32 REGPARAM2 op_60_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_68_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_70_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_78_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_79_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,Dn */ -uae_u32 REGPARAM2 op_80_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_OR_l_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(An) */ -uae_u32 REGPARAM2 op_90_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_98_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,-(An) */ -uae_u32 REGPARAM2 op_a0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_a8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_b0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.L Dn,Dn */ -uae_u32 REGPARAM2 op_100_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - make_flags_live(); - jff_BTST_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(An) */ -uae_u32 REGPARAM2 op_110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b(dst,src); - live_flags(); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,-(An) */ -uae_u32 REGPARAM2 op_120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_138_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_139_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(d16,PC) */ -uae_u32 REGPARAM2 op_13a_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_13b_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,#.B */ -uae_u32 REGPARAM2 op_13c_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=alloc_scratch(); - mov_l_ri(dst,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - make_flags_live(); - jff_BTST_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.L Dn,Dn */ -uae_u32 REGPARAM2 op_140_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - make_flags_live(); - jff_BCHG_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(An) */ -uae_u32 REGPARAM2 op_150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,-(An) */ -uae_u32 REGPARAM2 op_160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_178_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_179_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.L Dn,Dn */ -uae_u32 REGPARAM2 op_180_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - make_flags_live(); - jff_BCLR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(An) */ -uae_u32 REGPARAM2 op_190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,-(An) */ -uae_u32 REGPARAM2 op_1a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_1a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_1b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_1b8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_1b9_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.L Dn,Dn */ -uae_u32 REGPARAM2 op_1c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - make_flags_live(); - jff_BSET_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(An) */ -uae_u32 REGPARAM2 op_1d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_1d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,-(An) */ -uae_u32 REGPARAM2 op_1e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_1e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_1f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_1f8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_1f9_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,Dn */ -uae_u32 REGPARAM2 op_200_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_AND_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(An) */ -uae_u32 REGPARAM2 op_210_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_218_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,-(An) */ -uae_u32 REGPARAM2 op_220_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_228_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_230_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_238_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_239_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ANDSR.B #.W */ -uae_u32 REGPARAM2 op_23c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - make_flags_live(); - jff_ANDSR(ARM_CCR_MAP[src & 0xF], (src & 0x10)); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,Dn */ -uae_u32 REGPARAM2 op_240_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_AND_w_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(An) */ -uae_u32 REGPARAM2 op_250_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_258_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,-(An) */ -uae_u32 REGPARAM2 op_260_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_268_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_270_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_278_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_279_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,Dn */ -uae_u32 REGPARAM2 op_280_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_AND_l_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(An) */ -uae_u32 REGPARAM2 op_290_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_298_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,-(An) */ -uae_u32 REGPARAM2 op_2a0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_2a8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_2b0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_2b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_2b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,Dn */ -uae_u32 REGPARAM2 op_400_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(An) */ -uae_u32 REGPARAM2 op_410_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_418_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,-(An) */ -uae_u32 REGPARAM2 op_420_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_428_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_430_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_438_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_439_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,Dn */ -uae_u32 REGPARAM2 op_440_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(An) */ -uae_u32 REGPARAM2 op_450_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_458_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,-(An) */ -uae_u32 REGPARAM2 op_460_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_468_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_470_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_478_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_479_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,Dn */ -uae_u32 REGPARAM2 op_480_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(An) */ -uae_u32 REGPARAM2 op_490_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_498_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,-(An) */ -uae_u32 REGPARAM2 op_4a0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_4a8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_4b0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_4b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_4b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,Dn */ -uae_u32 REGPARAM2 op_600_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(An) */ -uae_u32 REGPARAM2 op_610_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_618_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,-(An) */ -uae_u32 REGPARAM2 op_620_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_628_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_630_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_638_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_639_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,Dn */ -uae_u32 REGPARAM2 op_640_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(An) */ -uae_u32 REGPARAM2 op_650_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_658_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,-(An) */ -uae_u32 REGPARAM2 op_660_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_668_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_670_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_678_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_679_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,Dn */ -uae_u32 REGPARAM2 op_680_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(An) */ -uae_u32 REGPARAM2 op_690_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_698_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,-(An) */ -uae_u32 REGPARAM2 op_6a0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_6a8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_6b0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_6b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_6b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.L #.W,Dn */ -uae_u32 REGPARAM2 op_800_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - make_flags_live(); - jff_BTST_l_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(An) */ -uae_u32 REGPARAM2 op_810_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(An)+ */ -uae_u32 REGPARAM2 op_818_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b_imm(dst,src); - live_flags(); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,-(An) */ -uae_u32 REGPARAM2 op_820_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(d16,An) */ -uae_u32 REGPARAM2 op_828_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_830_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(xxx).W */ -uae_u32 REGPARAM2 op_838_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(xxx).L */ -uae_u32 REGPARAM2 op_839_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_83a_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_83b_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BTST_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.L #.W,Dn */ -uae_u32 REGPARAM2 op_840_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - make_flags_live(); - jff_BCHG_l_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(An) */ -uae_u32 REGPARAM2 op_850_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(An)+ */ -uae_u32 REGPARAM2 op_858_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,-(An) */ -uae_u32 REGPARAM2 op_860_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(d16,An) */ -uae_u32 REGPARAM2 op_868_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_870_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(xxx).W */ -uae_u32 REGPARAM2 op_878_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(xxx).L */ -uae_u32 REGPARAM2 op_879_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCHG_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.L #.W,Dn */ -uae_u32 REGPARAM2 op_880_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - make_flags_live(); - jff_BCLR_l_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(An) */ -uae_u32 REGPARAM2 op_890_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(An)+ */ -uae_u32 REGPARAM2 op_898_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,-(An) */ -uae_u32 REGPARAM2 op_8a0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(d16,An) */ -uae_u32 REGPARAM2 op_8a8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_8b0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(xxx).W */ -uae_u32 REGPARAM2 op_8b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(xxx).L */ -uae_u32 REGPARAM2 op_8b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BCLR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.L #.W,Dn */ -uae_u32 REGPARAM2 op_8c0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - make_flags_live(); - jff_BSET_l_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(An) */ -uae_u32 REGPARAM2 op_8d0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(An)+ */ -uae_u32 REGPARAM2 op_8d8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,-(An) */ -uae_u32 REGPARAM2 op_8e0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(d16,An) */ -uae_u32 REGPARAM2 op_8e8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_8f0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(xxx).W */ -uae_u32 REGPARAM2 op_8f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(xxx).L */ -uae_u32 REGPARAM2 op_8f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - make_flags_live(); - jff_BSET_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,Dn */ -uae_u32 REGPARAM2 op_a00_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_EOR_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(An) */ -uae_u32 REGPARAM2 op_a10_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_a18_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,-(An) */ -uae_u32 REGPARAM2 op_a20_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_a28_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_a30_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_a38_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_a39_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b_imm(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EORSR.B #.W */ -uae_u32 REGPARAM2 op_a3c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - make_flags_live(); - jff_EORSR(ARM_CCR_MAP[src & 0xF], ((src & 0x10) >> 4)); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,Dn */ -uae_u32 REGPARAM2 op_a40_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_EOR_w_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(An) */ -uae_u32 REGPARAM2 op_a50_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_a58_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,-(An) */ -uae_u32 REGPARAM2 op_a60_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_a68_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_a70_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_a78_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_a79_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w_imm(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,Dn */ -uae_u32 REGPARAM2 op_a80_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_EOR_l_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(An) */ -uae_u32 REGPARAM2 op_a90_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_a98_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,-(An) */ -uae_u32 REGPARAM2 op_aa0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_aa8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_ab0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_ab8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_ab9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l_imm(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_2 -/* CMP.B #.B,Dn */ -uae_u32 REGPARAM2 op_c00_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(An) */ -uae_u32 REGPARAM2 op_c10_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_c18_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,-(An) */ -uae_u32 REGPARAM2 op_c20_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_c28_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_c30_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_c38_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_c39_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(d16,PC) */ -uae_u32 REGPARAM2 op_c3a_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_c3b_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,Dn */ -uae_u32 REGPARAM2 op_c40_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(An) */ -uae_u32 REGPARAM2 op_c50_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_c58_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,-(An) */ -uae_u32 REGPARAM2 op_c60_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_c68_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_c70_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_c78_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_c79_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_c7a_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_c7b_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,Dn */ -uae_u32 REGPARAM2 op_c80_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(An) */ -uae_u32 REGPARAM2 op_c90_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_c98_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,-(An) */ -uae_u32 REGPARAM2 op_ca0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_ca8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_cb0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_cb8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_cb9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(d16,PC) */ -uae_u32 REGPARAM2 op_cba_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_cbb_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,Dn */ -uae_u32 REGPARAM2 op_1000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),Dn */ -uae_u32 REGPARAM2 op_1010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,Dn */ -uae_u32 REGPARAM2 op_1018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),Dn */ -uae_u32 REGPARAM2 op_1020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_1028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_1030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_1038_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_1039_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_103a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_103b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,Dn */ -uae_u32 REGPARAM2 op_103c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_b_imm(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(An) */ -uae_u32 REGPARAM2 op_1080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(An) */ -uae_u32 REGPARAM2 op_1090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(An) */ -uae_u32 REGPARAM2 op_1098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(An) */ -uae_u32 REGPARAM2 op_10a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(An) */ -uae_u32 REGPARAM2 op_10a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(An) */ -uae_u32 REGPARAM2 op_10b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(An) */ -uae_u32 REGPARAM2 op_10b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(An) */ -uae_u32 REGPARAM2 op_10b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(An) */ -uae_u32 REGPARAM2 op_10ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(An) */ -uae_u32 REGPARAM2 op_10bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(An) */ -uae_u32 REGPARAM2 op_10bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_10c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(An)+ */ -uae_u32 REGPARAM2 op_10d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(An)+ */ -uae_u32 REGPARAM2 op_10d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(An)+ */ -uae_u32 REGPARAM2 op_10e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(An)+ */ -uae_u32 REGPARAM2 op_10e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(An)+ */ -uae_u32 REGPARAM2 op_10f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(An)+ */ -uae_u32 REGPARAM2 op_10f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(An)+ */ -uae_u32 REGPARAM2 op_10f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(An)+ */ -uae_u32 REGPARAM2 op_10fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(An)+ */ -uae_u32 REGPARAM2 op_10fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_10fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,-(An) */ -uae_u32 REGPARAM2 op_1100_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),-(An) */ -uae_u32 REGPARAM2 op_1110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,-(An) */ -uae_u32 REGPARAM2 op_1118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),-(An) */ -uae_u32 REGPARAM2 op_1120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),-(An) */ -uae_u32 REGPARAM2 op_1128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),-(An) */ -uae_u32 REGPARAM2 op_1130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,-(An) */ -uae_u32 REGPARAM2 op_1138_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,-(An) */ -uae_u32 REGPARAM2 op_1139_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),-(An) */ -uae_u32 REGPARAM2 op_113a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),-(An) */ -uae_u32 REGPARAM2 op_113b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,-(An) */ -uae_u32 REGPARAM2 op_113c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_1140_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(d16,An) */ -uae_u32 REGPARAM2 op_1150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(d16,An) */ -uae_u32 REGPARAM2 op_1158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(d16,An) */ -uae_u32 REGPARAM2 op_1160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(d16,An) */ -uae_u32 REGPARAM2 op_1168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_1170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(d16,An) */ -uae_u32 REGPARAM2 op_1178_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(d16,An) */ -uae_u32 REGPARAM2 op_1179_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(d16,An) */ -uae_u32 REGPARAM2 op_117a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_117b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_117c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_1180_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_1190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_1198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_11c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(xxx).W */ -uae_u32 REGPARAM2 op_11d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(xxx).W */ -uae_u32 REGPARAM2 op_11d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(xxx).W */ -uae_u32 REGPARAM2 op_11e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(xxx).W */ -uae_u32 REGPARAM2 op_11e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_11f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(xxx).W */ -uae_u32 REGPARAM2 op_11f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(xxx).W */ -uae_u32 REGPARAM2 op_11f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(xxx).W */ -uae_u32 REGPARAM2 op_11fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_11fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_11fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_13c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(xxx).L */ -uae_u32 REGPARAM2 op_13d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(xxx).L */ -uae_u32 REGPARAM2 op_13d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(xxx).L */ -uae_u32 REGPARAM2 op_13e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(xxx).L */ -uae_u32 REGPARAM2 op_13e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_13f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(xxx).L */ -uae_u32 REGPARAM2 op_13f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(xxx).L */ -uae_u32 REGPARAM2 op_13f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(xxx).L */ -uae_u32 REGPARAM2 op_13fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_13fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_13fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_b(src); - live_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,Dn */ -uae_u32 REGPARAM2 op_2000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,Dn */ -uae_u32 REGPARAM2 op_2008_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),Dn */ -uae_u32 REGPARAM2 op_2010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,Dn */ -uae_u32 REGPARAM2 op_2018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),Dn */ -uae_u32 REGPARAM2 op_2020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_2028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_2030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_2038_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_2039_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_203a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_203b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,Dn */ -uae_u32 REGPARAM2 op_203c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l_imm(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L Dn,An */ -uae_u32 REGPARAM2 op_2040_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L An,An */ -uae_u32 REGPARAM2 op_2048_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (An),An */ -uae_u32 REGPARAM2 op_2050_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (An)+,An */ -uae_u32 REGPARAM2 op_2058_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L -(An),An */ -uae_u32 REGPARAM2 op_2060_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (d16,An),An */ -uae_u32 REGPARAM2 op_2068_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_2070_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (xxx).W,An */ -uae_u32 REGPARAM2 op_2078_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (xxx).L,An */ -uae_u32 REGPARAM2 op_2079_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (d16,PC),An */ -uae_u32 REGPARAM2 op_207a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_207b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L #.L,An */ -uae_u32 REGPARAM2 op_207c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(An) */ -uae_u32 REGPARAM2 op_2080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(An) */ -uae_u32 REGPARAM2 op_2088_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(An) */ -uae_u32 REGPARAM2 op_2090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,(An) */ -uae_u32 REGPARAM2 op_2098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(An) */ -uae_u32 REGPARAM2 op_20a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(An) */ -uae_u32 REGPARAM2 op_20a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(An) */ -uae_u32 REGPARAM2 op_20b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(An) */ -uae_u32 REGPARAM2 op_20b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(An) */ -uae_u32 REGPARAM2 op_20b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(An) */ -uae_u32 REGPARAM2 op_20ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(An) */ -uae_u32 REGPARAM2 op_20bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(An) */ -uae_u32 REGPARAM2 op_20bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_20c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(An)+ */ -uae_u32 REGPARAM2 op_20c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - if(srcreg==(uae_s32)dstreg){ - src=alloc_scratch(); - mov_l_rr(src,srcreg+8); - } - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(An)+ */ -uae_u32 REGPARAM2 op_20d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,(An)+ */ -uae_u32 REGPARAM2 op_20d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(An)+ */ -uae_u32 REGPARAM2 op_20e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(An)+ */ -uae_u32 REGPARAM2 op_20e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(An)+ */ -uae_u32 REGPARAM2 op_20f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(An)+ */ -uae_u32 REGPARAM2 op_20f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(An)+ */ -uae_u32 REGPARAM2 op_20f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(An)+ */ -uae_u32 REGPARAM2 op_20fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(An)+ */ -uae_u32 REGPARAM2 op_20fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_20fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,-(An) */ -uae_u32 REGPARAM2 op_2100_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,-(An) */ -uae_u32 REGPARAM2 op_2108_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - if(srcreg==(uae_s32)dstreg){ - src=alloc_scratch(); - mov_l_rr(src,srcreg+8); - } - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),-(An) */ -uae_u32 REGPARAM2 op_2110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,-(An) */ -uae_u32 REGPARAM2 op_2118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),-(An) */ -uae_u32 REGPARAM2 op_2120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),-(An) */ -uae_u32 REGPARAM2 op_2128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),-(An) */ -uae_u32 REGPARAM2 op_2130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,-(An) */ -uae_u32 REGPARAM2 op_2138_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,-(An) */ -uae_u32 REGPARAM2 op_2139_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),-(An) */ -uae_u32 REGPARAM2 op_213a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),-(An) */ -uae_u32 REGPARAM2 op_213b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,-(An) */ -uae_u32 REGPARAM2 op_213c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_2140_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(d16,An) */ -uae_u32 REGPARAM2 op_2148_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(d16,An) */ -uae_u32 REGPARAM2 op_2150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,(d16,An) */ -uae_u32 REGPARAM2 op_2158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(d16,An) */ -uae_u32 REGPARAM2 op_2160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(d16,An) */ -uae_u32 REGPARAM2 op_2168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_2170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(d16,An) */ -uae_u32 REGPARAM2 op_2178_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(d16,An) */ -uae_u32 REGPARAM2 op_2179_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(d16,An) */ -uae_u32 REGPARAM2 op_217a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_217b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_217c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_2180_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_2188_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_2190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_3 -/* MOVE.L (An)+,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_2198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_21c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(xxx).W */ -uae_u32 REGPARAM2 op_21c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(xxx).W */ -uae_u32 REGPARAM2 op_21d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,(xxx).W */ -uae_u32 REGPARAM2 op_21d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(xxx).W */ -uae_u32 REGPARAM2 op_21e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(xxx).W */ -uae_u32 REGPARAM2 op_21e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_21f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(xxx).W */ -uae_u32 REGPARAM2 op_21f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(xxx).W */ -uae_u32 REGPARAM2 op_21f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(xxx).W */ -uae_u32 REGPARAM2 op_21fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_21fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_21fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_23c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(xxx).L */ -uae_u32 REGPARAM2 op_23c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(xxx).L */ -uae_u32 REGPARAM2 op_23d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,(xxx).L */ -uae_u32 REGPARAM2 op_23d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(xxx).L */ -uae_u32 REGPARAM2 op_23e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(xxx).L */ -uae_u32 REGPARAM2 op_23e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_23f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(xxx).L */ -uae_u32 REGPARAM2 op_23f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(xxx).L */ -uae_u32 REGPARAM2 op_23f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(xxx).L */ -uae_u32 REGPARAM2 op_23fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_23fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_23fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_l(src); - live_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,Dn */ -uae_u32 REGPARAM2 op_3000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,Dn */ -uae_u32 REGPARAM2 op_3008_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),Dn */ -uae_u32 REGPARAM2 op_3010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,Dn */ -uae_u32 REGPARAM2 op_3018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),Dn */ -uae_u32 REGPARAM2 op_3020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_3028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_3030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_3038_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_3039_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_303a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_303b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,Dn */ -uae_u32 REGPARAM2 op_303c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_MOVE_w_imm(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W Dn,An */ -uae_u32 REGPARAM2 op_3040_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W An,An */ -uae_u32 REGPARAM2 op_3048_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (An),An */ -uae_u32 REGPARAM2 op_3050_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (An)+,An */ -uae_u32 REGPARAM2 op_3058_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W -(An),An */ -uae_u32 REGPARAM2 op_3060_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (d16,An),An */ -uae_u32 REGPARAM2 op_3068_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_3070_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (xxx).W,An */ -uae_u32 REGPARAM2 op_3078_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (xxx).L,An */ -uae_u32 REGPARAM2 op_3079_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (d16,PC),An */ -uae_u32 REGPARAM2 op_307a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_307b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W #.W,An */ -uae_u32 REGPARAM2 op_307c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(An) */ -uae_u32 REGPARAM2 op_3080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(An) */ -uae_u32 REGPARAM2 op_3088_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(An) */ -uae_u32 REGPARAM2 op_3090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(An) */ -uae_u32 REGPARAM2 op_3098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(An) */ -uae_u32 REGPARAM2 op_30a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(An) */ -uae_u32 REGPARAM2 op_30a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(An) */ -uae_u32 REGPARAM2 op_30b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(An) */ -uae_u32 REGPARAM2 op_30b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(An) */ -uae_u32 REGPARAM2 op_30b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(An) */ -uae_u32 REGPARAM2 op_30ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(An) */ -uae_u32 REGPARAM2 op_30bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(An) */ -uae_u32 REGPARAM2 op_30bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_30c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(An)+ */ -uae_u32 REGPARAM2 op_30c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - if(srcreg==(uae_s32)dstreg){ - src=alloc_scratch(); - mov_l_rr(src,srcreg+8); - } - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(An)+ */ -uae_u32 REGPARAM2 op_30d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(An)+ */ -uae_u32 REGPARAM2 op_30d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(An)+ */ -uae_u32 REGPARAM2 op_30e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(An)+ */ -uae_u32 REGPARAM2 op_30e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(An)+ */ -uae_u32 REGPARAM2 op_30f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(An)+ */ -uae_u32 REGPARAM2 op_30f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(An)+ */ -uae_u32 REGPARAM2 op_30f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(An)+ */ -uae_u32 REGPARAM2 op_30fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(An)+ */ -uae_u32 REGPARAM2 op_30fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_30fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,-(An) */ -uae_u32 REGPARAM2 op_3100_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,-(An) */ -uae_u32 REGPARAM2 op_3108_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - if(srcreg==(uae_s32)dstreg){ - src=alloc_scratch(); - mov_l_rr(src,srcreg+8); - } - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),-(An) */ -uae_u32 REGPARAM2 op_3110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,-(An) */ -uae_u32 REGPARAM2 op_3118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),-(An) */ -uae_u32 REGPARAM2 op_3120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),-(An) */ -uae_u32 REGPARAM2 op_3128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),-(An) */ -uae_u32 REGPARAM2 op_3130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,-(An) */ -uae_u32 REGPARAM2 op_3138_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,-(An) */ -uae_u32 REGPARAM2 op_3139_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),-(An) */ -uae_u32 REGPARAM2 op_313a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),-(An) */ -uae_u32 REGPARAM2 op_313b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,-(An) */ -uae_u32 REGPARAM2 op_313c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_3140_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(d16,An) */ -uae_u32 REGPARAM2 op_3148_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(d16,An) */ -uae_u32 REGPARAM2 op_3150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(d16,An) */ -uae_u32 REGPARAM2 op_3158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(d16,An) */ -uae_u32 REGPARAM2 op_3160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(d16,An) */ -uae_u32 REGPARAM2 op_3168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_3170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(d16,An) */ -uae_u32 REGPARAM2 op_3178_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(d16,An) */ -uae_u32 REGPARAM2 op_3179_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(d16,An) */ -uae_u32 REGPARAM2 op_317a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_317b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_317c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_3180_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_3188_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_3190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_3198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_31c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(xxx).W */ -uae_u32 REGPARAM2 op_31c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(xxx).W */ -uae_u32 REGPARAM2 op_31d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(xxx).W */ -uae_u32 REGPARAM2 op_31d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(xxx).W */ -uae_u32 REGPARAM2 op_31e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(xxx).W */ -uae_u32 REGPARAM2 op_31e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_31f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(xxx).W */ -uae_u32 REGPARAM2 op_31f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(xxx).W */ -uae_u32 REGPARAM2 op_31f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(xxx).W */ -uae_u32 REGPARAM2 op_31fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_31fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_31fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_33c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(xxx).L */ -uae_u32 REGPARAM2 op_33c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(xxx).L */ -uae_u32 REGPARAM2 op_33d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(xxx).L */ -uae_u32 REGPARAM2 op_33d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(xxx).L */ -uae_u32 REGPARAM2 op_33e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(xxx).L */ -uae_u32 REGPARAM2 op_33e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_33f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(xxx).L */ -uae_u32 REGPARAM2 op_33f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(xxx).L */ -uae_u32 REGPARAM2 op_33f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(xxx).L */ -uae_u32 REGPARAM2 op_33fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_33fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_33fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - jff_TST_w(src); - live_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B Dn */ -uae_u32 REGPARAM2 op_4000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jff_NEGX_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (An) */ -uae_u32 REGPARAM2 op_4010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - make_flags_live(); - jff_NEGX_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (An)+ */ -uae_u32 REGPARAM2 op_4018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - make_flags_live(); - jff_NEGX_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B -(An) */ -uae_u32 REGPARAM2 op_4020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - make_flags_live(); - jff_NEGX_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (d16,An) */ -uae_u32 REGPARAM2 op_4028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - make_flags_live(); - jff_NEGX_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - make_flags_live(); - jff_NEGX_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (xxx).W */ -uae_u32 REGPARAM2 op_4038_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - make_flags_live(); - jff_NEGX_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (xxx).L */ -uae_u32 REGPARAM2 op_4039_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - make_flags_live(); - jff_NEGX_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W Dn */ -uae_u32 REGPARAM2 op_4040_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jff_NEGX_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (An) */ -uae_u32 REGPARAM2 op_4050_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - make_flags_live(); - jff_NEGX_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (An)+ */ -uae_u32 REGPARAM2 op_4058_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - make_flags_live(); - jff_NEGX_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W -(An) */ -uae_u32 REGPARAM2 op_4060_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - make_flags_live(); - jff_NEGX_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (d16,An) */ -uae_u32 REGPARAM2 op_4068_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - make_flags_live(); - jff_NEGX_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4070_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - make_flags_live(); - jff_NEGX_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (xxx).W */ -uae_u32 REGPARAM2 op_4078_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - make_flags_live(); - jff_NEGX_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (xxx).L */ -uae_u32 REGPARAM2 op_4079_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - make_flags_live(); - jff_NEGX_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L Dn */ -uae_u32 REGPARAM2 op_4080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jff_NEGX_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (An) */ -uae_u32 REGPARAM2 op_4090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - make_flags_live(); - jff_NEGX_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (An)+ */ -uae_u32 REGPARAM2 op_4098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - make_flags_live(); - jff_NEGX_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L -(An) */ -uae_u32 REGPARAM2 op_40a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - make_flags_live(); - jff_NEGX_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (d16,An) */ -uae_u32 REGPARAM2 op_40a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - make_flags_live(); - jff_NEGX_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_40b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - make_flags_live(); - jff_NEGX_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (xxx).W */ -uae_u32 REGPARAM2 op_40b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - make_flags_live(); - jff_NEGX_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (xxx).L */ -uae_u32 REGPARAM2 op_40b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - make_flags_live(); - jff_NEGX_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (An),An */ -uae_u32 REGPARAM2 op_41d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (d16,An),An */ -uae_u32 REGPARAM2 op_41e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_41f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (xxx).W,An */ -uae_u32 REGPARAM2 op_41f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (xxx).L,An */ -uae_u32 REGPARAM2 op_41f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (d16,PC),An */ -uae_u32 REGPARAM2 op_41fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_41fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B Dn */ -uae_u32 REGPARAM2 op_4200_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_CLR_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (An) */ -uae_u32 REGPARAM2 op_4210_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (An)+ */ -uae_u32 REGPARAM2 op_4218_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_b(src); - live_flags(); - writebyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B -(An) */ -uae_u32 REGPARAM2 op_4220_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (d16,An) */ -uae_u32 REGPARAM2 op_4228_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4230_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (xxx).W */ -uae_u32 REGPARAM2 op_4238_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (xxx).L */ -uae_u32 REGPARAM2 op_4239_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W Dn */ -uae_u32 REGPARAM2 op_4240_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_CLR_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (An) */ -uae_u32 REGPARAM2 op_4250_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (An)+ */ -uae_u32 REGPARAM2 op_4258_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_w(src); - live_flags(); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W -(An) */ -uae_u32 REGPARAM2 op_4260_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (d16,An) */ -uae_u32 REGPARAM2 op_4268_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4270_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (xxx).W */ -uae_u32 REGPARAM2 op_4278_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (xxx).L */ -uae_u32 REGPARAM2 op_4279_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L Dn */ -uae_u32 REGPARAM2 op_4280_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_CLR_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (An) */ -uae_u32 REGPARAM2 op_4290_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (An)+ */ -uae_u32 REGPARAM2 op_4298_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_l(src); - live_flags(); - writelong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L -(An) */ -uae_u32 REGPARAM2 op_42a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (d16,An) */ -uae_u32 REGPARAM2 op_42a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_42b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (xxx).W */ -uae_u32 REGPARAM2 op_42b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (xxx).L */ -uae_u32 REGPARAM2 op_42b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - dont_care_flags(); - jff_CLR_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_4 -/* NEG.B Dn */ -uae_u32 REGPARAM2 op_4400_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - jff_NEG_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (An) */ -uae_u32 REGPARAM2 op_4410_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - jff_NEG_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (An)+ */ -uae_u32 REGPARAM2 op_4418_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - jff_NEG_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B -(An) */ -uae_u32 REGPARAM2 op_4420_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - jff_NEG_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (d16,An) */ -uae_u32 REGPARAM2 op_4428_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - jff_NEG_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4430_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - jff_NEG_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (xxx).W */ -uae_u32 REGPARAM2 op_4438_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - jff_NEG_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (xxx).L */ -uae_u32 REGPARAM2 op_4439_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - jff_NEG_b(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W Dn */ -uae_u32 REGPARAM2 op_4440_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - jff_NEG_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (An) */ -uae_u32 REGPARAM2 op_4450_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_NEG_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (An)+ */ -uae_u32 REGPARAM2 op_4458_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_NEG_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W -(An) */ -uae_u32 REGPARAM2 op_4460_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jff_NEG_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (d16,An) */ -uae_u32 REGPARAM2 op_4468_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_NEG_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4470_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jff_NEG_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (xxx).W */ -uae_u32 REGPARAM2 op_4478_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_NEG_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (xxx).L */ -uae_u32 REGPARAM2 op_4479_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jff_NEG_w(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L Dn */ -uae_u32 REGPARAM2 op_4480_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - jff_NEG_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (An) */ -uae_u32 REGPARAM2 op_4490_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - jff_NEG_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (An)+ */ -uae_u32 REGPARAM2 op_4498_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - jff_NEG_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L -(An) */ -uae_u32 REGPARAM2 op_44a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - jff_NEG_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (d16,An) */ -uae_u32 REGPARAM2 op_44a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - jff_NEG_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_44b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - jff_NEG_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (xxx).W */ -uae_u32 REGPARAM2 op_44b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - jff_NEG_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (xxx).L */ -uae_u32 REGPARAM2 op_44b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - jff_NEG_l(src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B Dn */ -uae_u32 REGPARAM2 op_4600_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_NOT_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (An) */ -uae_u32 REGPARAM2 op_4610_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_NOT_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (An)+ */ -uae_u32 REGPARAM2 op_4618_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_NOT_b(src); - live_flags(); - writebyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B -(An) */ -uae_u32 REGPARAM2 op_4620_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_NOT_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (d16,An) */ -uae_u32 REGPARAM2 op_4628_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_NOT_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4630_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_NOT_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (xxx).W */ -uae_u32 REGPARAM2 op_4638_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_NOT_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (xxx).L */ -uae_u32 REGPARAM2 op_4639_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_NOT_b(src); - live_flags(); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W Dn */ -uae_u32 REGPARAM2 op_4640_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_NOT_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (An) */ -uae_u32 REGPARAM2 op_4650_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_NOT_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (An)+ */ -uae_u32 REGPARAM2 op_4658_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_NOT_w(src); - live_flags(); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W -(An) */ -uae_u32 REGPARAM2 op_4660_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_NOT_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (d16,An) */ -uae_u32 REGPARAM2 op_4668_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_NOT_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4670_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_NOT_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (xxx).W */ -uae_u32 REGPARAM2 op_4678_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_NOT_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (xxx).L */ -uae_u32 REGPARAM2 op_4679_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_NOT_w(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L Dn */ -uae_u32 REGPARAM2 op_4680_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_NOT_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (An) */ -uae_u32 REGPARAM2 op_4690_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_NOT_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (An)+ */ -uae_u32 REGPARAM2 op_4698_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_NOT_l(src); - live_flags(); - writelong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L -(An) */ -uae_u32 REGPARAM2 op_46a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_NOT_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (d16,An) */ -uae_u32 REGPARAM2 op_46a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_NOT_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_46b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_NOT_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (xxx).W */ -uae_u32 REGPARAM2 op_46b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_NOT_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (xxx).L */ -uae_u32 REGPARAM2 op_46b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_NOT_l(src); - live_flags(); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LINK.L An,#.L */ -uae_u32 REGPARAM2 op_4808_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - if (srcreg==7) dodgy=1; - int src=dodgy?alloc_scratch():srcreg+8; - if (dodgy) - mov_l_rr(src,srcreg+8); - uae_s32 offs=comp_get_ilong((m68k_pc_offset+=4)-4); /* absl */ - sub_l_ri(15,4); - writelong_clobber(15,src); - if(!dodgy) - mov_l_rr(src,15); - arm_ADD_l_ri(15,offs); - if(srcreg+8!=src) - mov_l_rr(srcreg+8,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SWAP.W Dn */ -uae_u32 REGPARAM2 op_4840_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_SWAP(src); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (An) */ -uae_u32 REGPARAM2 op_4850_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; -if (srcreg==7) dodgy=1; - int srca=dodgy?alloc_scratch():srcreg+8; - if (dodgy) - mov_l_rr(srca,srcreg+8); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (d16,An) */ -uae_u32 REGPARAM2 op_4868_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; -if (srcreg==7) dodgy=1; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4870_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; -if (srcreg==7) dodgy=1; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (xxx).W */ -uae_u32 REGPARAM2 op_4878_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (xxx).L */ -uae_u32 REGPARAM2 op_4879_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (d16,PC) */ -uae_u32 REGPARAM2 op_487a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_487b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; -{ mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -}} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXT.W Dn */ -uae_u32 REGPARAM2 op_4880_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_EXT_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,(An) */ -uae_u32 REGPARAM2 op_4890_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_w(native,i,offset); - offset+=2; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writeword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,-(An) */ -uae_u32 REGPARAM2 op_48a0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - offset-=2; - jnf_MVMLE_w(native,15-i,offset); - } - } - lea_l_brr(8+dstreg,srca,(uae_s32)offset); - } else { - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - arm_SUB_l_ri8(srca,2); - writeword(srca,15-i); - } - } mov_l_rr(8+dstreg,srca); - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_48a8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - lea_l_brr(srca,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_w(native,i,offset); - offset+=2; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writeword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_48b0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_w(native,i,offset); - offset+=2; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writeword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_48b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_w(native,i,offset); - offset+=2; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writeword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_48b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_w(native,i,offset); - offset+=2; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writeword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXT.L Dn */ -uae_u32 REGPARAM2 op_48c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_EXT_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,(An) */ -uae_u32 REGPARAM2 op_48d0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_l(native,i,offset); - offset+=4; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writelong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,-(An) */ -uae_u32 REGPARAM2 op_48e0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - offset-=4; - jnf_MVMLE_l(native,15-i,offset); - } - } - lea_l_brr(8+dstreg,srca,(uae_s32)offset); - } else { - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - arm_SUB_l_ri8(srca,4); - writelong(srca,15-i); - } - } mov_l_rr(8+dstreg,srca); - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_48e8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - lea_l_brr(srca,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_l(native,i,offset); - offset+=4; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writelong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_48f0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_l(native,i,offset); - offset+=4; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writelong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_48f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_l(native,i,offset); - offset+=4; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writelong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_48f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_l(native,i,offset); - offset+=4; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writelong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXT.B Dn */ -uae_u32 REGPARAM2 op_49c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_EXT_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B Dn */ -uae_u32 REGPARAM2 op_4a00_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_TST_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (An) */ -uae_u32 REGPARAM2 op_4a10_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (An)+ */ -uae_u32 REGPARAM2 op_4a18_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B -(An) */ -uae_u32 REGPARAM2 op_4a20_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (d16,An) */ -uae_u32 REGPARAM2 op_4a28_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4a30_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (xxx).W */ -uae_u32 REGPARAM2 op_4a38_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (xxx).L */ -uae_u32 REGPARAM2 op_4a39_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (d16,PC) */ -uae_u32 REGPARAM2 op_4a3a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4a3b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B #.B */ -uae_u32 REGPARAM2 op_4a3c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_b(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W Dn */ -uae_u32 REGPARAM2 op_4a40_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W An */ -uae_u32 REGPARAM2 op_4a48_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (An) */ -uae_u32 REGPARAM2 op_4a50_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (An)+ */ -uae_u32 REGPARAM2 op_4a58_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W -(An) */ -uae_u32 REGPARAM2 op_4a60_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (d16,An) */ -uae_u32 REGPARAM2 op_4a68_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4a70_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (xxx).W */ -uae_u32 REGPARAM2 op_4a78_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (xxx).L */ -uae_u32 REGPARAM2 op_4a79_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (d16,PC) */ -uae_u32 REGPARAM2 op_4a7a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4a7b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W #.W */ -uae_u32 REGPARAM2 op_4a7c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - jff_TST_w(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L Dn */ -uae_u32 REGPARAM2 op_4a80_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L An */ -uae_u32 REGPARAM2 op_4a88_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (An) */ -uae_u32 REGPARAM2 op_4a90_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (An)+ */ -uae_u32 REGPARAM2 op_4a98_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - arm_ADD_l_ri8(srcreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L -(An) */ -uae_u32 REGPARAM2 op_4aa0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (d16,An) */ -uae_u32 REGPARAM2 op_4aa8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4ab0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (xxx).W */ -uae_u32 REGPARAM2 op_4ab8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (xxx).L */ -uae_u32 REGPARAM2 op_4ab9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (d16,PC) */ -uae_u32 REGPARAM2 op_4aba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4abb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L #.L */ -uae_u32 REGPARAM2 op_4abc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - dont_care_flags(); - jff_TST_l(src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,Dn */ -uae_u32 REGPARAM2 op_4c00_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dst=dstreg; - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(An) */ -uae_u32 REGPARAM2 op_4c10_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(An)+ */ -uae_u32 REGPARAM2 op_4c18_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,-(An) */ -uae_u32 REGPARAM2 op_4c20_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_4c28_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_4c30_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_4c38_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_4c39_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_4c3a_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4c3b_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,#.L */ -uae_u32 REGPARAM2 op_4c3c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dst=alloc_scratch(); - mov_l_ri(dst,comp_get_ilong((m68k_pc_offset+=4)-4)); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jff_MULS64(r2,r3); - } else { - jff_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jff_MULS32(r2,dst); - } else { - jff_MULU32(r2,dst); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DIVL.L #.W,Dn */ -uae_u32 REGPARAM2 op_4c40_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dst=dstreg; - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(An) */ -uae_u32 REGPARAM2 op_4c50_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(An)+ */ -uae_u32 REGPARAM2 op_4c58_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,-(An) */ -uae_u32 REGPARAM2 op_4c60_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_4c68_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_4c70_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_4c78_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_4c79_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_4c7a_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4c7b_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,#.L */ -uae_u32 REGPARAM2 op_4c7c_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dst=alloc_scratch(); - mov_l_ri(dst,comp_get_ilong((m68k_pc_offset+=4)-4)); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jff_DIVLS32(r2,dst,r3); - } else { - jff_DIVLU32(r2,dst,r3); - } - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* MVMEL.W #.W,(An) */ -uae_u32 REGPARAM2 op_4c90_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_4c98_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - if(srca != i) - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } jnf_ADD_im8(8+dstreg,srca,offset); - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - mov_l_rr(8+dstreg,tmp); - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_4ca8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - lea_l_brr(srca,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_4cb0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_4cb8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_4cb9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_4cba_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4cbb_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(An) */ -uae_u32 REGPARAM2 op_4cd0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(An)+ */ -uae_u32 REGPARAM2 op_4cd8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - if(srca != i) - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } jnf_ADD_im8(8+dstreg,srca,offset); - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - mov_l_rr(8+dstreg,tmp); - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_4ce8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - lea_l_brr(srca,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_4cf0_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_4cf8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_4cf9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_4cfa_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4cfb_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LINK.W An,#.W */ -uae_u32 REGPARAM2 op_4e50_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - if (srcreg==7) dodgy=1; - int src=dodgy?alloc_scratch():srcreg+8; - if (dodgy) - mov_l_rr(src,srcreg+8); - uae_s32 offs=(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - sub_l_ri(15,4); - writelong_clobber(15,src); - if(!dodgy) - mov_l_rr(src,15); - arm_ADD_l_ri(15,offs); - if(srcreg+8!=src) - mov_l_rr(srcreg+8,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* UNLK.L An */ -uae_u32 REGPARAM2 op_4e58_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - if(src==15){ - readlong(15,src); - } else { - mov_l_rr(15,src); - readlong(15,src); - arm_ADD_l_ri8(15,4); - } - if(srcreg+8!=src) - mov_l_rr(srcreg+8,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOP.L */ -uae_u32 REGPARAM2 op_4e71_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RTD.L #.W */ -uae_u32 REGPARAM2 op_4e74_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 offs=(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - offs+=4; -{ int newad=alloc_scratch(); - readlong(15,newad); - mov_l_mr((uintptr)®s.pc,newad); - get_n_addr_jmp(newad,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - arm_ADD_l_ri(15,offs); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RTS.L */ -uae_u32 REGPARAM2 op_4e75_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int newad=alloc_scratch(); - readlong(15,newad); - mov_l_mr((uintptr)®s.pc,newad); - get_n_addr_jmp(newad,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - arm_ADD_l_ri8(15,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (An) */ -uae_u32 REGPARAM2 op_4e90_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (d16,An) */ -uae_u32 REGPARAM2 op_4ea8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4eb0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (xxx).W */ -uae_u32 REGPARAM2 op_4eb8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (xxx).L */ -uae_u32 REGPARAM2 op_4eb9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (d16,PC) */ -uae_u32 REGPARAM2 op_4eba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4ebb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (An) */ -uae_u32 REGPARAM2 op_4ed0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (d16,An) */ -uae_u32 REGPARAM2 op_4ee8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4ef0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (xxx).W */ -uae_u32 REGPARAM2 op_4ef8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (xxx).L */ -uae_u32 REGPARAM2 op_4ef9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (d16,PC) */ -uae_u32 REGPARAM2 op_4efa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4efb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,Dn */ -uae_u32 REGPARAM2 op_5000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(An) */ -uae_u32 REGPARAM2 op_5010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(An)+ */ -uae_u32 REGPARAM2 op_5018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,-(An) */ -uae_u32 REGPARAM2 op_5020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(d16,An) */ -uae_u32 REGPARAM2 op_5028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_5030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(xxx).W */ -uae_u32 REGPARAM2 op_5038_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(xxx).L */ -uae_u32 REGPARAM2 op_5039_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,Dn */ -uae_u32 REGPARAM2 op_5040_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDAQ.W #,An */ -uae_u32 REGPARAM2 op_5048_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg+8; - jnf_ADDA_w_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(An) */ -uae_u32 REGPARAM2 op_5050_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(An)+ */ -uae_u32 REGPARAM2 op_5058_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,-(An) */ -uae_u32 REGPARAM2 op_5060_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(d16,An) */ -uae_u32 REGPARAM2 op_5068_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_5070_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(xxx).W */ -uae_u32 REGPARAM2 op_5078_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(xxx).L */ -uae_u32 REGPARAM2 op_5079_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,Dn */ -uae_u32 REGPARAM2 op_5080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDAQ.L #,An */ -uae_u32 REGPARAM2 op_5088_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg+8; - jnf_ADDA_l_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,(An) */ -uae_u32 REGPARAM2 op_5090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_5 -/* ADDQ.L #,(An)+ */ -uae_u32 REGPARAM2 op_5098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,-(An) */ -uae_u32 REGPARAM2 op_50a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,(d16,An) */ -uae_u32 REGPARAM2 op_50a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_50b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,(xxx).W */ -uae_u32 REGPARAM2 op_50b8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,(xxx).L */ -uae_u32 REGPARAM2 op_50b9_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_50c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - mov_b_ri(srcreg, 0xff); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_50c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_50d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_50d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_50e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_50e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_50f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_50f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_50f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,Dn */ -uae_u32 REGPARAM2 op_5100_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(An) */ -uae_u32 REGPARAM2 op_5110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(An)+ */ -uae_u32 REGPARAM2 op_5118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,-(An) */ -uae_u32 REGPARAM2 op_5120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(d16,An) */ -uae_u32 REGPARAM2 op_5128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_5130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(xxx).W */ -uae_u32 REGPARAM2 op_5138_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(xxx).L */ -uae_u32 REGPARAM2 op_5139_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,Dn */ -uae_u32 REGPARAM2 op_5140_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBAQ.W #,An */ -uae_u32 REGPARAM2 op_5148_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg+8; - jnf_SUBA_w_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(An) */ -uae_u32 REGPARAM2 op_5150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(An)+ */ -uae_u32 REGPARAM2 op_5158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,-(An) */ -uae_u32 REGPARAM2 op_5160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(d16,An) */ -uae_u32 REGPARAM2 op_5168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_5170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(xxx).W */ -uae_u32 REGPARAM2 op_5178_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(xxx).L */ -uae_u32 REGPARAM2 op_5179_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,Dn */ -uae_u32 REGPARAM2 op_5180_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBAQ.L #,An */ -uae_u32 REGPARAM2 op_5188_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg+8; - jnf_SUBA_l_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(An) */ -uae_u32 REGPARAM2 op_5190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(An)+ */ -uae_u32 REGPARAM2 op_5198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,-(An) */ -uae_u32 REGPARAM2 op_51a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(d16,An) */ -uae_u32 REGPARAM2 op_51a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_51b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(xxx).W */ -uae_u32 REGPARAM2 op_51b8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(xxx).L */ -uae_u32 REGPARAM2 op_51b9_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_51c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - mov_b_ri(srcreg, 0); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_51c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - sub_w_ri(src, 1); - uae_u32 v2; - uae_u32 v1=get_const(PC_P); - v2=get_const(offs); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_51d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_51d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_51e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_51e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_51f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_51f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_51f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_52c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 8); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_52c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 8); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_52d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_52d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_52e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_52e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_52f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_52f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_52f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_53c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 9); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_53c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 9); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_53d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_53d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_53e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_53e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_53f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_53f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_53f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_54c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 3); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_54c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 3); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_54d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_54d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_54e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_54e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_54f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_54f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_54f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_55c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_55c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 2); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_55d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_55d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_55e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_55e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_55f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_55f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_55f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_56c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 1); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_56c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 1); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_56d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_56d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_56e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_56e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_56f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_56f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_56f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_57c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 0); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_57c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 0); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_57d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_57d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_57e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_57e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_57f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_57f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_57f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_58c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 7); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_58c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 7); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_58d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_58d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_58e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_58e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_58f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_58f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_58f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_59c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 6); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_59c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 6); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_59d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_59d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_59e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_59e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_59f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_59f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_59f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5ac0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 5); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5ac8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 5); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5ad0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5ad8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5ae0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5ae8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5af0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5af8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5af9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5bc0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5bc8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 4); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5bd0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5bd8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5be0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5be8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5bf0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5bf8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5bf9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5cc0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 10); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5cc8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 10); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5cd0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5cd8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5ce0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5ce8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5cf0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5cf8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5cf9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5dc0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 11); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5dc8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 11); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5dd0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5dd8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5de0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5de8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5df0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5df8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5df9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5ec0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 12); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5ec8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 12); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5ed0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5ed8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5ee0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5ee8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5ef0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5ef8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5ef9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5fc0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 13); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5fc8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 13); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5fd0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5fd8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5fe0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5fe8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5ff0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5ff8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5ff9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6000_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - mov_l_rr(PC_P, src); - comp_pc_p = (uae_u8*)(uintptr)get_const(PC_P); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6001_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - mov_l_rr(PC_P, src); - comp_pc_p = (uae_u8*)(uintptr)get_const(PC_P); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_60ff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - mov_l_rr(PC_P, src); - comp_pc_p = (uae_u8*)(uintptr)get_const(PC_P); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSR.W #.W */ -uae_u32 REGPARAM2 op_6100_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - arm_ADD_l_ri(src,m68k_pc_offset_thisinst+2); - m68k_pc_offset=0; - arm_ADD_l(PC_P,src); - comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSRQ.B # */ -uae_u32 REGPARAM2 op_6101_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - arm_ADD_l_ri(src,m68k_pc_offset_thisinst+2); - m68k_pc_offset=0; - arm_ADD_l(PC_P,src); - comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSR.L #.L */ -uae_u32 REGPARAM2 op_61ff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - arm_ADD_l_ri(src,m68k_pc_offset_thisinst+2); - m68k_pc_offset=0; - arm_ADD_l(PC_P,src); - comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6200_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 8); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6201_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 8); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_62ff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 8); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_6 -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6300_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 9); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6301_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 9); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_63ff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 9); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6400_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 3); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6401_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 3); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_64ff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 3); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6500_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 2); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6501_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 2); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_65ff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 2); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6600_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 1); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6601_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 1); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_66ff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 1); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6700_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 0); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6701_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 0); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_67ff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 0); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6800_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 7); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6801_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 7); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_68ff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 7); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6900_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 6); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6901_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 6); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_69ff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 6); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6a00_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 5); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6a01_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 5); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6aff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 5); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6b00_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 4); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6b01_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 4); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6bff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 4); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6c00_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 10); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6c01_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 10); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6cff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 10); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6d00_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 11); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6d01_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 11); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6dff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 11); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6e00_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 12); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6e01_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 12); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6eff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 12); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6f00_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 13); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6f01_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 13); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6fff_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 13); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEQ.L #,Dn */ -uae_u32 REGPARAM2 op_7000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jff_MOVE_l_imm(dst, src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,Dn */ -uae_u32 REGPARAM2 op_8000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (An),Dn */ -uae_u32 REGPARAM2 op_8010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (An)+,Dn */ -uae_u32 REGPARAM2 op_8018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B -(An),Dn */ -uae_u32 REGPARAM2 op_8020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_8028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_8030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_8038_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_8039_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_803a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_803b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,Dn */ -uae_u32 REGPARAM2 op_803c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_OR_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,Dn */ -uae_u32 REGPARAM2 op_8040_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (An),Dn */ -uae_u32 REGPARAM2 op_8050_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (An)+,Dn */ -uae_u32 REGPARAM2 op_8058_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W -(An),Dn */ -uae_u32 REGPARAM2 op_8060_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_8068_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_8070_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_8078_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_8079_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_807a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_807b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,Dn */ -uae_u32 REGPARAM2 op_807c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_OR_w_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,Dn */ -uae_u32 REGPARAM2 op_8080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (An),Dn */ -uae_u32 REGPARAM2 op_8090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (An)+,Dn */ -uae_u32 REGPARAM2 op_8098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L -(An),Dn */ -uae_u32 REGPARAM2 op_80a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_80a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_80b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_80b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_80b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_80ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_80bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,Dn */ -uae_u32 REGPARAM2 op_80bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_OR_l_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DIVU.W Dn,Dn */ -uae_u32 REGPARAM2 op_80c0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=srcreg; - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (An),Dn */ -uae_u32 REGPARAM2 op_80d0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (An)+,Dn */ -uae_u32 REGPARAM2 op_80d8_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W -(An),Dn */ -uae_u32 REGPARAM2 op_80e0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_80e8_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_80f0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_80f8_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_80f9_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_80fa_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_80fb_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W #.W,Dn */ -uae_u32 REGPARAM2 op_80fc_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg; - register_possible_exception(); - jff_DIVU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* OR.B Dn,(An) */ -uae_u32 REGPARAM2 op_8110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_8118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,-(An) */ -uae_u32 REGPARAM2 op_8120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_8128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_8130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_8138_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_8139_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_OR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(An) */ -uae_u32 REGPARAM2 op_8150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_8158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,-(An) */ -uae_u32 REGPARAM2 op_8160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_8168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_8170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_8178_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_8179_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_OR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(An) */ -uae_u32 REGPARAM2 op_8190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_8198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,-(An) */ -uae_u32 REGPARAM2 op_81a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_81a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_81b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_81b8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_81b9_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_OR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DIVS.W Dn,Dn */ -uae_u32 REGPARAM2 op_81c0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=srcreg; - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (An),Dn */ -uae_u32 REGPARAM2 op_81d0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (An)+,Dn */ -uae_u32 REGPARAM2 op_81d8_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W -(An),Dn */ -uae_u32 REGPARAM2 op_81e0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_81e8_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_81f0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_81f8_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_81f9_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_81fa_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_81fb_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W #.W,Dn */ -uae_u32 REGPARAM2 op_81fc_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg; - register_possible_exception(); - jff_DIVS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* SUB.B Dn,Dn */ -uae_u32 REGPARAM2 op_9000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (An),Dn */ -uae_u32 REGPARAM2 op_9010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (An)+,Dn */ -uae_u32 REGPARAM2 op_9018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B -(An),Dn */ -uae_u32 REGPARAM2 op_9020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_9028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_9030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_9038_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_9039_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_903a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_903b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,Dn */ -uae_u32 REGPARAM2 op_903c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_SUB_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,Dn */ -uae_u32 REGPARAM2 op_9040_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W An,Dn */ -uae_u32 REGPARAM2 op_9048_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (An),Dn */ -uae_u32 REGPARAM2 op_9050_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (An)+,Dn */ -uae_u32 REGPARAM2 op_9058_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W -(An),Dn */ -uae_u32 REGPARAM2 op_9060_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_9068_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_9070_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_9078_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_9079_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_907a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_907b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,Dn */ -uae_u32 REGPARAM2 op_907c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_SUB_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,Dn */ -uae_u32 REGPARAM2 op_9080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L An,Dn */ -uae_u32 REGPARAM2 op_9088_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (An),Dn */ -uae_u32 REGPARAM2 op_9090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (An)+,Dn */ -uae_u32 REGPARAM2 op_9098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L -(An),Dn */ -uae_u32 REGPARAM2 op_90a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_90a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_90b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_90b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_90b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_90ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_90bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,Dn */ -uae_u32 REGPARAM2 op_90bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_SUB_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W Dn,An */ -uae_u32 REGPARAM2 op_90c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W An,An */ -uae_u32 REGPARAM2 op_90c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (An),An */ -uae_u32 REGPARAM2 op_90d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (An)+,An */ -uae_u32 REGPARAM2 op_90d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W -(An),An */ -uae_u32 REGPARAM2 op_90e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (d16,An),An */ -uae_u32 REGPARAM2 op_90e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_90f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (xxx).W,An */ -uae_u32 REGPARAM2 op_90f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (xxx).L,An */ -uae_u32 REGPARAM2 op_90f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (d16,PC),An */ -uae_u32 REGPARAM2 op_90fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_90fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W #.W,An */ -uae_u32 REGPARAM2 op_90fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg+8; - jnf_SUBA_w_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.B Dn,Dn */ -uae_u32 REGPARAM2 op_9100_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - make_flags_live(); - jff_SUBX_b(dst,src); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.B -(An),-(An) */ -uae_u32 REGPARAM2 op_9108_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - make_flags_live(); - jff_SUBX_b(dst,src); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(An) */ -uae_u32 REGPARAM2 op_9110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_9118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,-(An) */ -uae_u32 REGPARAM2 op_9120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_9128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_9130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_9138_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_9139_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_SUB_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.W Dn,Dn */ -uae_u32 REGPARAM2 op_9140_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - make_flags_live(); - jff_SUBX_w(dst,src); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.W -(An),-(An) */ -uae_u32 REGPARAM2 op_9148_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - make_flags_live(); - jff_SUBX_w(dst,src); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(An) */ -uae_u32 REGPARAM2 op_9150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_9158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,-(An) */ -uae_u32 REGPARAM2 op_9160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_9168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_9170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_9178_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_9179_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_SUB_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.L Dn,Dn */ -uae_u32 REGPARAM2 op_9180_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - make_flags_live(); - jff_SUBX_l(dst,src); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.L -(An),-(An) */ -uae_u32 REGPARAM2 op_9188_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - make_flags_live(); - jff_SUBX_l(dst,src); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(An) */ -uae_u32 REGPARAM2 op_9190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_9198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,-(An) */ -uae_u32 REGPARAM2 op_91a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_91a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_91b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_91b8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_91b9_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_SUB_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L Dn,An */ -uae_u32 REGPARAM2 op_91c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L An,An */ -uae_u32 REGPARAM2 op_91c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (An),An */ -uae_u32 REGPARAM2 op_91d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (An)+,An */ -uae_u32 REGPARAM2 op_91d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L -(An),An */ -uae_u32 REGPARAM2 op_91e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (d16,An),An */ -uae_u32 REGPARAM2 op_91e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_91f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (xxx).W,An */ -uae_u32 REGPARAM2 op_91f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (xxx).L,An */ -uae_u32 REGPARAM2 op_91f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (d16,PC),An */ -uae_u32 REGPARAM2 op_91fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_91fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L #.L,An */ -uae_u32 REGPARAM2 op_91fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg+8; - jnf_SUBA_l_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B Dn,Dn */ -uae_u32 REGPARAM2 op_b000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (An),Dn */ -uae_u32 REGPARAM2 op_b010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (An)+,Dn */ -uae_u32 REGPARAM2 op_b018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B -(An),Dn */ -uae_u32 REGPARAM2 op_b020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_b028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_b030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_b038_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_b039_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_b03a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_b03b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,Dn */ -uae_u32 REGPARAM2 op_b03c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_CMP_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W Dn,Dn */ -uae_u32 REGPARAM2 op_b040_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W An,Dn */ -uae_u32 REGPARAM2 op_b048_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (An),Dn */ -uae_u32 REGPARAM2 op_b050_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (An)+,Dn */ -uae_u32 REGPARAM2 op_b058_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W -(An),Dn */ -uae_u32 REGPARAM2 op_b060_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_b068_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_b070_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_b078_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_b079_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_b07a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_b07b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,Dn */ -uae_u32 REGPARAM2 op_b07c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_CMP_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L Dn,Dn */ -uae_u32 REGPARAM2 op_b080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L An,Dn */ -uae_u32 REGPARAM2 op_b088_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (An),Dn */ -uae_u32 REGPARAM2 op_b090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_7 -/* CMP.L (An)+,Dn */ -uae_u32 REGPARAM2 op_b098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L -(An),Dn */ -uae_u32 REGPARAM2 op_b0a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_b0a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_b0b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_b0b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_b0b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_b0ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_b0bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,Dn */ -uae_u32 REGPARAM2 op_b0bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_CMP_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W Dn,An */ -uae_u32 REGPARAM2 op_b0c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W An,An */ -uae_u32 REGPARAM2 op_b0c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (An),An */ -uae_u32 REGPARAM2 op_b0d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (An)+,An */ -uae_u32 REGPARAM2 op_b0d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W -(An),An */ -uae_u32 REGPARAM2 op_b0e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (d16,An),An */ -uae_u32 REGPARAM2 op_b0e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_b0f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (xxx).W,An */ -uae_u32 REGPARAM2 op_b0f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (xxx).L,An */ -uae_u32 REGPARAM2 op_b0f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (d16,PC),An */ -uae_u32 REGPARAM2 op_b0fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_b0fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W #.W,An */ -uae_u32 REGPARAM2 op_b0fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,Dn */ -uae_u32 REGPARAM2 op_b100_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_EOR_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPM.B (An)+,(An)+ */ -uae_u32 REGPARAM2 op_b108_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_CMP_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(An) */ -uae_u32 REGPARAM2 op_b110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_b118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,-(An) */ -uae_u32 REGPARAM2 op_b120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_b128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_b130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_b138_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_b139_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_EOR_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,Dn */ -uae_u32 REGPARAM2 op_b140_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_EOR_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPM.W (An)+,(An)+ */ -uae_u32 REGPARAM2 op_b148_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_CMP_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(An) */ -uae_u32 REGPARAM2 op_b150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_b158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w(dst,src); - live_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,-(An) */ -uae_u32 REGPARAM2 op_b160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_b168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_b170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_b178_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_b179_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_EOR_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,Dn */ -uae_u32 REGPARAM2 op_b180_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_EOR_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPM.L (An)+,(An)+ */ -uae_u32 REGPARAM2 op_b188_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_CMP_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(An) */ -uae_u32 REGPARAM2 op_b190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_b198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l(dst,src); - live_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,-(An) */ -uae_u32 REGPARAM2 op_b1a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_b1a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_b1b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_b1b8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_b1b9_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_EOR_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L Dn,An */ -uae_u32 REGPARAM2 op_b1c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L An,An */ -uae_u32 REGPARAM2 op_b1c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (An),An */ -uae_u32 REGPARAM2 op_b1d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (An)+,An */ -uae_u32 REGPARAM2 op_b1d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L -(An),An */ -uae_u32 REGPARAM2 op_b1e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (d16,An),An */ -uae_u32 REGPARAM2 op_b1e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_b1f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (xxx).W,An */ -uae_u32 REGPARAM2 op_b1f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (xxx).L,An */ -uae_u32 REGPARAM2 op_b1f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (d16,PC),An */ -uae_u32 REGPARAM2 op_b1fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_b1fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L #.L,An */ -uae_u32 REGPARAM2 op_b1fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg+8; - dont_care_flags(); - jff_CMPA_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,Dn */ -uae_u32 REGPARAM2 op_c000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (An),Dn */ -uae_u32 REGPARAM2 op_c010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (An)+,Dn */ -uae_u32 REGPARAM2 op_c018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B -(An),Dn */ -uae_u32 REGPARAM2 op_c020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_c028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_c030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_c038_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_c039_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_c03a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_c03b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,Dn */ -uae_u32 REGPARAM2 op_c03c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_AND_b_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,Dn */ -uae_u32 REGPARAM2 op_c040_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (An),Dn */ -uae_u32 REGPARAM2 op_c050_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (An)+,Dn */ -uae_u32 REGPARAM2 op_c058_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W -(An),Dn */ -uae_u32 REGPARAM2 op_c060_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_c068_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_c070_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_c078_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_c079_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_c07a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_c07b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,Dn */ -uae_u32 REGPARAM2 op_c07c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_AND_w_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,Dn */ -uae_u32 REGPARAM2 op_c080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (An),Dn */ -uae_u32 REGPARAM2 op_c090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (An)+,Dn */ -uae_u32 REGPARAM2 op_c098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L -(An),Dn */ -uae_u32 REGPARAM2 op_c0a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_c0a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_c0b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_c0b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_c0b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_c0ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_c0bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,Dn */ -uae_u32 REGPARAM2 op_c0bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_AND_l_imm(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W Dn,Dn */ -uae_u32 REGPARAM2 op_c0c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=srcreg; - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (An),Dn */ -uae_u32 REGPARAM2 op_c0d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (An)+,Dn */ -uae_u32 REGPARAM2 op_c0d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W -(An),Dn */ -uae_u32 REGPARAM2 op_c0e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_c0e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_c0f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_c0f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_c0f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_c0fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_c0fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W #.W,Dn */ -uae_u32 REGPARAM2 op_c0fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg; - jff_MULU(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(An) */ -uae_u32 REGPARAM2 op_c110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_c118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,-(An) */ -uae_u32 REGPARAM2 op_c120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_c128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_c130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_c138_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_c139_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_AND_b(dst,src); - live_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXG.L Dn,Dn */ -uae_u32 REGPARAM2 op_c140_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - int tmp=alloc_scratch(); - mov_l_rr(tmp,src); - if(srcreg!=dst) - mov_l_rr(srcreg,dst); - if(dstreg!=tmp) - mov_l_rr(dstreg,tmp); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXG.L An,An */ -uae_u32 REGPARAM2 op_c148_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - int tmp=alloc_scratch(); - mov_l_rr(tmp,src); - if(srcreg+8!=dst) - mov_l_rr(srcreg+8,dst); - if(dstreg+8!=tmp) - mov_l_rr(dstreg+8,tmp); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(An) */ -uae_u32 REGPARAM2 op_c150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_c158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,-(An) */ -uae_u32 REGPARAM2 op_c160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_c168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_c170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_c178_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_c179_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_AND_w(dst,src); - live_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXG.L Dn,An */ -uae_u32 REGPARAM2 op_c188_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - int tmp=alloc_scratch(); - mov_l_rr(tmp,src); - if(srcreg!=dst) - mov_l_rr(srcreg,dst); - if(dstreg+8!=tmp) - mov_l_rr(dstreg+8,tmp); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(An) */ -uae_u32 REGPARAM2 op_c190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_c198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,-(An) */ -uae_u32 REGPARAM2 op_c1a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_c1a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_c1b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_c1b8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_c1b9_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_AND_l(dst,src); - live_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W Dn,Dn */ -uae_u32 REGPARAM2 op_c1c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=srcreg; - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (An),Dn */ -uae_u32 REGPARAM2 op_c1d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (An)+,Dn */ -uae_u32 REGPARAM2 op_c1d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W -(An),Dn */ -uae_u32 REGPARAM2 op_c1e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_c1e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_c1f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_c1f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_c1f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_c1fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_c1fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W #.W,Dn */ -uae_u32 REGPARAM2 op_c1fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg; - jff_MULS(dst,src); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,Dn */ -uae_u32 REGPARAM2 op_d000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (An),Dn */ -uae_u32 REGPARAM2 op_d010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (An)+,Dn */ -uae_u32 REGPARAM2 op_d018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B -(An),Dn */ -uae_u32 REGPARAM2 op_d020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_d028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_d030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_d038_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_d039_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_d03a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_d03b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,Dn */ -uae_u32 REGPARAM2 op_d03c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_ADD_b_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,Dn */ -uae_u32 REGPARAM2 op_d040_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W An,Dn */ -uae_u32 REGPARAM2 op_d048_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (An),Dn */ -uae_u32 REGPARAM2 op_d050_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (An)+,Dn */ -uae_u32 REGPARAM2 op_d058_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W -(An),Dn */ -uae_u32 REGPARAM2 op_d060_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_d068_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_d070_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_d078_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_d079_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_d07a_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_d07b_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,Dn */ -uae_u32 REGPARAM2 op_d07c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jff_ADD_w_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,Dn */ -uae_u32 REGPARAM2 op_d080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L An,Dn */ -uae_u32 REGPARAM2 op_d088_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (An),Dn */ -uae_u32 REGPARAM2 op_d090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (An)+,Dn */ -uae_u32 REGPARAM2 op_d098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L -(An),Dn */ -uae_u32 REGPARAM2 op_d0a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_d0a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_d0b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_d0b8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_d0b9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_d0ba_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_d0bb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,Dn */ -uae_u32 REGPARAM2 op_d0bc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jff_ADD_l_imm(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W Dn,An */ -uae_u32 REGPARAM2 op_d0c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W An,An */ -uae_u32 REGPARAM2 op_d0c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (An),An */ -uae_u32 REGPARAM2 op_d0d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (An)+,An */ -uae_u32 REGPARAM2 op_d0d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W -(An),An */ -uae_u32 REGPARAM2 op_d0e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (d16,An),An */ -uae_u32 REGPARAM2 op_d0e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_d0f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (xxx).W,An */ -uae_u32 REGPARAM2 op_d0f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (xxx).L,An */ -uae_u32 REGPARAM2 op_d0f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (d16,PC),An */ -uae_u32 REGPARAM2 op_d0fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_d0fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W #.W,An */ -uae_u32 REGPARAM2 op_d0fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg+8; - jnf_ADDA_w_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.B Dn,Dn */ -uae_u32 REGPARAM2 op_d100_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - make_flags_live(); - jff_ADDX_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.B -(An),-(An) */ -uae_u32 REGPARAM2 op_d108_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - make_flags_live(); - jff_ADDX_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(An) */ -uae_u32 REGPARAM2 op_d110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_d118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,-(An) */ -uae_u32 REGPARAM2 op_d120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_d128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_d130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_d138_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_d139_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jff_ADD_b(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.W Dn,Dn */ -uae_u32 REGPARAM2 op_d140_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - make_flags_live(); - jff_ADDX_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.W -(An),-(An) */ -uae_u32 REGPARAM2 op_d148_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - make_flags_live(); - jff_ADDX_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(An) */ -uae_u32 REGPARAM2 op_d150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_d158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,-(An) */ -uae_u32 REGPARAM2 op_d160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_d168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_d170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_d178_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_d179_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jff_ADD_w(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.L Dn,Dn */ -uae_u32 REGPARAM2 op_d180_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - make_flags_live(); - jff_ADDX_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.L -(An),-(An) */ -uae_u32 REGPARAM2 op_d188_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - make_flags_live(); - jff_ADDX_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(An) */ -uae_u32 REGPARAM2 op_d190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_d198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,-(An) */ -uae_u32 REGPARAM2 op_d1a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_d1a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_d1b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_d1b8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_d1b9_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jff_ADD_l(dst,src); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L Dn,An */ -uae_u32 REGPARAM2 op_d1c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L An,An */ -uae_u32 REGPARAM2 op_d1c8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (An),An */ -uae_u32 REGPARAM2 op_d1d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (An)+,An */ -uae_u32 REGPARAM2 op_d1d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L -(An),An */ -uae_u32 REGPARAM2 op_d1e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (d16,An),An */ -uae_u32 REGPARAM2 op_d1e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_d1f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (xxx).W,An */ -uae_u32 REGPARAM2 op_d1f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (xxx).L,An */ -uae_u32 REGPARAM2 op_d1f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (d16,PC),An */ -uae_u32 REGPARAM2 op_d1fa_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_d1fb_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L #.L,An */ -uae_u32 REGPARAM2 op_d1fc_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg+8; - jnf_ADDA_l_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRQ.B #,Dn */ -uae_u32 REGPARAM2 op_e000_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASR_b_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRQ.B #,Dn */ -uae_u32 REGPARAM2 op_e008_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSR_b_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXRQ.B #,Dn */ -uae_u32 REGPARAM2 op_e010_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - make_flags_live(); - jff_ROXR_b(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORQ.B #,Dn */ -uae_u32 REGPARAM2 op_e018_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jff_ROR_b(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASR.B Dn,Dn */ -uae_u32 REGPARAM2 op_e020_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASR_b_reg(data,srcreg); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSR.B Dn,Dn */ -uae_u32 REGPARAM2 op_e028_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSR_b_reg(data,srcreg); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_8 -/* ROXR.B Dn,Dn */ -uae_u32 REGPARAM2 op_e030_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - make_flags_live(); - jff_ROXR_b(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROR.B Dn,Dn */ -uae_u32 REGPARAM2 op_e038_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jff_ROR_b(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRQ.W #,Dn */ -uae_u32 REGPARAM2 op_e040_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASR_w_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRQ.W #,Dn */ -uae_u32 REGPARAM2 op_e048_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSR_w_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXRQ.W #,Dn */ -uae_u32 REGPARAM2 op_e050_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - make_flags_live(); - jff_ROXR_w(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORQ.W #,Dn */ -uae_u32 REGPARAM2 op_e058_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jff_ROR_w(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASR.W Dn,Dn */ -uae_u32 REGPARAM2 op_e060_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASR_w_reg(data,srcreg); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSR.W Dn,Dn */ -uae_u32 REGPARAM2 op_e068_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSR_w_reg(data,srcreg); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXR.W Dn,Dn */ -uae_u32 REGPARAM2 op_e070_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - make_flags_live(); - jff_ROXR_w(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROR.W Dn,Dn */ -uae_u32 REGPARAM2 op_e078_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jff_ROR_w(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRQ.L #,Dn */ -uae_u32 REGPARAM2 op_e080_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASR_l_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRQ.L #,Dn */ -uae_u32 REGPARAM2 op_e088_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSR_l_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXRQ.L #,Dn */ -uae_u32 REGPARAM2 op_e090_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - make_flags_live(); - jff_ROXR_l(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORQ.L #,Dn */ -uae_u32 REGPARAM2 op_e098_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jff_ROR_l(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASR.L Dn,Dn */ -uae_u32 REGPARAM2 op_e0a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASR_l_reg(data,srcreg); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSR.L Dn,Dn */ -uae_u32 REGPARAM2 op_e0a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSR_l_reg(data,srcreg); - live_flags(); -if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXR.L Dn,Dn */ -uae_u32 REGPARAM2 op_e0b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - make_flags_live(); - jff_ROXR_l(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROR.L Dn,Dn */ -uae_u32 REGPARAM2 op_e0b8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jff_ROR_l(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (An) */ -uae_u32 REGPARAM2 op_e0d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_ASRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (An)+ */ -uae_u32 REGPARAM2 op_e0d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_ASRW(src); - live_flags(); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W -(An) */ -uae_u32 REGPARAM2 op_e0e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jff_ASRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (d16,An) */ -uae_u32 REGPARAM2 op_e0e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_ASRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e0f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jff_ASRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (xxx).W */ -uae_u32 REGPARAM2 op_e0f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_ASRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (xxx).L */ -uae_u32 REGPARAM2 op_e0f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jff_ASRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLQ.B #,Dn */ -uae_u32 REGPARAM2 op_e100_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASL_b_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLQ.B #,Dn */ -uae_u32 REGPARAM2 op_e108_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSL_b_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXLQ.B #,Dn */ -uae_u32 REGPARAM2 op_e110_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - make_flags_live(); - jff_ROXL_b(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLQ.B #,Dn */ -uae_u32 REGPARAM2 op_e118_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jff_ROL_b(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASL.B Dn,Dn */ -uae_u32 REGPARAM2 op_e120_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASL_b_reg(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSL.B Dn,Dn */ -uae_u32 REGPARAM2 op_e128_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSL_b_reg(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXL.B Dn,Dn */ -uae_u32 REGPARAM2 op_e130_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - make_flags_live(); - jff_ROXL_b(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROL.B Dn,Dn */ -uae_u32 REGPARAM2 op_e138_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jff_ROL_b(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLQ.W #,Dn */ -uae_u32 REGPARAM2 op_e140_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASL_w_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLQ.W #,Dn */ -uae_u32 REGPARAM2 op_e148_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSL_w_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXLQ.W #,Dn */ -uae_u32 REGPARAM2 op_e150_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - make_flags_live(); - jff_ROXL_w(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLQ.W #,Dn */ -uae_u32 REGPARAM2 op_e158_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jff_ROL_w(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASL.W Dn,Dn */ -uae_u32 REGPARAM2 op_e160_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASL_w_reg(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSL.W Dn,Dn */ -uae_u32 REGPARAM2 op_e168_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSL_w_reg(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXL.W Dn,Dn */ -uae_u32 REGPARAM2 op_e170_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - make_flags_live(); - jff_ROXL_w(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROL.W Dn,Dn */ -uae_u32 REGPARAM2 op_e178_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jff_ROL_w(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLQ.L #,Dn */ -uae_u32 REGPARAM2 op_e180_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASL_l_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLQ.L #,Dn */ -uae_u32 REGPARAM2 op_e188_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSL_l_imm(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXLQ.L #,Dn */ -uae_u32 REGPARAM2 op_e190_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - make_flags_live(); - jff_ROXL_l(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLQ.L #,Dn */ -uae_u32 REGPARAM2 op_e198_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jff_ROL_l(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASL.L Dn,Dn */ -uae_u32 REGPARAM2 op_e1a0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_ASL_l_reg(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSL.L Dn,Dn */ -uae_u32 REGPARAM2 op_e1a8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jff_LSL_l_reg(data,srcreg); - live_flags(); - if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXL.L Dn,Dn */ -uae_u32 REGPARAM2 op_e1b0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - make_flags_live(); - jff_ROXL_l(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROL.L Dn,Dn */ -uae_u32 REGPARAM2 op_e1b8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jff_ROL_l(data,cnt); - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (An) */ -uae_u32 REGPARAM2 op_e1d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_ASLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (An)+ */ -uae_u32 REGPARAM2 op_e1d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_ASLW(src); - live_flags(); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W -(An) */ -uae_u32 REGPARAM2 op_e1e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jff_ASLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (d16,An) */ -uae_u32 REGPARAM2 op_e1e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_ASLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e1f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jff_ASLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (xxx).W */ -uae_u32 REGPARAM2 op_e1f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_ASLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (xxx).L */ -uae_u32 REGPARAM2 op_e1f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jff_ASLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (An) */ -uae_u32 REGPARAM2 op_e2d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_LSRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (An)+ */ -uae_u32 REGPARAM2 op_e2d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_LSRW(src); - live_flags(); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W -(An) */ -uae_u32 REGPARAM2 op_e2e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jff_LSRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (d16,An) */ -uae_u32 REGPARAM2 op_e2e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_LSRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e2f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jff_LSRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (xxx).W */ -uae_u32 REGPARAM2 op_e2f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_LSRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (xxx).L */ -uae_u32 REGPARAM2 op_e2f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jff_LSRW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (An) */ -uae_u32 REGPARAM2 op_e3d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_LSLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (An)+ */ -uae_u32 REGPARAM2 op_e3d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_LSLW(src); - live_flags(); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W -(An) */ -uae_u32 REGPARAM2 op_e3e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jff_LSLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (d16,An) */ -uae_u32 REGPARAM2 op_e3e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_LSLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e3f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jff_LSLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (xxx).W */ -uae_u32 REGPARAM2 op_e3f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_LSLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (xxx).L */ -uae_u32 REGPARAM2 op_e3f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jff_LSLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (An) */ -uae_u32 REGPARAM2 op_e6d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_RORW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (An)+ */ -uae_u32 REGPARAM2 op_e6d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_RORW(src); - live_flags(); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W -(An) */ -uae_u32 REGPARAM2 op_e6e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jff_RORW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (d16,An) */ -uae_u32 REGPARAM2 op_e6e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_RORW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e6f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jff_RORW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (xxx).W */ -uae_u32 REGPARAM2 op_e6f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_RORW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (xxx).L */ -uae_u32 REGPARAM2 op_e6f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jff_RORW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (An) */ -uae_u32 REGPARAM2 op_e7d0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_ROLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (An)+ */ -uae_u32 REGPARAM2 op_e7d8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jff_ROLW(src); - live_flags(); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W -(An) */ -uae_u32 REGPARAM2 op_e7e0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jff_ROLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (d16,An) */ -uae_u32 REGPARAM2 op_e7e8_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_ROLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e7f0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jff_ROLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (xxx).W */ -uae_u32 REGPARAM2 op_e7f8_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jff_ROLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (xxx).L */ -uae_u32 REGPARAM2 op_e7f9_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jff_ROLW(src); - live_flags(); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BFINS.L #.W,Dn */ -uae_u32 REGPARAM2 op_efc0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dst=dstreg; - if ((extra & 0x0820) == 0x0000) { - jff_BFINS_ii(dst, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0800) { - jff_BFINS_di(dst, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jff_BFINS_id(dst, srcreg, offs, width); - } else { - jff_BFINS_dd(dst, srcreg, offs, width); - } - live_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* BFINS.L #.W,(An) */ -uae_u32 REGPARAM2 op_efd0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dsta=alloc_scratch(); - mov_l_rr(dsta,dstreg+8); - if ((extra & 0x0800) == 0x0800) { - arm_ADD_ldiv8(dsta,offs); - } - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dsta, 4); - int dst2=alloc_scratch(); - readlong(dsta,dst2); - if ((extra & 0x0820) == 0x0000) { - if(32 - offs - width >= 0) { - jff_BFINS_ii(dst, srcreg, offs, width); - } else { - jff_BFINS2_ii(dst, dst2, srcreg, offs, width); - } - } else if ((extra & 0x0820) == 0x0800) { - jff_BFINS2_di(dst, dst2, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jff_BFINS2_id(dst, dst2, srcreg, offs, width); - } else { - jff_BFINS2_dd(dst, dst2, srcreg, offs, width); - } - live_flags(); - writelong(dsta,dst2); - arm_SUB_l_ri8(dsta, 4); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* BFINS.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_efe8_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if ((extra & 0x0800) == 0x0800) { - arm_ADD_ldiv8(dsta,offs); - } - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dsta, 4); - int dst2=alloc_scratch(); - readlong(dsta,dst2); - if ((extra & 0x0820) == 0x0000) { - if(32 - offs - width >= 0) { - jff_BFINS_ii(dst, srcreg, offs, width); - } else { - jff_BFINS2_ii(dst, dst2, srcreg, offs, width); - } - } else if ((extra & 0x0820) == 0x0800) { - jff_BFINS2_di(dst, dst2, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jff_BFINS2_id(dst, dst2, srcreg, offs, width); - } else { - jff_BFINS2_dd(dst, dst2, srcreg, offs, width); - } - live_flags(); - writelong(dsta,dst2); - arm_SUB_l_ri8(dsta, 4); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* BFINS.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_eff0_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - if ((extra & 0x0800) == 0x0800) { - arm_ADD_ldiv8(dsta,offs); - } - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dsta, 4); - int dst2=alloc_scratch(); - readlong(dsta,dst2); - if ((extra & 0x0820) == 0x0000) { - if(32 - offs - width >= 0) { - jff_BFINS_ii(dst, srcreg, offs, width); - } else { - jff_BFINS2_ii(dst, dst2, srcreg, offs, width); - } - } else if ((extra & 0x0820) == 0x0800) { - jff_BFINS2_di(dst, dst2, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jff_BFINS2_id(dst, dst2, srcreg, offs, width); - } else { - jff_BFINS2_dd(dst, dst2, srcreg, offs, width); - } - live_flags(); - writelong(dsta,dst2); - arm_SUB_l_ri8(dsta, 4); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* BFINS.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_eff8_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if ((extra & 0x0800) == 0x0800) { - arm_ADD_ldiv8(dsta,offs); - } - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dsta, 4); - int dst2=alloc_scratch(); - readlong(dsta,dst2); - if ((extra & 0x0820) == 0x0000) { - if(32 - offs - width >= 0) { - jff_BFINS_ii(dst, srcreg, offs, width); - } else { - jff_BFINS2_ii(dst, dst2, srcreg, offs, width); - } - } else if ((extra & 0x0820) == 0x0800) { - jff_BFINS2_di(dst, dst2, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jff_BFINS2_id(dst, dst2, srcreg, offs, width); - } else { - jff_BFINS2_dd(dst, dst2, srcreg, offs, width); - } - live_flags(); - writelong(dsta,dst2); - arm_SUB_l_ri8(dsta, 4); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* BFINS.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_eff9_0_comp_ff(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - if ((extra & 0x0800) == 0x0800) { - arm_ADD_ldiv8(dsta,offs); - } - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dsta, 4); - int dst2=alloc_scratch(); - readlong(dsta,dst2); - if ((extra & 0x0820) == 0x0000) { - if(32 - offs - width >= 0) { - jff_BFINS_ii(dst, srcreg, offs, width); - } else { - jff_BFINS2_ii(dst, dst2, srcreg, offs, width); - } - } else if ((extra & 0x0820) == 0x0800) { - jff_BFINS2_di(dst, dst2, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jff_BFINS2_id(dst, dst2, srcreg, offs, width); - } else { - jff_BFINS2_dd(dst, dst2, srcreg, offs, width); - } - live_flags(); - writelong(dsta,dst2); - arm_SUB_l_ri8(dsta, 4); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* FPP.L #.W,Dn */ -uae_u32 REGPARAM2 op_f200_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,An */ -uae_u32 REGPARAM2 op_f208_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(An) */ -uae_u32 REGPARAM2 op_f210_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(An)+ */ -uae_u32 REGPARAM2 op_f218_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,-(An) */ -uae_u32 REGPARAM2 op_f220_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_f228_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_f230_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_f238_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_f239_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_f23a_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_f23b_0_comp_ff(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,#.L */ -uae_u32 REGPARAM2 op_f23c_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,Dn */ -uae_u32 REGPARAM2 op_f240_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(An) */ -uae_u32 REGPARAM2 op_f250_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(An)+ */ -uae_u32 REGPARAM2 op_f258_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,-(An) */ -uae_u32 REGPARAM2 op_f260_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_f268_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_f270_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_f278_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_f279_0_comp_ff(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FBccQ.L #,#.W */ -uae_u32 REGPARAM2 op_f280_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 63); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - comp_fbcc_opp(opcode); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FBccQ.L #,#.L */ -uae_u32 REGPARAM2 op_f2c0_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 63); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - comp_fbcc_opp(opcode); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* MOVE16.L (An)+,(xxx).L */ -uae_u32 REGPARAM2 op_f600_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -if (special_mem) { - FAIL(1); - return 0; -} - int srca=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - jnf_ADD_im8(srcreg + 8, srcreg + 8, 16); - jnf_MOVE16(dsta, srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* MOVE16.L (xxx).L,(An)+ */ -uae_u32 REGPARAM2 op_f608_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -if (special_mem) { - FAIL(1); - return 0; -} - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dsta=dstreg+8; - jnf_ADD_im8(dstreg + 8, dstreg + 8, 16); - jnf_MOVE16(dsta, srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* MOVE16.L (An),(xxx).L */ -uae_u32 REGPARAM2 op_f610_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -if (special_mem) { - FAIL(1); - return 0; -} - int srca=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - jnf_MOVE16(dsta, srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* MOVE16.L (xxx).L,(An) */ -uae_u32 REGPARAM2 op_f618_0_comp_ff(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -if (special_mem) { - FAIL(1); - return 0; -} - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dsta=dstreg+8; - jnf_MOVE16(dsta, srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* MOVE16.L (An)+,(An)+ */ -uae_u32 REGPARAM2 op_f620_0_comp_ff(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_s32 dstreg = 0; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -if (special_mem) { - FAIL(1); - return 0; -} -{ uae_u16 dstreg = ((comp_get_iword((m68k_pc_offset+=2)-2))>>12) & 0x07; - int srca=srcreg + 8; - int dsta=dstreg + 8; - jnf_MOVE16(dsta, srca); - if (srcreg != dstreg) - jnf_ADD_im8(srcreg + 8, srcreg + 8, 16); - jnf_ADD_im8(dstreg + 8, dstreg + 8, 16); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -#endif - - -#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) -#define PART_1 1 -#define PART_2 1 -#define PART_3 1 -#define PART_4 1 -#define PART_5 1 -#define PART_6 1 -#define PART_7 1 -#define PART_8 1 -#endif - -extern void comp_fpp_opp(); -extern void comp_fscc_opp(); -extern void comp_fbcc_opp(); - -#ifdef PART_1 -/* OR.B #.B,Dn */ -uae_u32 REGPARAM2 op_0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(An) */ -uae_u32 REGPARAM2 op_10_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_18_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b_imm(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,-(An) */ -uae_u32 REGPARAM2 op_20_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_28_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_30_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_38_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_39_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ORSR.B #.W */ -uae_u32 REGPARAM2 op_3c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,Dn */ -uae_u32 REGPARAM2 op_40_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(An) */ -uae_u32 REGPARAM2 op_50_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_58_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w_imm(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,-(An) */ -uae_u32 REGPARAM2 op_60_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_68_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_70_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_78_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_79_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,Dn */ -uae_u32 REGPARAM2 op_80_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(An) */ -uae_u32 REGPARAM2 op_90_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_98_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l_imm(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,-(An) */ -uae_u32 REGPARAM2 op_a0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_a8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_b0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.L Dn,Dn */ -uae_u32 REGPARAM2 op_100_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(An) */ -uae_u32 REGPARAM2 op_110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,-(An) */ -uae_u32 REGPARAM2 op_120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_138_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_139_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(d16,PC) */ -uae_u32 REGPARAM2 op_13a_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_13b_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B Dn,#.B */ -uae_u32 REGPARAM2 op_13c_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=alloc_scratch(); - mov_l_ri(dst,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.L Dn,Dn */ -uae_u32 REGPARAM2 op_140_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - jnf_BCHG_l(dst,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(An) */ -uae_u32 REGPARAM2 op_150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,-(An) */ -uae_u32 REGPARAM2 op_160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_178_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_179_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.L Dn,Dn */ -uae_u32 REGPARAM2 op_180_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - jnf_BCLR_l(dst,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(An) */ -uae_u32 REGPARAM2 op_190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,-(An) */ -uae_u32 REGPARAM2 op_1a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_1a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_1b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_1b8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_1b9_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.L Dn,Dn */ -uae_u32 REGPARAM2 op_1c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - jnf_BSET_l(dst,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(An) */ -uae_u32 REGPARAM2 op_1d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_1d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,-(An) */ -uae_u32 REGPARAM2 op_1e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_1e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_1f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_1f8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_1f9_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,Dn */ -uae_u32 REGPARAM2 op_200_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(An) */ -uae_u32 REGPARAM2 op_210_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_218_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b_imm(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,-(An) */ -uae_u32 REGPARAM2 op_220_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_228_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_230_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_238_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_239_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ANDSR.B #.W */ -uae_u32 REGPARAM2 op_23c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,Dn */ -uae_u32 REGPARAM2 op_240_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(An) */ -uae_u32 REGPARAM2 op_250_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_258_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w_imm(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,-(An) */ -uae_u32 REGPARAM2 op_260_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_268_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_270_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_278_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_279_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,Dn */ -uae_u32 REGPARAM2 op_280_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(An) */ -uae_u32 REGPARAM2 op_290_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_298_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l_imm(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,-(An) */ -uae_u32 REGPARAM2 op_2a0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_2a8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_2b0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_2b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_2b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,Dn */ -uae_u32 REGPARAM2 op_400_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(An) */ -uae_u32 REGPARAM2 op_410_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_418_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,-(An) */ -uae_u32 REGPARAM2 op_420_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_428_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_430_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_438_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_439_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,Dn */ -uae_u32 REGPARAM2 op_440_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(An) */ -uae_u32 REGPARAM2 op_450_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_458_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,-(An) */ -uae_u32 REGPARAM2 op_460_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_468_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_470_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_478_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_479_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,Dn */ -uae_u32 REGPARAM2 op_480_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(An) */ -uae_u32 REGPARAM2 op_490_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_498_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,-(An) */ -uae_u32 REGPARAM2 op_4a0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_4a8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_4b0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_4b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_4b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,Dn */ -uae_u32 REGPARAM2 op_600_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(An) */ -uae_u32 REGPARAM2 op_610_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_618_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,-(An) */ -uae_u32 REGPARAM2 op_620_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_628_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_630_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_638_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_639_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,Dn */ -uae_u32 REGPARAM2 op_640_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(An) */ -uae_u32 REGPARAM2 op_650_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_658_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,-(An) */ -uae_u32 REGPARAM2 op_660_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_668_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_670_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_678_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_679_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,Dn */ -uae_u32 REGPARAM2 op_680_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(An) */ -uae_u32 REGPARAM2 op_690_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_698_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,-(An) */ -uae_u32 REGPARAM2 op_6a0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_6a8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_6b0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_6b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_6b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.L #.W,Dn */ -uae_u32 REGPARAM2 op_800_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(An) */ -uae_u32 REGPARAM2 op_810_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(An)+ */ -uae_u32 REGPARAM2 op_818_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,-(An) */ -uae_u32 REGPARAM2 op_820_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(d16,An) */ -uae_u32 REGPARAM2 op_828_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_830_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(xxx).W */ -uae_u32 REGPARAM2 op_838_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(xxx).L */ -uae_u32 REGPARAM2 op_839_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_83a_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BTST.B #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_83b_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.L #.W,Dn */ -uae_u32 REGPARAM2 op_840_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - jnf_BCHG_l_imm(dst,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(An) */ -uae_u32 REGPARAM2 op_850_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(An)+ */ -uae_u32 REGPARAM2 op_858_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,-(An) */ -uae_u32 REGPARAM2 op_860_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(d16,An) */ -uae_u32 REGPARAM2 op_868_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_870_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(xxx).W */ -uae_u32 REGPARAM2 op_878_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCHG.B #.W,(xxx).L */ -uae_u32 REGPARAM2 op_879_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCHG_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.L #.W,Dn */ -uae_u32 REGPARAM2 op_880_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - jnf_BCLR_l_imm(dst,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(An) */ -uae_u32 REGPARAM2 op_890_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(An)+ */ -uae_u32 REGPARAM2 op_898_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,-(An) */ -uae_u32 REGPARAM2 op_8a0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(d16,An) */ -uae_u32 REGPARAM2 op_8a8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_8b0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(xxx).W */ -uae_u32 REGPARAM2 op_8b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BCLR.B #.W,(xxx).L */ -uae_u32 REGPARAM2 op_8b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BCLR_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.L #.W,Dn */ -uae_u32 REGPARAM2 op_8c0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - jnf_BSET_l_imm(dst,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(An) */ -uae_u32 REGPARAM2 op_8d0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(An)+ */ -uae_u32 REGPARAM2 op_8d8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,-(An) */ -uae_u32 REGPARAM2 op_8e0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(d16,An) */ -uae_u32 REGPARAM2 op_8e8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_8f0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(xxx).W */ -uae_u32 REGPARAM2 op_8f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSET.B #.W,(xxx).L */ -uae_u32 REGPARAM2 op_8f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - jnf_BSET_b_imm(dst,src); - dont_care_flags(); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,Dn */ -uae_u32 REGPARAM2 op_a00_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_EOR_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(An) */ -uae_u32 REGPARAM2 op_a10_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_a18_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b_imm(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,-(An) */ -uae_u32 REGPARAM2 op_a20_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_a28_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_a30_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_a38_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_a39_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EORSR.B #.W */ -uae_u32 REGPARAM2 op_a3c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,Dn */ -uae_u32 REGPARAM2 op_a40_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_EOR_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(An) */ -uae_u32 REGPARAM2 op_a50_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_a58_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w_imm(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,-(An) */ -uae_u32 REGPARAM2 op_a60_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_a68_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_a70_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_a78_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_a79_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,Dn */ -uae_u32 REGPARAM2 op_a80_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jnf_EOR_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(An) */ -uae_u32 REGPARAM2 op_a90_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_a98_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l_imm(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,-(An) */ -uae_u32 REGPARAM2 op_aa0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_aa8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_ab0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_ab8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_ab9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_2 -/* CMP.B #.B,Dn */ -uae_u32 REGPARAM2 op_c00_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(An) */ -uae_u32 REGPARAM2 op_c10_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_c18_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,-(An) */ -uae_u32 REGPARAM2 op_c20_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_c28_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_c30_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_c38_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_c39_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(d16,PC) */ -uae_u32 REGPARAM2 op_c3a_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_c3b_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,Dn */ -uae_u32 REGPARAM2 op_c40_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(An) */ -uae_u32 REGPARAM2 op_c50_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_c58_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,-(An) */ -uae_u32 REGPARAM2 op_c60_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_c68_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_c70_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_c78_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_c79_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_c7a_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_c7b_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,Dn */ -uae_u32 REGPARAM2 op_c80_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(An) */ -uae_u32 REGPARAM2 op_c90_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_c98_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,-(An) */ -uae_u32 REGPARAM2 op_ca0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_ca8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_cb0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_cb8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_cb9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(d16,PC) */ -uae_u32 REGPARAM2 op_cba_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_cbb_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,Dn */ -uae_u32 REGPARAM2 op_1000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),Dn */ -uae_u32 REGPARAM2 op_1010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,Dn */ -uae_u32 REGPARAM2 op_1018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),Dn */ -uae_u32 REGPARAM2 op_1020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_1028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_1030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_1038_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_1039_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_103a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_103b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,Dn */ -uae_u32 REGPARAM2 op_103c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_b_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(An) */ -uae_u32 REGPARAM2 op_1080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(An) */ -uae_u32 REGPARAM2 op_1090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(An) */ -uae_u32 REGPARAM2 op_1098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(An) */ -uae_u32 REGPARAM2 op_10a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(An) */ -uae_u32 REGPARAM2 op_10a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(An) */ -uae_u32 REGPARAM2 op_10b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(An) */ -uae_u32 REGPARAM2 op_10b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(An) */ -uae_u32 REGPARAM2 op_10b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(An) */ -uae_u32 REGPARAM2 op_10ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(An) */ -uae_u32 REGPARAM2 op_10bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(An) */ -uae_u32 REGPARAM2 op_10bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_10c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(An)+ */ -uae_u32 REGPARAM2 op_10d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(An)+ */ -uae_u32 REGPARAM2 op_10d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(An)+ */ -uae_u32 REGPARAM2 op_10e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(An)+ */ -uae_u32 REGPARAM2 op_10e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(An)+ */ -uae_u32 REGPARAM2 op_10f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(An)+ */ -uae_u32 REGPARAM2 op_10f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(An)+ */ -uae_u32 REGPARAM2 op_10f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(An)+ */ -uae_u32 REGPARAM2 op_10fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(An)+ */ -uae_u32 REGPARAM2 op_10fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(An)+ */ -uae_u32 REGPARAM2 op_10fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - dont_care_flags(); - writebyte(dsta,src); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,-(An) */ -uae_u32 REGPARAM2 op_1100_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),-(An) */ -uae_u32 REGPARAM2 op_1110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,-(An) */ -uae_u32 REGPARAM2 op_1118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),-(An) */ -uae_u32 REGPARAM2 op_1120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),-(An) */ -uae_u32 REGPARAM2 op_1128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),-(An) */ -uae_u32 REGPARAM2 op_1130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,-(An) */ -uae_u32 REGPARAM2 op_1138_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,-(An) */ -uae_u32 REGPARAM2 op_1139_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),-(An) */ -uae_u32 REGPARAM2 op_113a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),-(An) */ -uae_u32 REGPARAM2 op_113b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,-(An) */ -uae_u32 REGPARAM2 op_113c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_1140_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(d16,An) */ -uae_u32 REGPARAM2 op_1150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(d16,An) */ -uae_u32 REGPARAM2 op_1158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(d16,An) */ -uae_u32 REGPARAM2 op_1160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(d16,An) */ -uae_u32 REGPARAM2 op_1168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_1170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(d16,An) */ -uae_u32 REGPARAM2 op_1178_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(d16,An) */ -uae_u32 REGPARAM2 op_1179_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(d16,An) */ -uae_u32 REGPARAM2 op_117a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_117b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(d16,An) */ -uae_u32 REGPARAM2 op_117c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_1180_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_1190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_1198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_11bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_11c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(xxx).W */ -uae_u32 REGPARAM2 op_11d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(xxx).W */ -uae_u32 REGPARAM2 op_11d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(xxx).W */ -uae_u32 REGPARAM2 op_11e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(xxx).W */ -uae_u32 REGPARAM2 op_11e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_11f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(xxx).W */ -uae_u32 REGPARAM2 op_11f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(xxx).W */ -uae_u32 REGPARAM2 op_11f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(xxx).W */ -uae_u32 REGPARAM2 op_11fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_11fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(xxx).W */ -uae_u32 REGPARAM2 op_11fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_13c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An),(xxx).L */ -uae_u32 REGPARAM2 op_13d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (An)+,(xxx).L */ -uae_u32 REGPARAM2 op_13d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B -(An),(xxx).L */ -uae_u32 REGPARAM2 op_13e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,An),(xxx).L */ -uae_u32 REGPARAM2 op_13e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,An,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_13f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).W,(xxx).L */ -uae_u32 REGPARAM2 op_13f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (xxx).L,(xxx).L */ -uae_u32 REGPARAM2 op_13f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d16,PC),(xxx).L */ -uae_u32 REGPARAM2 op_13fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B (d8,PC,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_13fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.B #.B,(xxx).L */ -uae_u32 REGPARAM2 op_13fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writebyte(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,Dn */ -uae_u32 REGPARAM2 op_2000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,Dn */ -uae_u32 REGPARAM2 op_2008_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),Dn */ -uae_u32 REGPARAM2 op_2010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,Dn */ -uae_u32 REGPARAM2 op_2018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),Dn */ -uae_u32 REGPARAM2 op_2020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_2028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_2030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_2038_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_2039_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_203a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_203b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,Dn */ -uae_u32 REGPARAM2 op_203c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L Dn,An */ -uae_u32 REGPARAM2 op_2040_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L An,An */ -uae_u32 REGPARAM2 op_2048_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (An),An */ -uae_u32 REGPARAM2 op_2050_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (An)+,An */ -uae_u32 REGPARAM2 op_2058_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L -(An),An */ -uae_u32 REGPARAM2 op_2060_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (d16,An),An */ -uae_u32 REGPARAM2 op_2068_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_2070_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (xxx).W,An */ -uae_u32 REGPARAM2 op_2078_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (xxx).L,An */ -uae_u32 REGPARAM2 op_2079_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (d16,PC),An */ -uae_u32 REGPARAM2 op_207a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_207b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.L #.L,An */ -uae_u32 REGPARAM2 op_207c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dst=dstreg+8; - jnf_MOVEA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(An) */ -uae_u32 REGPARAM2 op_2080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(An) */ -uae_u32 REGPARAM2 op_2088_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(An) */ -uae_u32 REGPARAM2 op_2090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,(An) */ -uae_u32 REGPARAM2 op_2098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(An) */ -uae_u32 REGPARAM2 op_20a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(An) */ -uae_u32 REGPARAM2 op_20a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(An) */ -uae_u32 REGPARAM2 op_20b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(An) */ -uae_u32 REGPARAM2 op_20b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(An) */ -uae_u32 REGPARAM2 op_20b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(An) */ -uae_u32 REGPARAM2 op_20ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(An) */ -uae_u32 REGPARAM2 op_20bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(An) */ -uae_u32 REGPARAM2 op_20bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_20c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(An)+ */ -uae_u32 REGPARAM2 op_20c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - if(srcreg==(uae_s32)dstreg){ - src=alloc_scratch(); - mov_l_rr(src,srcreg+8); - } - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(An)+ */ -uae_u32 REGPARAM2 op_20d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,(An)+ */ -uae_u32 REGPARAM2 op_20d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(An)+ */ -uae_u32 REGPARAM2 op_20e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(An)+ */ -uae_u32 REGPARAM2 op_20e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(An)+ */ -uae_u32 REGPARAM2 op_20f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(An)+ */ -uae_u32 REGPARAM2 op_20f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(An)+ */ -uae_u32 REGPARAM2 op_20f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(An)+ */ -uae_u32 REGPARAM2 op_20fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(An)+ */ -uae_u32 REGPARAM2 op_20fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(An)+ */ -uae_u32 REGPARAM2 op_20fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=dstreg+8; - dont_care_flags(); - writelong(dsta,src); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,-(An) */ -uae_u32 REGPARAM2 op_2100_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,-(An) */ -uae_u32 REGPARAM2 op_2108_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - if(srcreg==(uae_s32)dstreg){ - src=alloc_scratch(); - mov_l_rr(src,srcreg+8); - } - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),-(An) */ -uae_u32 REGPARAM2 op_2110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,-(An) */ -uae_u32 REGPARAM2 op_2118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),-(An) */ -uae_u32 REGPARAM2 op_2120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),-(An) */ -uae_u32 REGPARAM2 op_2128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),-(An) */ -uae_u32 REGPARAM2 op_2130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,-(An) */ -uae_u32 REGPARAM2 op_2138_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,-(An) */ -uae_u32 REGPARAM2 op_2139_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),-(An) */ -uae_u32 REGPARAM2 op_213a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),-(An) */ -uae_u32 REGPARAM2 op_213b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,-(An) */ -uae_u32 REGPARAM2 op_213c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_2140_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(d16,An) */ -uae_u32 REGPARAM2 op_2148_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(d16,An) */ -uae_u32 REGPARAM2 op_2150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,(d16,An) */ -uae_u32 REGPARAM2 op_2158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(d16,An) */ -uae_u32 REGPARAM2 op_2160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(d16,An) */ -uae_u32 REGPARAM2 op_2168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_2170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(d16,An) */ -uae_u32 REGPARAM2 op_2178_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(d16,An) */ -uae_u32 REGPARAM2 op_2179_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(d16,An) */ -uae_u32 REGPARAM2 op_217a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_217b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(d16,An) */ -uae_u32 REGPARAM2 op_217c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_2180_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_2188_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_2190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_3 -/* MOVE.L (An)+,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_2198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_21bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_21c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(xxx).W */ -uae_u32 REGPARAM2 op_21c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(xxx).W */ -uae_u32 REGPARAM2 op_21d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,(xxx).W */ -uae_u32 REGPARAM2 op_21d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(xxx).W */ -uae_u32 REGPARAM2 op_21e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(xxx).W */ -uae_u32 REGPARAM2 op_21e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_21f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(xxx).W */ -uae_u32 REGPARAM2 op_21f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(xxx).W */ -uae_u32 REGPARAM2 op_21f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(xxx).W */ -uae_u32 REGPARAM2 op_21fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_21fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(xxx).W */ -uae_u32 REGPARAM2 op_21fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_23c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L An,(xxx).L */ -uae_u32 REGPARAM2 op_23c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An),(xxx).L */ -uae_u32 REGPARAM2 op_23d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (An)+,(xxx).L */ -uae_u32 REGPARAM2 op_23d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L -(An),(xxx).L */ -uae_u32 REGPARAM2 op_23e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,An),(xxx).L */ -uae_u32 REGPARAM2 op_23e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,An,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_23f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).W,(xxx).L */ -uae_u32 REGPARAM2 op_23f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (xxx).L,(xxx).L */ -uae_u32 REGPARAM2 op_23f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d16,PC),(xxx).L */ -uae_u32 REGPARAM2 op_23fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L (d8,PC,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_23fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.L #.L,(xxx).L */ -uae_u32 REGPARAM2 op_23fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writelong(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,Dn */ -uae_u32 REGPARAM2 op_3000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,Dn */ -uae_u32 REGPARAM2 op_3008_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),Dn */ -uae_u32 REGPARAM2 op_3010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,Dn */ -uae_u32 REGPARAM2 op_3018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),Dn */ -uae_u32 REGPARAM2 op_3020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_3028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_3030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_3038_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_3039_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_303a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_303b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,Dn */ -uae_u32 REGPARAM2 op_303c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_w_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W Dn,An */ -uae_u32 REGPARAM2 op_3040_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W An,An */ -uae_u32 REGPARAM2 op_3048_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (An),An */ -uae_u32 REGPARAM2 op_3050_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (An)+,An */ -uae_u32 REGPARAM2 op_3058_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W -(An),An */ -uae_u32 REGPARAM2 op_3060_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (d16,An),An */ -uae_u32 REGPARAM2 op_3068_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_3070_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (xxx).W,An */ -uae_u32 REGPARAM2 op_3078_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (xxx).L,An */ -uae_u32 REGPARAM2 op_3079_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (d16,PC),An */ -uae_u32 REGPARAM2 op_307a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_307b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEA.W #.W,An */ -uae_u32 REGPARAM2 op_307c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg+8; - jnf_MOVEA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(An) */ -uae_u32 REGPARAM2 op_3080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(An) */ -uae_u32 REGPARAM2 op_3088_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(An) */ -uae_u32 REGPARAM2 op_3090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(An) */ -uae_u32 REGPARAM2 op_3098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(An) */ -uae_u32 REGPARAM2 op_30a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(An) */ -uae_u32 REGPARAM2 op_30a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(An) */ -uae_u32 REGPARAM2 op_30b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(An) */ -uae_u32 REGPARAM2 op_30b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(An) */ -uae_u32 REGPARAM2 op_30b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(An) */ -uae_u32 REGPARAM2 op_30ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(An) */ -uae_u32 REGPARAM2 op_30bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(An) */ -uae_u32 REGPARAM2 op_30bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_30c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(An)+ */ -uae_u32 REGPARAM2 op_30c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - if(srcreg==(uae_s32)dstreg){ - src=alloc_scratch(); - mov_l_rr(src,srcreg+8); - } - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(An)+ */ -uae_u32 REGPARAM2 op_30d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(An)+ */ -uae_u32 REGPARAM2 op_30d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(An)+ */ -uae_u32 REGPARAM2 op_30e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(An)+ */ -uae_u32 REGPARAM2 op_30e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(An)+ */ -uae_u32 REGPARAM2 op_30f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(An)+ */ -uae_u32 REGPARAM2 op_30f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(An)+ */ -uae_u32 REGPARAM2 op_30f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(An)+ */ -uae_u32 REGPARAM2 op_30fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(An)+ */ -uae_u32 REGPARAM2 op_30fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_30fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - dont_care_flags(); - writeword(dsta,src); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,-(An) */ -uae_u32 REGPARAM2 op_3100_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,-(An) */ -uae_u32 REGPARAM2 op_3108_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - if(srcreg==(uae_s32)dstreg){ - src=alloc_scratch(); - mov_l_rr(src,srcreg+8); - } - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),-(An) */ -uae_u32 REGPARAM2 op_3110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,-(An) */ -uae_u32 REGPARAM2 op_3118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),-(An) */ -uae_u32 REGPARAM2 op_3120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),-(An) */ -uae_u32 REGPARAM2 op_3128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),-(An) */ -uae_u32 REGPARAM2 op_3130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,-(An) */ -uae_u32 REGPARAM2 op_3138_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,-(An) */ -uae_u32 REGPARAM2 op_3139_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),-(An) */ -uae_u32 REGPARAM2 op_313a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),-(An) */ -uae_u32 REGPARAM2 op_313b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,-(An) */ -uae_u32 REGPARAM2 op_313c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_3140_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(d16,An) */ -uae_u32 REGPARAM2 op_3148_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(d16,An) */ -uae_u32 REGPARAM2 op_3150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(d16,An) */ -uae_u32 REGPARAM2 op_3158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(d16,An) */ -uae_u32 REGPARAM2 op_3160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(d16,An) */ -uae_u32 REGPARAM2 op_3168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_3170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(d16,An) */ -uae_u32 REGPARAM2 op_3178_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(d16,An) */ -uae_u32 REGPARAM2 op_3179_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(d16,An) */ -uae_u32 REGPARAM2 op_317a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(d16,An) */ -uae_u32 REGPARAM2 op_317b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_317c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_3180_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_3188_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_3190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_3198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_31bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_31c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(xxx).W */ -uae_u32 REGPARAM2 op_31c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(xxx).W */ -uae_u32 REGPARAM2 op_31d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(xxx).W */ -uae_u32 REGPARAM2 op_31d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(xxx).W */ -uae_u32 REGPARAM2 op_31e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(xxx).W */ -uae_u32 REGPARAM2 op_31e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_31f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(xxx).W */ -uae_u32 REGPARAM2 op_31f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(xxx).W */ -uae_u32 REGPARAM2 op_31f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(xxx).W */ -uae_u32 REGPARAM2 op_31fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(xxx).W */ -uae_u32 REGPARAM2 op_31fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_31fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_33c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W An,(xxx).L */ -uae_u32 REGPARAM2 op_33c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An),(xxx).L */ -uae_u32 REGPARAM2 op_33d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (An)+,(xxx).L */ -uae_u32 REGPARAM2 op_33d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W -(An),(xxx).L */ -uae_u32 REGPARAM2 op_33e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,An),(xxx).L */ -uae_u32 REGPARAM2 op_33e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,An,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_33f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).W,(xxx).L */ -uae_u32 REGPARAM2 op_33f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (xxx).L,(xxx).L */ -uae_u32 REGPARAM2 op_33f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d16,PC),(xxx).L */ -uae_u32 REGPARAM2 op_33fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W (d8,PC,Xn),(xxx).L */ -uae_u32 REGPARAM2 op_33fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - release_scratch(srca); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVE.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_33fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - dont_care_flags(); - writeword(dsta,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B Dn */ -uae_u32 REGPARAM2 op_4000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - jnf_NEGX_b(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (An) */ -uae_u32 REGPARAM2 op_4010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEGX_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (An)+ */ -uae_u32 REGPARAM2 op_4018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEGX_b(src); - writebyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B -(An) */ -uae_u32 REGPARAM2 op_4020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEGX_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (d16,An) */ -uae_u32 REGPARAM2 op_4028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEGX_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEGX_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (xxx).W */ -uae_u32 REGPARAM2 op_4038_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEGX_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.B (xxx).L */ -uae_u32 REGPARAM2 op_4039_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEGX_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W Dn */ -uae_u32 REGPARAM2 op_4040_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - jnf_NEGX_w(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (An) */ -uae_u32 REGPARAM2 op_4050_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_NEGX_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (An)+ */ -uae_u32 REGPARAM2 op_4058_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_NEGX_w(src); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W -(An) */ -uae_u32 REGPARAM2 op_4060_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jnf_NEGX_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (d16,An) */ -uae_u32 REGPARAM2 op_4068_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_NEGX_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4070_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jnf_NEGX_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (xxx).W */ -uae_u32 REGPARAM2 op_4078_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_NEGX_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.W (xxx).L */ -uae_u32 REGPARAM2 op_4079_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jnf_NEGX_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L Dn */ -uae_u32 REGPARAM2 op_4080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - jnf_NEGX_l(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (An) */ -uae_u32 REGPARAM2 op_4090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEGX_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (An)+ */ -uae_u32 REGPARAM2 op_4098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEGX_l(src); - writelong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L -(An) */ -uae_u32 REGPARAM2 op_40a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEGX_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (d16,An) */ -uae_u32 REGPARAM2 op_40a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEGX_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_40b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEGX_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (xxx).W */ -uae_u32 REGPARAM2 op_40b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEGX_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEGX.L (xxx).L */ -uae_u32 REGPARAM2 op_40b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEGX_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (An),An */ -uae_u32 REGPARAM2 op_41d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (d16,An),An */ -uae_u32 REGPARAM2 op_41e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_41f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (xxx).W,An */ -uae_u32 REGPARAM2 op_41f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (xxx).L,An */ -uae_u32 REGPARAM2 op_41f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (d16,PC),An */ -uae_u32 REGPARAM2 op_41fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LEA.L (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_41fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int dst=dstreg+8; - if(dstreg+8!=srca) - mov_l_rr(dstreg+8,srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B Dn */ -uae_u32 REGPARAM2 op_4200_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jnf_CLR_b(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (An) */ -uae_u32 REGPARAM2 op_4210_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (An)+ */ -uae_u32 REGPARAM2 op_4218_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_b(src); - writebyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B -(An) */ -uae_u32 REGPARAM2 op_4220_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (d16,An) */ -uae_u32 REGPARAM2 op_4228_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4230_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (xxx).W */ -uae_u32 REGPARAM2 op_4238_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.B (xxx).L */ -uae_u32 REGPARAM2 op_4239_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W Dn */ -uae_u32 REGPARAM2 op_4240_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jnf_CLR_w(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (An) */ -uae_u32 REGPARAM2 op_4250_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (An)+ */ -uae_u32 REGPARAM2 op_4258_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_w(src); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W -(An) */ -uae_u32 REGPARAM2 op_4260_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (d16,An) */ -uae_u32 REGPARAM2 op_4268_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4270_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (xxx).W */ -uae_u32 REGPARAM2 op_4278_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.W (xxx).L */ -uae_u32 REGPARAM2 op_4279_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L Dn */ -uae_u32 REGPARAM2 op_4280_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jnf_CLR_l(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (An) */ -uae_u32 REGPARAM2 op_4290_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (An)+ */ -uae_u32 REGPARAM2 op_4298_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_l(src); - writelong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L -(An) */ -uae_u32 REGPARAM2 op_42a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (d16,An) */ -uae_u32 REGPARAM2 op_42a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_42b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (xxx).W */ -uae_u32 REGPARAM2 op_42b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CLR.L (xxx).L */ -uae_u32 REGPARAM2 op_42b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - dont_care_flags(); - jnf_CLR_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_4 -/* NEG.B Dn */ -uae_u32 REGPARAM2 op_4400_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - jnf_NEG_b(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (An) */ -uae_u32 REGPARAM2 op_4410_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEG_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (An)+ */ -uae_u32 REGPARAM2 op_4418_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEG_b(src); - writebyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B -(An) */ -uae_u32 REGPARAM2 op_4420_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEG_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (d16,An) */ -uae_u32 REGPARAM2 op_4428_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEG_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4430_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEG_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (xxx).W */ -uae_u32 REGPARAM2 op_4438_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEG_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.B (xxx).L */ -uae_u32 REGPARAM2 op_4439_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - jnf_NEG_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W Dn */ -uae_u32 REGPARAM2 op_4440_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - jnf_NEG_w(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (An) */ -uae_u32 REGPARAM2 op_4450_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_NEG_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (An)+ */ -uae_u32 REGPARAM2 op_4458_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_NEG_w(src); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W -(An) */ -uae_u32 REGPARAM2 op_4460_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jnf_NEG_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (d16,An) */ -uae_u32 REGPARAM2 op_4468_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_NEG_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4470_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jnf_NEG_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (xxx).W */ -uae_u32 REGPARAM2 op_4478_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_NEG_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.W (xxx).L */ -uae_u32 REGPARAM2 op_4479_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jnf_NEG_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L Dn */ -uae_u32 REGPARAM2 op_4480_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - jnf_NEG_l(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (An) */ -uae_u32 REGPARAM2 op_4490_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEG_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (An)+ */ -uae_u32 REGPARAM2 op_4498_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEG_l(src); - writelong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L -(An) */ -uae_u32 REGPARAM2 op_44a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEG_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (d16,An) */ -uae_u32 REGPARAM2 op_44a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEG_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_44b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEG_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (xxx).W */ -uae_u32 REGPARAM2 op_44b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEG_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NEG.L (xxx).L */ -uae_u32 REGPARAM2 op_44b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - jnf_NEG_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B Dn */ -uae_u32 REGPARAM2 op_4600_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jnf_NOT_b(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (An) */ -uae_u32 REGPARAM2 op_4610_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jnf_NOT_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (An)+ */ -uae_u32 REGPARAM2 op_4618_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jnf_NOT_b(src); - writebyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B -(An) */ -uae_u32 REGPARAM2 op_4620_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jnf_NOT_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (d16,An) */ -uae_u32 REGPARAM2 op_4628_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jnf_NOT_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4630_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jnf_NOT_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (xxx).W */ -uae_u32 REGPARAM2 op_4638_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jnf_NOT_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.B (xxx).L */ -uae_u32 REGPARAM2 op_4639_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - jnf_NOT_b(src); - writebyte(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W Dn */ -uae_u32 REGPARAM2 op_4640_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jnf_NOT_w(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (An) */ -uae_u32 REGPARAM2 op_4650_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jnf_NOT_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (An)+ */ -uae_u32 REGPARAM2 op_4658_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jnf_NOT_w(src); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W -(An) */ -uae_u32 REGPARAM2 op_4660_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jnf_NOT_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (d16,An) */ -uae_u32 REGPARAM2 op_4668_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jnf_NOT_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4670_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jnf_NOT_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (xxx).W */ -uae_u32 REGPARAM2 op_4678_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jnf_NOT_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.W (xxx).L */ -uae_u32 REGPARAM2 op_4679_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - jnf_NOT_w(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L Dn */ -uae_u32 REGPARAM2 op_4680_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jnf_NOT_l(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (An) */ -uae_u32 REGPARAM2 op_4690_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jnf_NOT_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (An)+ */ -uae_u32 REGPARAM2 op_4698_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jnf_NOT_l(src); - writelong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L -(An) */ -uae_u32 REGPARAM2 op_46a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jnf_NOT_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (d16,An) */ -uae_u32 REGPARAM2 op_46a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jnf_NOT_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_46b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jnf_NOT_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (xxx).W */ -uae_u32 REGPARAM2 op_46b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jnf_NOT_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOT.L (xxx).L */ -uae_u32 REGPARAM2 op_46b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - jnf_NOT_l(src); - writelong(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LINK.L An,#.L */ -uae_u32 REGPARAM2 op_4808_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - if (srcreg==7) dodgy=1; - int src=dodgy?alloc_scratch():srcreg+8; - if (dodgy) - mov_l_rr(src,srcreg+8); - uae_s32 offs=comp_get_ilong((m68k_pc_offset+=4)-4); /* absl */ - sub_l_ri(15,4); - writelong_clobber(15,src); - if(!dodgy) - mov_l_rr(src,15); - arm_ADD_l_ri(15,offs); - if(srcreg+8!=src) - mov_l_rr(srcreg+8,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SWAP.W Dn */ -uae_u32 REGPARAM2 op_4840_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jnf_SWAP(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (An) */ -uae_u32 REGPARAM2 op_4850_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; -if (srcreg==7) dodgy=1; - int srca=dodgy?alloc_scratch():srcreg+8; - if (dodgy) - mov_l_rr(srca,srcreg+8); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (d16,An) */ -uae_u32 REGPARAM2 op_4868_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; -if (srcreg==7) dodgy=1; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4870_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; -if (srcreg==7) dodgy=1; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (xxx).W */ -uae_u32 REGPARAM2 op_4878_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (xxx).L */ -uae_u32 REGPARAM2 op_4879_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (d16,PC) */ -uae_u32 REGPARAM2 op_487a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* PEA.L (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_487b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; -{ mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); -{ int dsta=dodgy?alloc_scratch():7+8; - arm_SUB_l_ri8(7+8,4); - if (dodgy) - mov_l_rr(dsta,8+7); - writelong(dsta,srca); -}} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXT.W Dn */ -uae_u32 REGPARAM2 op_4880_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jnf_EXT_w(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,(An) */ -uae_u32 REGPARAM2 op_4890_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_w(native,i,offset); - offset+=2; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writeword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,-(An) */ -uae_u32 REGPARAM2 op_48a0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - offset-=2; - jnf_MVMLE_w(native,15-i,offset); - } - } - lea_l_brr(8+dstreg,srca,(uae_s32)offset); - } else { - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - arm_SUB_l_ri8(srca,2); - writeword(srca,15-i); - } - } mov_l_rr(8+dstreg,srca); - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_48a8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - lea_l_brr(srca,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_w(native,i,offset); - offset+=2; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writeword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_48b0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_w(native,i,offset); - offset+=2; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writeword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_48b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_w(native,i,offset); - offset+=2; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writeword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_48b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_w(native,i,offset); - offset+=2; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writeword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXT.L Dn */ -uae_u32 REGPARAM2 op_48c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jnf_EXT_l(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,(An) */ -uae_u32 REGPARAM2 op_48d0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_l(native,i,offset); - offset+=4; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writelong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,-(An) */ -uae_u32 REGPARAM2 op_48e0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - offset-=4; - jnf_MVMLE_l(native,15-i,offset); - } - } - lea_l_brr(8+dstreg,srca,(uae_s32)offset); - } else { - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - arm_SUB_l_ri8(srca,4); - writelong(srca,15-i); - } - } mov_l_rr(8+dstreg,srca); - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_48e8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - lea_l_brr(srca,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_l(native,i,offset); - offset+=4; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writelong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_48f0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_l(native,i,offset); - offset+=4; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writelong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_48f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_l(native,i,offset); - offset+=4; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writelong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMLE.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_48f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMLE_l(native,i,offset); - offset+=4; - } - } - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - writelong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXT.B Dn */ -uae_u32 REGPARAM2 op_49c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - jnf_EXT_b(src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B Dn */ -uae_u32 REGPARAM2 op_4a00_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (An) */ -uae_u32 REGPARAM2 op_4a10_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (An)+ */ -uae_u32 REGPARAM2 op_4a18_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B -(An) */ -uae_u32 REGPARAM2 op_4a20_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (d16,An) */ -uae_u32 REGPARAM2 op_4a28_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4a30_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (xxx).W */ -uae_u32 REGPARAM2 op_4a38_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (xxx).L */ -uae_u32 REGPARAM2 op_4a39_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (d16,PC) */ -uae_u32 REGPARAM2 op_4a3a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4a3b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.B #.B */ -uae_u32 REGPARAM2 op_4a3c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W Dn */ -uae_u32 REGPARAM2 op_4a40_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W An */ -uae_u32 REGPARAM2 op_4a48_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (An) */ -uae_u32 REGPARAM2 op_4a50_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (An)+ */ -uae_u32 REGPARAM2 op_4a58_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W -(An) */ -uae_u32 REGPARAM2 op_4a60_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (d16,An) */ -uae_u32 REGPARAM2 op_4a68_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4a70_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (xxx).W */ -uae_u32 REGPARAM2 op_4a78_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (xxx).L */ -uae_u32 REGPARAM2 op_4a79_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (d16,PC) */ -uae_u32 REGPARAM2 op_4a7a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4a7b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.W #.W */ -uae_u32 REGPARAM2 op_4a7c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L Dn */ -uae_u32 REGPARAM2 op_4a80_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L An */ -uae_u32 REGPARAM2 op_4a88_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (An) */ -uae_u32 REGPARAM2 op_4a90_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (An)+ */ -uae_u32 REGPARAM2 op_4a98_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - arm_ADD_l_ri8(srcreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L -(An) */ -uae_u32 REGPARAM2 op_4aa0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (d16,An) */ -uae_u32 REGPARAM2 op_4aa8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4ab0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (xxx).W */ -uae_u32 REGPARAM2 op_4ab8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (xxx).L */ -uae_u32 REGPARAM2 op_4ab9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (d16,PC) */ -uae_u32 REGPARAM2 op_4aba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4abb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* TST.L #.L */ -uae_u32 REGPARAM2 op_4abc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - dont_care_flags(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,Dn */ -uae_u32 REGPARAM2 op_4c00_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dst=dstreg; - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(An) */ -uae_u32 REGPARAM2 op_4c10_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(An)+ */ -uae_u32 REGPARAM2 op_4c18_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,-(An) */ -uae_u32 REGPARAM2 op_4c20_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_4c28_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_4c30_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_4c38_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_4c39_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_4c3a_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4c3b_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readlong(dsta,dst); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULL.L #.W,#.L */ -uae_u32 REGPARAM2 op_4c3c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int dst=alloc_scratch(); - mov_l_ri(dst,comp_get_ilong((m68k_pc_offset+=4)-4)); - if (extra & 0x0400) { - int r3=(extra & 7); - mov_l_rr(r3,dst); - if (extra & 0x0800) { - jnf_MULS64(r2,r3); - } else { - jnf_MULU64(r2,r3); - } - } else { - if (extra & 0x0800) { - jnf_MULS32(r2,dst); - } else { - jnf_MULU32(r2,dst); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DIVL.L #.W,Dn */ -uae_u32 REGPARAM2 op_4c40_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dst=dstreg; - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(An) */ -uae_u32 REGPARAM2 op_4c50_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(An)+ */ -uae_u32 REGPARAM2 op_4c58_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,-(An) */ -uae_u32 REGPARAM2 op_4c60_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_4c68_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_4c70_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_4c78_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_4c79_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_4c7a_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(dsta,address+PC16off); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4c7b_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dsta=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - release_scratch(pctmp); - int dst=alloc_scratch(); - readlong(dsta,dst); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVL.L #.W,#.L */ -uae_u32 REGPARAM2 op_4c7c_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int r2=(extra>>12)&7; - int r3=extra&7; - int dst=alloc_scratch(); - mov_l_ri(dst,comp_get_ilong((m68k_pc_offset+=4)-4)); - register_possible_exception(); - if (extra & 0x0400) { - FAIL(1); - m68k_pc_offset=m68k_pc_offset_thisinst; - return 0; - } else { - if (extra & 0x0800) { - jnf_DIVLS32(r2,dst,r3); - } else { - jnf_DIVLU32(r2,dst,r3); - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* MVMEL.W #.W,(An) */ -uae_u32 REGPARAM2 op_4c90_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(An)+ */ -uae_u32 REGPARAM2 op_4c98_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - if(srca != i) - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } jnf_ADD_im8(8+dstreg,srca,offset); - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - mov_l_rr(8+dstreg,tmp); - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(d16,An) */ -uae_u32 REGPARAM2 op_4ca8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - lea_l_brr(srca,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_4cb0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(xxx).W */ -uae_u32 REGPARAM2 op_4cb8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(xxx).L */ -uae_u32 REGPARAM2 op_4cb9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_4cba_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.W #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4cbb_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_w(i,native,offset); - offset+=2; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readword(tmp,i); - arm_ADD_l_ri8(tmp,2); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(An) */ -uae_u32 REGPARAM2 op_4cd0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(An)+ */ -uae_u32 REGPARAM2 op_4cd8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=dstreg+8; - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - if(srca != i) - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } jnf_ADD_im8(8+dstreg,srca,offset); - } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - mov_l_rr(8+dstreg,tmp); - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_4ce8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - lea_l_brr(srca,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_4cf0_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_4cf8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_4cf9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_4cfa_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MVMEL.L #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4cfb_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); - int i; - signed char offset=0; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - if (!special_mem) { - int native=alloc_scratch(); - get_n_addr(srca,native); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - jnf_MVMEL_l(i,native,offset); - offset+=4; - } - } } else { - int tmp=alloc_scratch(); - mov_l_rr(tmp,srca); - for (i=0;i<16;i++) { - if ((mask>>i)&1) { - readlong(tmp,i); - arm_ADD_l_ri8(tmp,4); - } - } - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LINK.W An,#.W */ -uae_u32 REGPARAM2 op_4e50_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int dodgy=0; - if (srcreg==7) dodgy=1; - int src=dodgy?alloc_scratch():srcreg+8; - if (dodgy) - mov_l_rr(src,srcreg+8); - uae_s32 offs=(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - sub_l_ri(15,4); - writelong_clobber(15,src); - if(!dodgy) - mov_l_rr(src,15); - arm_ADD_l_ri(15,offs); - if(srcreg+8!=src) - mov_l_rr(srcreg+8,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* UNLK.L An */ -uae_u32 REGPARAM2 op_4e58_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - if(src==15){ - readlong(15,src); - } else { - mov_l_rr(15,src); - readlong(15,src); - arm_ADD_l_ri8(15,4); - } - if(srcreg+8!=src) - mov_l_rr(srcreg+8,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* NOP.L */ -uae_u32 REGPARAM2 op_4e71_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RTD.L #.W */ -uae_u32 REGPARAM2 op_4e74_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 offs=(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - offs+=4; -{ int newad=alloc_scratch(); - readlong(15,newad); - mov_l_mr((uintptr)®s.pc,newad); - get_n_addr_jmp(newad,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - arm_ADD_l_ri(15,offs); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RTS.L */ -uae_u32 REGPARAM2 op_4e75_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int newad=alloc_scratch(); - readlong(15,newad); - mov_l_mr((uintptr)®s.pc,newad); - get_n_addr_jmp(newad,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - arm_ADD_l_ri8(15,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (An) */ -uae_u32 REGPARAM2 op_4e90_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (d16,An) */ -uae_u32 REGPARAM2 op_4ea8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4eb0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (xxx).W */ -uae_u32 REGPARAM2 op_4eb8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (xxx).L */ -uae_u32 REGPARAM2 op_4eb9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (d16,PC) */ -uae_u32 REGPARAM2 op_4eba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JSR.L (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4ebb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (An) */ -uae_u32 REGPARAM2 op_4ed0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (d16,An) */ -uae_u32 REGPARAM2 op_4ee8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (d8,An,Xn) */ -uae_u32 REGPARAM2 op_4ef0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (xxx).W */ -uae_u32 REGPARAM2 op_4ef8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (xxx).L */ -uae_u32 REGPARAM2 op_4ef9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (d16,PC) */ -uae_u32 REGPARAM2 op_4efa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* JMP.L (d8,PC,Xn) */ -uae_u32 REGPARAM2 op_4efb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - mov_l_mr((uintptr)®s.pc,srca); - get_n_addr_jmp(srca,PC_P); - mov_l_mr((uintptr)®s.pc_oldp,PC_P); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,Dn */ -uae_u32 REGPARAM2 op_5000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(An) */ -uae_u32 REGPARAM2 op_5010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(An)+ */ -uae_u32 REGPARAM2 op_5018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,-(An) */ -uae_u32 REGPARAM2 op_5020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(d16,An) */ -uae_u32 REGPARAM2 op_5028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_5030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(xxx).W */ -uae_u32 REGPARAM2 op_5038_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.B #,(xxx).L */ -uae_u32 REGPARAM2 op_5039_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,Dn */ -uae_u32 REGPARAM2 op_5040_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDAQ.W #,An */ -uae_u32 REGPARAM2 op_5048_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg+8; - jnf_ADDA_w_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(An) */ -uae_u32 REGPARAM2 op_5050_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(An)+ */ -uae_u32 REGPARAM2 op_5058_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,-(An) */ -uae_u32 REGPARAM2 op_5060_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(d16,An) */ -uae_u32 REGPARAM2 op_5068_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_5070_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(xxx).W */ -uae_u32 REGPARAM2 op_5078_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.W #,(xxx).L */ -uae_u32 REGPARAM2 op_5079_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,Dn */ -uae_u32 REGPARAM2 op_5080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDAQ.L #,An */ -uae_u32 REGPARAM2 op_5088_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg+8; - jnf_ADDA_l_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,(An) */ -uae_u32 REGPARAM2 op_5090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_5 -/* ADDQ.L #,(An)+ */ -uae_u32 REGPARAM2 op_5098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,-(An) */ -uae_u32 REGPARAM2 op_50a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,(d16,An) */ -uae_u32 REGPARAM2 op_50a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_50b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,(xxx).W */ -uae_u32 REGPARAM2 op_50b8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDQ.L #,(xxx).L */ -uae_u32 REGPARAM2 op_50b9_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_50c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - mov_b_ri(srcreg, 0xff); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_50c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_50d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_50d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_50e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_50e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_50f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_50f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_50f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - mov_b_ri(val, 0xff); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,Dn */ -uae_u32 REGPARAM2 op_5100_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(An) */ -uae_u32 REGPARAM2 op_5110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(An)+ */ -uae_u32 REGPARAM2 op_5118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,-(An) */ -uae_u32 REGPARAM2 op_5120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(d16,An) */ -uae_u32 REGPARAM2 op_5128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_5130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(xxx).W */ -uae_u32 REGPARAM2 op_5138_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.B #,(xxx).L */ -uae_u32 REGPARAM2 op_5139_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,Dn */ -uae_u32 REGPARAM2 op_5140_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBAQ.W #,An */ -uae_u32 REGPARAM2 op_5148_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg+8; - jnf_SUBA_w_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(An) */ -uae_u32 REGPARAM2 op_5150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(An)+ */ -uae_u32 REGPARAM2 op_5158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,-(An) */ -uae_u32 REGPARAM2 op_5160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(d16,An) */ -uae_u32 REGPARAM2 op_5168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_5170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(xxx).W */ -uae_u32 REGPARAM2 op_5178_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.W #,(xxx).L */ -uae_u32 REGPARAM2 op_5179_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,Dn */ -uae_u32 REGPARAM2 op_5180_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBAQ.L #,An */ -uae_u32 REGPARAM2 op_5188_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dst=dstreg+8; - jnf_SUBA_l_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(An) */ -uae_u32 REGPARAM2 op_5190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(An)+ */ -uae_u32 REGPARAM2 op_5198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,-(An) */ -uae_u32 REGPARAM2 op_51a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(d16,An) */ -uae_u32 REGPARAM2 op_51a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_51b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(xxx).W */ -uae_u32 REGPARAM2 op_51b8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBQ.L #,(xxx).L */ -uae_u32 REGPARAM2 op_51b9_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_51c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - mov_b_ri(srcreg, 0); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_51c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - sub_w_ri(src, 1); - uae_u32 v2; - uae_u32 v1=get_const(PC_P); - v2=get_const(offs); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_51d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_51d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_51e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_51e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_51f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_51f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_51f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - mov_b_ri(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_52c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 8); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_52c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 8); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_52d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_52d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_52e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_52e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_52f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_52f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_52f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 8); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_53c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 9); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_53c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 9); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_53d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_53d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_53e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_53e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_53f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_53f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_53f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 9); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_54c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 3); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_54c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 3); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_54d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_54d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_54e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_54e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_54f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_54f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_54f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 3); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_55c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_55c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 2); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_55d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_55d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_55e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_55e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_55f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_55f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_55f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 2); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_56c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 1); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_56c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 1); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_56d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_56d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_56e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_56e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_56f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_56f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_56f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 1); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_57c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 0); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_57c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 0); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_57d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_57d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_57e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_57e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_57f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_57f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_57f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 0); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_58c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 7); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_58c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 7); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_58d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_58d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_58e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_58e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_58f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_58f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_58f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 7); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_59c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 6); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_59c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 6); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_59d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_59d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_59e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_59e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_59f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_59f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_59f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 6); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5ac0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 5); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5ac8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 5); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5ad0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5ad8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5ae0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5ae8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5af0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5af8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5af9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 5); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5bc0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5bc8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 4); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5bd0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5bd8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5be0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5be8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5bf0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5bf8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5bf9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 4); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5cc0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 10); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5cc8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 10); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5cd0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5cd8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5ce0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5ce8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5cf0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5cf8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5cf9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 10); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5dc0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 11); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5dc8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 11); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5dd0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5dd8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5de0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5de8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5df0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5df8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5df9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 11); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5ec0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 12); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5ec8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 12); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5ed0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5ed8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5ee0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5ee8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5ef0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5ef8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5ef9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 12); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B Dn */ -uae_u32 REGPARAM2 op_5fc0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - make_flags_live(); - jnf_SCC(srcreg, 13); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DBcc.W Dn,#.W */ -uae_u32 REGPARAM2 op_5fc8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int offs=alloc_scratch(); - mov_l_ri(offs,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(offs, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(offs, (uintptr)comp_pc_p); - arm_ADD_l_ri(offs, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset=0; - make_flags_live(); - uae_u32 v1=get_const(PC_P); - uae_u32 v2=get_const(offs); - jff_DBCC(src, 13); - register_branch(v1, v2, 2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An) */ -uae_u32 REGPARAM2 op_5fd0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (An)+ */ -uae_u32 REGPARAM2 op_5fd8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B -(An) */ -uae_u32 REGPARAM2 op_5fe0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d16,An) */ -uae_u32 REGPARAM2 op_5fe8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (d8,An,Xn) */ -uae_u32 REGPARAM2 op_5ff0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).W */ -uae_u32 REGPARAM2 op_5ff8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Scc.B (xxx).L */ -uae_u32 REGPARAM2 op_5ff9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int val=alloc_scratch(); - make_flags_live(); - jnf_SCC(val, 13); - writebyte(srca,val); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6000_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - mov_l_rr(PC_P, src); - comp_pc_p = (uae_u8*)(uintptr)get_const(PC_P); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6001_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - mov_l_rr(PC_P, src); - comp_pc_p = (uae_u8*)(uintptr)get_const(PC_P); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_60ff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - mov_l_rr(PC_P, src); - comp_pc_p = (uae_u8*)(uintptr)get_const(PC_P); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSR.W #.W */ -uae_u32 REGPARAM2 op_6100_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - arm_ADD_l_ri(src,m68k_pc_offset_thisinst+2); - m68k_pc_offset=0; - arm_ADD_l(PC_P,src); - comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSRQ.B # */ -uae_u32 REGPARAM2 op_6101_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - arm_ADD_l_ri(src,m68k_pc_offset_thisinst+2); - m68k_pc_offset=0; - arm_ADD_l(PC_P,src); - comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BSR.L #.L */ -uae_u32 REGPARAM2 op_61ff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); -{ uae_u32 retadd=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - int ret=alloc_scratch(); - mov_l_ri(ret,retadd); - sub_l_ri(15,4); - writelong_clobber(15,ret); - arm_ADD_l_ri(src,m68k_pc_offset_thisinst+2); - m68k_pc_offset=0; - arm_ADD_l(PC_P,src); - comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6200_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 8); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6201_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 8); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_62ff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 8); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_6 -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6300_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 9); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6301_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 9); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_63ff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 9); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6400_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 3); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6401_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 3); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_64ff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 3); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6500_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 2); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6501_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 2); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_65ff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 2); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6600_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 1); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6601_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 1); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_66ff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 1); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6700_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 0); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6701_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 0); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_67ff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 0); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6800_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 7); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6801_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 7); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_68ff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 7); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6900_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 6); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6901_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 6); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_69ff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 6); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6a00_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 5); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6a01_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 5); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6aff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 5); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6b00_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 4); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6b01_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 4); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6bff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 4); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6c00_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 10); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6c01_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 10); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6cff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 10); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6d00_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 11); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6d01_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 11); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6dff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 11); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6e00_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 12); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6e01_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 12); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6eff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 12); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.W #.W */ -uae_u32 REGPARAM2 op_6f00_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 13); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BccQ.B # */ -uae_u32 REGPARAM2 op_6f01_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 13); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* Bcc.L #.L */ -uae_u32 REGPARAM2 op_6fff_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_u32 v1, v2; - int src=alloc_scratch(); - mov_l_ri(src,comp_get_ilong((m68k_pc_offset+=4)-4)); - sub_l_ri(src, m68k_pc_offset - m68k_pc_offset_thisinst - 2); - arm_ADD_l_ri(src, (uintptr)comp_pc_p); - mov_l_ri(PC_P, (uintptr)comp_pc_p); - arm_ADD_l_ri(src, m68k_pc_offset); - arm_ADD_l_ri(PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - v1 = get_const(PC_P); - v2 = get_const(src); - register_branch(v1, v2, 13); - make_flags_live(); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MOVEQ.L #,Dn */ -uae_u32 REGPARAM2 op_7000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=alloc_scratch(); - mov_l_ri(src,srcreg); - int dst=dstreg; - dont_care_flags(); - jnf_MOVE_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,Dn */ -uae_u32 REGPARAM2 op_8000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_OR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (An),Dn */ -uae_u32 REGPARAM2 op_8010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (An)+,Dn */ -uae_u32 REGPARAM2 op_8018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B -(An),Dn */ -uae_u32 REGPARAM2 op_8020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_8028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_8030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_8038_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_8039_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_803a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_803b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B #.B,Dn */ -uae_u32 REGPARAM2 op_803c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_OR_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,Dn */ -uae_u32 REGPARAM2 op_8040_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_OR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (An),Dn */ -uae_u32 REGPARAM2 op_8050_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (An)+,Dn */ -uae_u32 REGPARAM2 op_8058_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W -(An),Dn */ -uae_u32 REGPARAM2 op_8060_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_8068_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_8070_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_8078_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_8079_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_807a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_807b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W #.W,Dn */ -uae_u32 REGPARAM2 op_807c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_OR_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,Dn */ -uae_u32 REGPARAM2 op_8080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_OR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (An),Dn */ -uae_u32 REGPARAM2 op_8090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (An)+,Dn */ -uae_u32 REGPARAM2 op_8098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L -(An),Dn */ -uae_u32 REGPARAM2 op_80a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_80a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_80b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_80b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_80b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_80ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_80bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L #.L,Dn */ -uae_u32 REGPARAM2 op_80bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jnf_OR_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DIVU.W Dn,Dn */ -uae_u32 REGPARAM2 op_80c0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=srcreg; - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (An),Dn */ -uae_u32 REGPARAM2 op_80d0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (An)+,Dn */ -uae_u32 REGPARAM2 op_80d8_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W -(An),Dn */ -uae_u32 REGPARAM2 op_80e0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_80e8_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_80f0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_80f8_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_80f9_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_80fa_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_80fb_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVU.W #.W,Dn */ -uae_u32 REGPARAM2 op_80fc_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg; - register_possible_exception(); - jnf_DIVU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* OR.B Dn,(An) */ -uae_u32 REGPARAM2 op_8110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_8118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,-(An) */ -uae_u32 REGPARAM2 op_8120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_8128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_8130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_8138_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_8139_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_OR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(An) */ -uae_u32 REGPARAM2 op_8150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_8158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,-(An) */ -uae_u32 REGPARAM2 op_8160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_8168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_8170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_8178_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_8179_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_OR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(An) */ -uae_u32 REGPARAM2 op_8190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_8198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,-(An) */ -uae_u32 REGPARAM2 op_81a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_81a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_81b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_81b8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* OR.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_81b9_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_OR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* DIVS.W Dn,Dn */ -uae_u32 REGPARAM2 op_81c0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=srcreg; - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (An),Dn */ -uae_u32 REGPARAM2 op_81d0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (An)+,Dn */ -uae_u32 REGPARAM2 op_81d8_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W -(An),Dn */ -uae_u32 REGPARAM2 op_81e0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_81e8_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_81f0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_81f8_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_81f9_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_81fa_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_81fb_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* DIVS.W #.W,Dn */ -uae_u32 REGPARAM2 op_81fc_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg; - register_possible_exception(); - jnf_DIVS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* SUB.B Dn,Dn */ -uae_u32 REGPARAM2 op_9000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (An),Dn */ -uae_u32 REGPARAM2 op_9010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (An)+,Dn */ -uae_u32 REGPARAM2 op_9018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B -(An),Dn */ -uae_u32 REGPARAM2 op_9020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_9028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_9030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_9038_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_9039_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_903a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_903b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B #.B,Dn */ -uae_u32 REGPARAM2 op_903c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,Dn */ -uae_u32 REGPARAM2 op_9040_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W An,Dn */ -uae_u32 REGPARAM2 op_9048_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (An),Dn */ -uae_u32 REGPARAM2 op_9050_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (An)+,Dn */ -uae_u32 REGPARAM2 op_9058_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W -(An),Dn */ -uae_u32 REGPARAM2 op_9060_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_9068_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_9070_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_9078_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_9079_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_907a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_907b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W #.W,Dn */ -uae_u32 REGPARAM2 op_907c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,Dn */ -uae_u32 REGPARAM2 op_9080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L An,Dn */ -uae_u32 REGPARAM2 op_9088_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (An),Dn */ -uae_u32 REGPARAM2 op_9090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (An)+,Dn */ -uae_u32 REGPARAM2 op_9098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L -(An),Dn */ -uae_u32 REGPARAM2 op_90a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_90a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_90b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_90b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_90b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_90ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_90bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L #.L,Dn */ -uae_u32 REGPARAM2 op_90bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jnf_SUB_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W Dn,An */ -uae_u32 REGPARAM2 op_90c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W An,An */ -uae_u32 REGPARAM2 op_90c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (An),An */ -uae_u32 REGPARAM2 op_90d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (An)+,An */ -uae_u32 REGPARAM2 op_90d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W -(An),An */ -uae_u32 REGPARAM2 op_90e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (d16,An),An */ -uae_u32 REGPARAM2 op_90e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_90f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (xxx).W,An */ -uae_u32 REGPARAM2 op_90f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (xxx).L,An */ -uae_u32 REGPARAM2 op_90f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (d16,PC),An */ -uae_u32 REGPARAM2 op_90fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_90fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_SUBA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.W #.W,An */ -uae_u32 REGPARAM2 op_90fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg+8; - jnf_SUBA_w_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.B Dn,Dn */ -uae_u32 REGPARAM2 op_9100_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_SUBX_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.B -(An),-(An) */ -uae_u32 REGPARAM2 op_9108_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUBX_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(An) */ -uae_u32 REGPARAM2 op_9110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_9118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,-(An) */ -uae_u32 REGPARAM2 op_9120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_9128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_9130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_9138_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_9139_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_SUB_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.W Dn,Dn */ -uae_u32 REGPARAM2 op_9140_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_SUBX_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.W -(An),-(An) */ -uae_u32 REGPARAM2 op_9148_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUBX_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(An) */ -uae_u32 REGPARAM2 op_9150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_9158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,-(An) */ -uae_u32 REGPARAM2 op_9160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_9168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_9170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_9178_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_9179_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_SUB_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.L Dn,Dn */ -uae_u32 REGPARAM2 op_9180_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_SUBX_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBX.L -(An),-(An) */ -uae_u32 REGPARAM2 op_9188_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUBX_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(An) */ -uae_u32 REGPARAM2 op_9190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_9198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,-(An) */ -uae_u32 REGPARAM2 op_91a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_91a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_91b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_91b8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUB.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_91b9_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_SUB_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L Dn,An */ -uae_u32 REGPARAM2 op_91c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L An,An */ -uae_u32 REGPARAM2 op_91c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (An),An */ -uae_u32 REGPARAM2 op_91d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (An)+,An */ -uae_u32 REGPARAM2 op_91d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L -(An),An */ -uae_u32 REGPARAM2 op_91e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (d16,An),An */ -uae_u32 REGPARAM2 op_91e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_91f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (xxx).W,An */ -uae_u32 REGPARAM2 op_91f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (xxx).L,An */ -uae_u32 REGPARAM2 op_91f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (d16,PC),An */ -uae_u32 REGPARAM2 op_91fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_91fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_SUBA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* SUBA.L #.L,An */ -uae_u32 REGPARAM2 op_91fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg+8; - jnf_SUBA_l_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B Dn,Dn */ -uae_u32 REGPARAM2 op_b000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (An),Dn */ -uae_u32 REGPARAM2 op_b010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (An)+,Dn */ -uae_u32 REGPARAM2 op_b018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B -(An),Dn */ -uae_u32 REGPARAM2 op_b020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_b028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_b030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_b038_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_b039_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_b03a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_b03b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.B #.B,Dn */ -uae_u32 REGPARAM2 op_b03c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W Dn,Dn */ -uae_u32 REGPARAM2 op_b040_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W An,Dn */ -uae_u32 REGPARAM2 op_b048_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (An),Dn */ -uae_u32 REGPARAM2 op_b050_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (An)+,Dn */ -uae_u32 REGPARAM2 op_b058_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W -(An),Dn */ -uae_u32 REGPARAM2 op_b060_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_b068_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_b070_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_b078_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_b079_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_b07a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_b07b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.W #.W,Dn */ -uae_u32 REGPARAM2 op_b07c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L Dn,Dn */ -uae_u32 REGPARAM2 op_b080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L An,Dn */ -uae_u32 REGPARAM2 op_b088_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (An),Dn */ -uae_u32 REGPARAM2 op_b090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_7 -/* CMP.L (An)+,Dn */ -uae_u32 REGPARAM2 op_b098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L -(An),Dn */ -uae_u32 REGPARAM2 op_b0a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_b0a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_b0b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_b0b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_b0b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_b0ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_b0bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMP.L #.L,Dn */ -uae_u32 REGPARAM2 op_b0bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W Dn,An */ -uae_u32 REGPARAM2 op_b0c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W An,An */ -uae_u32 REGPARAM2 op_b0c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (An),An */ -uae_u32 REGPARAM2 op_b0d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (An)+,An */ -uae_u32 REGPARAM2 op_b0d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W -(An),An */ -uae_u32 REGPARAM2 op_b0e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (d16,An),An */ -uae_u32 REGPARAM2 op_b0e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_b0f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (xxx).W,An */ -uae_u32 REGPARAM2 op_b0f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (xxx).L,An */ -uae_u32 REGPARAM2 op_b0f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (d16,PC),An */ -uae_u32 REGPARAM2 op_b0fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_b0fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.W #.W,An */ -uae_u32 REGPARAM2 op_b0fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,Dn */ -uae_u32 REGPARAM2 op_b100_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_EOR_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPM.B (An)+,(An)+ */ -uae_u32 REGPARAM2 op_b108_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(An) */ -uae_u32 REGPARAM2 op_b110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_b118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,-(An) */ -uae_u32 REGPARAM2 op_b120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_b128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_b130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_b138_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_b139_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_EOR_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,Dn */ -uae_u32 REGPARAM2 op_b140_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_EOR_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPM.W (An)+,(An)+ */ -uae_u32 REGPARAM2 op_b148_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(An) */ -uae_u32 REGPARAM2 op_b150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_b158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,-(An) */ -uae_u32 REGPARAM2 op_b160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_b168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_b170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_b178_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_b179_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_EOR_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,Dn */ -uae_u32 REGPARAM2 op_b180_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_EOR_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPM.L (An)+,(An)+ */ -uae_u32 REGPARAM2 op_b188_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(An) */ -uae_u32 REGPARAM2 op_b190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_b198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,-(An) */ -uae_u32 REGPARAM2 op_b1a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_b1a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_b1b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_b1b8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EOR.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_b1b9_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_EOR_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L Dn,An */ -uae_u32 REGPARAM2 op_b1c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L An,An */ -uae_u32 REGPARAM2 op_b1c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (An),An */ -uae_u32 REGPARAM2 op_b1d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (An)+,An */ -uae_u32 REGPARAM2 op_b1d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L -(An),An */ -uae_u32 REGPARAM2 op_b1e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (d16,An),An */ -uae_u32 REGPARAM2 op_b1e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_b1f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (xxx).W,An */ -uae_u32 REGPARAM2 op_b1f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (xxx).L,An */ -uae_u32 REGPARAM2 op_b1f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (d16,PC),An */ -uae_u32 REGPARAM2 op_b1fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_b1fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* CMPA.L #.L,An */ -uae_u32 REGPARAM2 op_b1fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg+8; - dont_care_flags(); -/* Weird --- CMP with noflags ;-) */ - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,Dn */ -uae_u32 REGPARAM2 op_c000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_AND_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (An),Dn */ -uae_u32 REGPARAM2 op_c010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (An)+,Dn */ -uae_u32 REGPARAM2 op_c018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B -(An),Dn */ -uae_u32 REGPARAM2 op_c020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_c028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_c030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_c038_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_c039_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_c03a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_c03b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B #.B,Dn */ -uae_u32 REGPARAM2 op_c03c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_AND_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,Dn */ -uae_u32 REGPARAM2 op_c040_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_AND_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (An),Dn */ -uae_u32 REGPARAM2 op_c050_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (An)+,Dn */ -uae_u32 REGPARAM2 op_c058_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W -(An),Dn */ -uae_u32 REGPARAM2 op_c060_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_c068_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_c070_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_c078_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_c079_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_c07a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_c07b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W #.W,Dn */ -uae_u32 REGPARAM2 op_c07c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_AND_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,Dn */ -uae_u32 REGPARAM2 op_c080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_AND_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (An),Dn */ -uae_u32 REGPARAM2 op_c090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (An)+,Dn */ -uae_u32 REGPARAM2 op_c098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L -(An),Dn */ -uae_u32 REGPARAM2 op_c0a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_c0a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_c0b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_c0b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_c0b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_c0ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_c0bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L #.L,Dn */ -uae_u32 REGPARAM2 op_c0bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jnf_AND_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W Dn,Dn */ -uae_u32 REGPARAM2 op_c0c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=srcreg; - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (An),Dn */ -uae_u32 REGPARAM2 op_c0d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (An)+,Dn */ -uae_u32 REGPARAM2 op_c0d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W -(An),Dn */ -uae_u32 REGPARAM2 op_c0e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_c0e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_c0f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_c0f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_c0f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_c0fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_c0fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULU.W #.W,Dn */ -uae_u32 REGPARAM2 op_c0fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg; - jnf_MULU(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(An) */ -uae_u32 REGPARAM2 op_c110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_c118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,-(An) */ -uae_u32 REGPARAM2 op_c120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_c128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_c130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_c138_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_c139_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_AND_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXG.L Dn,Dn */ -uae_u32 REGPARAM2 op_c140_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - int tmp=alloc_scratch(); - mov_l_rr(tmp,src); - if(srcreg!=dst) - mov_l_rr(srcreg,dst); - if(dstreg!=tmp) - mov_l_rr(dstreg,tmp); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXG.L An,An */ -uae_u32 REGPARAM2 op_c148_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - int tmp=alloc_scratch(); - mov_l_rr(tmp,src); - if(srcreg+8!=dst) - mov_l_rr(srcreg+8,dst); - if(dstreg+8!=tmp) - mov_l_rr(dstreg+8,tmp); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(An) */ -uae_u32 REGPARAM2 op_c150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_c158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,-(An) */ -uae_u32 REGPARAM2 op_c160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_c168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_c170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_c178_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_c179_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_AND_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* EXG.L Dn,An */ -uae_u32 REGPARAM2 op_c188_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - int tmp=alloc_scratch(); - mov_l_rr(tmp,src); - if(srcreg!=dst) - mov_l_rr(srcreg,dst); - if(dstreg+8!=tmp) - mov_l_rr(dstreg+8,tmp); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(An) */ -uae_u32 REGPARAM2 op_c190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_c198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,-(An) */ -uae_u32 REGPARAM2 op_c1a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_c1a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_c1b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_c1b8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* AND.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_c1b9_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_AND_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W Dn,Dn */ -uae_u32 REGPARAM2 op_c1c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=srcreg; - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (An),Dn */ -uae_u32 REGPARAM2 op_c1d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (An)+,Dn */ -uae_u32 REGPARAM2 op_c1d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W -(An),Dn */ -uae_u32 REGPARAM2 op_c1e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_c1e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_c1f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_c1f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_c1f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_c1fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_c1fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* MULS.W #.W,Dn */ -uae_u32 REGPARAM2 op_c1fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int src=alloc_scratch(); - mov_l_ri(src,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=dstreg; - jnf_MULS(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,Dn */ -uae_u32 REGPARAM2 op_d000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (An),Dn */ -uae_u32 REGPARAM2 op_d010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (An)+,Dn */ -uae_u32 REGPARAM2 op_d018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readbyte(srca,src); - arm_ADD_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B -(An),Dn */ -uae_u32 REGPARAM2 op_d020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (d16,An),Dn */ -uae_u32 REGPARAM2 op_d028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_d030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (xxx).W,Dn */ -uae_u32 REGPARAM2 op_d038_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (xxx).L,Dn */ -uae_u32 REGPARAM2 op_d039_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (d16,PC),Dn */ -uae_u32 REGPARAM2 op_d03a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_d03b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readbyte(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B #.B,Dn */ -uae_u32 REGPARAM2 op_d03c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_b_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,Dn */ -uae_u32 REGPARAM2 op_d040_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W An,Dn */ -uae_u32 REGPARAM2 op_d048_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (An),Dn */ -uae_u32 REGPARAM2 op_d050_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (An)+,Dn */ -uae_u32 REGPARAM2 op_d058_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W -(An),Dn */ -uae_u32 REGPARAM2 op_d060_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (d16,An),Dn */ -uae_u32 REGPARAM2 op_d068_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_d070_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (xxx).W,Dn */ -uae_u32 REGPARAM2 op_d078_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (xxx).L,Dn */ -uae_u32 REGPARAM2 op_d079_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (d16,PC),Dn */ -uae_u32 REGPARAM2 op_d07a_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_d07b_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W #.W,Dn */ -uae_u32 REGPARAM2 op_d07c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_w_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,Dn */ -uae_u32 REGPARAM2 op_d080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L An,Dn */ -uae_u32 REGPARAM2 op_d088_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (An),Dn */ -uae_u32 REGPARAM2 op_d090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (An)+,Dn */ -uae_u32 REGPARAM2 op_d098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L -(An),Dn */ -uae_u32 REGPARAM2 op_d0a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (d16,An),Dn */ -uae_u32 REGPARAM2 op_d0a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (d8,An,Xn),Dn */ -uae_u32 REGPARAM2 op_d0b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (xxx).W,Dn */ -uae_u32 REGPARAM2 op_d0b8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (xxx).L,Dn */ -uae_u32 REGPARAM2 op_d0b9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (d16,PC),Dn */ -uae_u32 REGPARAM2 op_d0ba_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L (d8,PC,Xn),Dn */ -uae_u32 REGPARAM2 op_d0bb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L #.L,Dn */ -uae_u32 REGPARAM2 op_d0bc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg; - dont_care_flags(); - jnf_ADD_l_imm(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W Dn,An */ -uae_u32 REGPARAM2 op_d0c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W An,An */ -uae_u32 REGPARAM2 op_d0c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (An),An */ -uae_u32 REGPARAM2 op_d0d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (An)+,An */ -uae_u32 REGPARAM2 op_d0d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W -(An),An */ -uae_u32 REGPARAM2 op_d0e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (d16,An),An */ -uae_u32 REGPARAM2 op_d0e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_d0f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (xxx).W,An */ -uae_u32 REGPARAM2 op_d0f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (xxx).L,An */ -uae_u32 REGPARAM2 op_d0f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (d16,PC),An */ -uae_u32 REGPARAM2 op_d0fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_d0fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readword(srca,src); - int dst=dstreg+8; - jnf_ADDA_w(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.W #.W,An */ -uae_u32 REGPARAM2 op_d0fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - int dst=dstreg+8; - jnf_ADDA_w_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.B Dn,Dn */ -uae_u32 REGPARAM2 op_d100_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_ADDX_b(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.B -(An),-(An) */ -uae_u32 REGPARAM2 op_d108_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,areg_byteinc[srcreg]); - int src=alloc_scratch(); - readbyte(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADDX_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(An) */ -uae_u32 REGPARAM2 op_d110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(An)+ */ -uae_u32 REGPARAM2 op_d118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b(dst,src); - writebyte(dsta,dst); - arm_ADD_l_ri8(dstreg+8,areg_byteinc[dstreg]); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,-(An) */ -uae_u32 REGPARAM2 op_d120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,areg_byteinc[dstreg]); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(d16,An) */ -uae_u32 REGPARAM2 op_d128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_d130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(xxx).W */ -uae_u32 REGPARAM2 op_d138_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.B Dn,(xxx).L */ -uae_u32 REGPARAM2 op_d139_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readbyte(dsta,dst); - dont_care_flags(); - jnf_ADD_b(dst,src); - writebyte(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.W Dn,Dn */ -uae_u32 REGPARAM2 op_d140_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_ADDX_w(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.W -(An),-(An) */ -uae_u32 REGPARAM2 op_d148_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADDX_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(An) */ -uae_u32 REGPARAM2 op_d150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(An)+ */ -uae_u32 REGPARAM2 op_d158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w(dst,src); - writeword(dsta,dst); - arm_ADD_l_ri8(dstreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,-(An) */ -uae_u32 REGPARAM2 op_d160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,2); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(d16,An) */ -uae_u32 REGPARAM2 op_d168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_d170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(xxx).W */ -uae_u32 REGPARAM2 op_d178_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.W Dn,(xxx).L */ -uae_u32 REGPARAM2 op_d179_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readword(dsta,dst); - dont_care_flags(); - jnf_ADD_w(dst,src); - writeword(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.L Dn,Dn */ -uae_u32 REGPARAM2 op_d180_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg; - dont_care_flags(); - jnf_ADDX_l(dst,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDX.L -(An),-(An) */ -uae_u32 REGPARAM2 op_d188_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADDX_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(An) */ -uae_u32 REGPARAM2 op_d190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(An)+ */ -uae_u32 REGPARAM2 op_d198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l(dst,src); - writelong(dsta,dst); - arm_ADD_l_ri8(dstreg+8,4); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,-(An) */ -uae_u32 REGPARAM2 op_d1a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=dstreg+8; - arm_SUB_l_ri8(dstreg+8,4); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(d16,An) */ -uae_u32 REGPARAM2 op_d1a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_d1b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(xxx).W */ -uae_u32 REGPARAM2 op_d1b8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADD.L Dn,(xxx).L */ -uae_u32 REGPARAM2 op_d1b9_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dst=alloc_scratch(); - readlong(dsta,dst); - dont_care_flags(); - jnf_ADD_l(dst,src); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L Dn,An */ -uae_u32 REGPARAM2 op_d1c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg; - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L An,An */ -uae_u32 REGPARAM2 op_d1c8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int src=srcreg+8; - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (An),An */ -uae_u32 REGPARAM2 op_d1d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (An)+,An */ -uae_u32 REGPARAM2 op_d1d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - int src=alloc_scratch(); - readlong(srca,src); - arm_ADD_l_ri8(srcreg+8,4); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L -(An),An */ -uae_u32 REGPARAM2 op_d1e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,4); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (d16,An),An */ -uae_u32 REGPARAM2 op_d1e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (d8,An,Xn),An */ -uae_u32 REGPARAM2 op_d1f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (xxx).W,An */ -uae_u32 REGPARAM2 op_d1f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (xxx).L,An */ -uae_u32 REGPARAM2 op_d1f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (d16,PC),An */ -uae_u32 REGPARAM2 op_d1fa_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); - mov_l_ri(srca,address+PC16off); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L (d8,PC,Xn),An */ -uae_u32 REGPARAM2 op_d1fb_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - int srca=alloc_scratch(); - int pctmp=alloc_scratch(); - uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset; - mov_l_ri(pctmp,address); - calc_disp_ea_020(pctmp,comp_get_iword((m68k_pc_offset+=2)-2),srca); - release_scratch(pctmp); - int src=alloc_scratch(); - readlong(srca,src); - int dst=dstreg+8; - jnf_ADDA_l(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ADDA.L #.L,An */ -uae_u32 REGPARAM2 op_d1fc_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = (opcode >> 9) & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - uae_s32 src = comp_get_ilong((m68k_pc_offset+=4)-4); - int dst=dstreg+8; - jnf_ADDA_l_imm(dst, src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRQ.B #,Dn */ -uae_u32 REGPARAM2 op_e000_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_ASR_b_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRQ.B #,Dn */ -uae_u32 REGPARAM2 op_e008_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSR_b_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXRQ.B #,Dn */ -uae_u32 REGPARAM2 op_e010_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROXR_b(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORQ.B #,Dn */ -uae_u32 REGPARAM2 op_e018_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROR_b(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASR.B Dn,Dn */ -uae_u32 REGPARAM2 op_e020_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_ASR_b_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSR.B Dn,Dn */ -uae_u32 REGPARAM2 op_e028_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSR_b_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -#endif - -#ifdef PART_8 -/* ROXR.B Dn,Dn */ -uae_u32 REGPARAM2 op_e030_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROXR_b(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROR.B Dn,Dn */ -uae_u32 REGPARAM2 op_e038_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROR_b(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRQ.W #,Dn */ -uae_u32 REGPARAM2 op_e040_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_ASR_w_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRQ.W #,Dn */ -uae_u32 REGPARAM2 op_e048_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSR_w_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXRQ.W #,Dn */ -uae_u32 REGPARAM2 op_e050_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROXR_w(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORQ.W #,Dn */ -uae_u32 REGPARAM2 op_e058_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROR_w(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASR.W Dn,Dn */ -uae_u32 REGPARAM2 op_e060_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_ASR_w_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSR.W Dn,Dn */ -uae_u32 REGPARAM2 op_e068_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSR_w_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXR.W Dn,Dn */ -uae_u32 REGPARAM2 op_e070_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROXR_w(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROR.W Dn,Dn */ -uae_u32 REGPARAM2 op_e078_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROR_w(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRQ.L #,Dn */ -uae_u32 REGPARAM2 op_e080_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_ASR_l_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRQ.L #,Dn */ -uae_u32 REGPARAM2 op_e088_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSR_l_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXRQ.L #,Dn */ -uae_u32 REGPARAM2 op_e090_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROXR_l(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORQ.L #,Dn */ -uae_u32 REGPARAM2 op_e098_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROR_l(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASR.L Dn,Dn */ -uae_u32 REGPARAM2 op_e0a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_ASR_l_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSR.L Dn,Dn */ -uae_u32 REGPARAM2 op_e0a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSR_l_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXR.L Dn,Dn */ -uae_u32 REGPARAM2 op_e0b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROXR_l(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROR.L Dn,Dn */ -uae_u32 REGPARAM2 op_e0b8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROR_l(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (An) */ -uae_u32 REGPARAM2 op_e0d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_ASRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (An)+ */ -uae_u32 REGPARAM2 op_e0d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_ASRW(src); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W -(An) */ -uae_u32 REGPARAM2 op_e0e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jnf_ASRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (d16,An) */ -uae_u32 REGPARAM2 op_e0e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_ASRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e0f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jnf_ASRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (xxx).W */ -uae_u32 REGPARAM2 op_e0f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_ASRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASRW.W (xxx).L */ -uae_u32 REGPARAM2 op_e0f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jnf_ASRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLQ.B #,Dn */ -uae_u32 REGPARAM2 op_e100_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_b_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLQ.B #,Dn */ -uae_u32 REGPARAM2 op_e108_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_b_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXLQ.B #,Dn */ -uae_u32 REGPARAM2 op_e110_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROXL_b(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLQ.B #,Dn */ -uae_u32 REGPARAM2 op_e118_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROL_b(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASL.B Dn,Dn */ -uae_u32 REGPARAM2 op_e120_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_b_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSL.B Dn,Dn */ -uae_u32 REGPARAM2 op_e128_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_b_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXL.B Dn,Dn */ -uae_u32 REGPARAM2 op_e130_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROXL_b(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROL.B Dn,Dn */ -uae_u32 REGPARAM2 op_e138_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROL_b(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLQ.W #,Dn */ -uae_u32 REGPARAM2 op_e140_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_w_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLQ.W #,Dn */ -uae_u32 REGPARAM2 op_e148_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_w_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXLQ.W #,Dn */ -uae_u32 REGPARAM2 op_e150_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROXL_w(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLQ.W #,Dn */ -uae_u32 REGPARAM2 op_e158_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROL_w(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASL.W Dn,Dn */ -uae_u32 REGPARAM2 op_e160_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_w_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSL.W Dn,Dn */ -uae_u32 REGPARAM2 op_e168_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_w_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXL.W Dn,Dn */ -uae_u32 REGPARAM2 op_e170_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROXL_w(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROL.W Dn,Dn */ -uae_u32 REGPARAM2 op_e178_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROL_w(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLQ.L #,Dn */ -uae_u32 REGPARAM2 op_e180_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_l_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLQ.L #,Dn */ -uae_u32 REGPARAM2 op_e188_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_l_imm(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXLQ.L #,Dn */ -uae_u32 REGPARAM2 op_e190_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROXL_l(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLQ.L #,Dn */ -uae_u32 REGPARAM2 op_e198_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=alloc_scratch(); - mov_l_ri(cnt,srcreg); - int data=dstreg; - jnf_ROL_l(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASL.L Dn,Dn */ -uae_u32 REGPARAM2 op_e1a0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_l_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSL.L Dn,Dn */ -uae_u32 REGPARAM2 op_e1a8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int data=dstreg; - jnf_LSL_l_reg(data,srcreg); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROXL.L Dn,Dn */ -uae_u32 REGPARAM2 op_e1b0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROXL_l(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROL.L Dn,Dn */ -uae_u32 REGPARAM2 op_e1b8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = ((opcode >> 9) & 7); - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int cnt=srcreg; - int data=dstreg; - jnf_ROL_l(data,cnt); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (An) */ -uae_u32 REGPARAM2 op_e1d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_ASLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (An)+ */ -uae_u32 REGPARAM2 op_e1d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_ASLW(src); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W -(An) */ -uae_u32 REGPARAM2 op_e1e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jnf_ASLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (d16,An) */ -uae_u32 REGPARAM2 op_e1e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_ASLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e1f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jnf_ASLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (xxx).W */ -uae_u32 REGPARAM2 op_e1f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_ASLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ASLW.W (xxx).L */ -uae_u32 REGPARAM2 op_e1f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jnf_ASLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (An) */ -uae_u32 REGPARAM2 op_e2d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_LSRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (An)+ */ -uae_u32 REGPARAM2 op_e2d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_LSRW(src); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W -(An) */ -uae_u32 REGPARAM2 op_e2e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jnf_LSRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (d16,An) */ -uae_u32 REGPARAM2 op_e2e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_LSRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e2f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jnf_LSRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (xxx).W */ -uae_u32 REGPARAM2 op_e2f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_LSRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSRW.W (xxx).L */ -uae_u32 REGPARAM2 op_e2f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jnf_LSRW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (An) */ -uae_u32 REGPARAM2 op_e3d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_LSLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (An)+ */ -uae_u32 REGPARAM2 op_e3d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_LSLW(src); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W -(An) */ -uae_u32 REGPARAM2 op_e3e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jnf_LSLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (d16,An) */ -uae_u32 REGPARAM2 op_e3e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_LSLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e3f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jnf_LSLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (xxx).W */ -uae_u32 REGPARAM2 op_e3f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_LSLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* LSLW.W (xxx).L */ -uae_u32 REGPARAM2 op_e3f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jnf_LSLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (An) */ -uae_u32 REGPARAM2 op_e6d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_RORW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (An)+ */ -uae_u32 REGPARAM2 op_e6d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_RORW(src); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W -(An) */ -uae_u32 REGPARAM2 op_e6e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jnf_RORW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (d16,An) */ -uae_u32 REGPARAM2 op_e6e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_RORW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e6f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jnf_RORW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (xxx).W */ -uae_u32 REGPARAM2 op_e6f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_RORW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* RORW.W (xxx).L */ -uae_u32 REGPARAM2 op_e6f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jnf_RORW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (An) */ -uae_u32 REGPARAM2 op_e7d0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_ROLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (An)+ */ -uae_u32 REGPARAM2 op_e7d8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - int src=alloc_scratch(); - readword(srca,src); - jnf_ROLW(src); - writeword(srca,src); - arm_ADD_l_ri8(srcreg+8,2); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W -(An) */ -uae_u32 REGPARAM2 op_e7e0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=srcreg+8; - arm_SUB_l_ri8(srcreg+8,2); - int src=alloc_scratch(); - readword(srca,src); - jnf_ROLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (d16,An) */ -uae_u32 REGPARAM2 op_e7e8_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - lea_l_brr(srca,8+srcreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_ROLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (d8,An,Xn) */ -uae_u32 REGPARAM2 op_e7f0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - calc_disp_ea_020(srcreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca); - int src=alloc_scratch(); - readword(srca,src); - jnf_ROLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (xxx).W */ -uae_u32 REGPARAM2 op_e7f8_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - int src=alloc_scratch(); - readword(srca,src); - jnf_ROLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* ROLW.W (xxx).L */ -uae_u32 REGPARAM2 op_e7f9_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int src=alloc_scratch(); - readword(srca,src); - jnf_ROLW(src); - writeword(srca,src); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -} -/* BFINS.L #.W,Dn */ -uae_u32 REGPARAM2 op_efc0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dst=dstreg; - if ((extra & 0x0820) == 0x0000) { - jnf_BFINS_ii(dst, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0800) { - jnf_BFINS_di(dst, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jnf_BFINS_id(dst, srcreg, offs, width); - } else { - jnf_BFINS_dd(dst, srcreg, offs, width); - } - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* BFINS.L #.W,(An) */ -uae_u32 REGPARAM2 op_efd0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dsta=alloc_scratch(); - mov_l_rr(dsta,dstreg+8); - if ((extra & 0x0800) == 0x0800) { - arm_ADD_ldiv8(dsta,offs); - } - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dsta, 4); - int dst2=alloc_scratch(); - readlong(dsta,dst2); - if ((extra & 0x0820) == 0x0000) { - if(32 - offs - width >= 0) { - jnf_BFINS_ii(dst, srcreg, offs, width); - } else { - jnf_BFINS2_ii(dst, dst2, srcreg, offs, width); - } - } else if ((extra & 0x0820) == 0x0800) { - jnf_BFINS2_di(dst, dst2, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jnf_BFINS2_id(dst, dst2, srcreg, offs, width); - } else { - jnf_BFINS2_dd(dst, dst2, srcreg, offs, width); - } - writelong(dsta,dst2); - arm_SUB_l_ri8(dsta, 4); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* BFINS.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_efe8_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dsta=alloc_scratch(); - lea_l_brr(dsta,8+dstreg,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if ((extra & 0x0800) == 0x0800) { - arm_ADD_ldiv8(dsta,offs); - } - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dsta, 4); - int dst2=alloc_scratch(); - readlong(dsta,dst2); - if ((extra & 0x0820) == 0x0000) { - if(32 - offs - width >= 0) { - jnf_BFINS_ii(dst, srcreg, offs, width); - } else { - jnf_BFINS2_ii(dst, dst2, srcreg, offs, width); - } - } else if ((extra & 0x0820) == 0x0800) { - jnf_BFINS2_di(dst, dst2, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jnf_BFINS2_id(dst, dst2, srcreg, offs, width); - } else { - jnf_BFINS2_dd(dst, dst2, srcreg, offs, width); - } - writelong(dsta,dst2); - arm_SUB_l_ri8(dsta, 4); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* BFINS.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_eff0_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dsta=alloc_scratch(); - calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),dsta); - if ((extra & 0x0800) == 0x0800) { - arm_ADD_ldiv8(dsta,offs); - } - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dsta, 4); - int dst2=alloc_scratch(); - readlong(dsta,dst2); - if ((extra & 0x0820) == 0x0000) { - if(32 - offs - width >= 0) { - jnf_BFINS_ii(dst, srcreg, offs, width); - } else { - jnf_BFINS2_ii(dst, dst2, srcreg, offs, width); - } - } else if ((extra & 0x0820) == 0x0800) { - jnf_BFINS2_di(dst, dst2, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jnf_BFINS2_id(dst, dst2, srcreg, offs, width); - } else { - jnf_BFINS2_dd(dst, dst2, srcreg, offs, width); - } - writelong(dsta,dst2); - arm_SUB_l_ri8(dsta, 4); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* BFINS.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_eff8_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dsta=alloc_scratch(); - mov_l_ri(dsta,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); - if ((extra & 0x0800) == 0x0800) { - arm_ADD_ldiv8(dsta,offs); - } - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dsta, 4); - int dst2=alloc_scratch(); - readlong(dsta,dst2); - if ((extra & 0x0820) == 0x0000) { - if(32 - offs - width >= 0) { - jnf_BFINS_ii(dst, srcreg, offs, width); - } else { - jnf_BFINS2_ii(dst, dst2, srcreg, offs, width); - } - } else if ((extra & 0x0820) == 0x0800) { - jnf_BFINS2_di(dst, dst2, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jnf_BFINS2_id(dst, dst2, srcreg, offs, width); - } else { - jnf_BFINS2_dd(dst, dst2, srcreg, offs, width); - } - writelong(dsta,dst2); - arm_SUB_l_ri8(dsta, 4); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* BFINS.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_eff9_0_comp_nf(uae_u32 opcode) -{ -#if !defined(ARMV6T2) && !defined(CPU_AARCH64) - FAIL(1); - return 0; -#else - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; - dont_care_flags(); - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - int srcreg = (extra >> 12) & 7; - int offs, width; - if ((extra & 0x0800) == 0x0000) - offs = (extra >> 6) & 0x1f; - else - offs = (extra >> 6) & 0x07; - if ((extra & 0x0020) == 0x0000) - width = ((extra - 1) & 0x1f) + 1; - else - width = (extra & 0x07); - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - if ((extra & 0x0800) == 0x0800) { - arm_ADD_ldiv8(dsta,offs); - } - int dst=alloc_scratch(); - readlong(dsta,dst); - arm_ADD_l_ri8(dsta, 4); - int dst2=alloc_scratch(); - readlong(dsta,dst2); - if ((extra & 0x0820) == 0x0000) { - if(32 - offs - width >= 0) { - jnf_BFINS_ii(dst, srcreg, offs, width); - } else { - jnf_BFINS2_ii(dst, dst2, srcreg, offs, width); - } - } else if ((extra & 0x0820) == 0x0800) { - jnf_BFINS2_di(dst, dst2, srcreg, offs, width); - } else if ((extra & 0x0820) == 0x0020) { - jnf_BFINS2_id(dst, dst2, srcreg, offs, width); - } else { - jnf_BFINS2_dd(dst, dst2, srcreg, offs, width); - } - writelong(dsta,dst2); - arm_SUB_l_ri8(dsta, 4); - writelong(dsta,dst); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); -return 0; -#endif -} -/* FPP.L #.W,Dn */ -uae_u32 REGPARAM2 op_f200_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,An */ -uae_u32 REGPARAM2 op_f208_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(An) */ -uae_u32 REGPARAM2 op_f210_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(An)+ */ -uae_u32 REGPARAM2 op_f218_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,-(An) */ -uae_u32 REGPARAM2 op_f220_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_f228_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_f230_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_f238_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_f239_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(d16,PC) */ -uae_u32 REGPARAM2 op_f23a_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 2; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,(d8,PC,Xn) */ -uae_u32 REGPARAM2 op_f23b_0_comp_nf(uae_u32 opcode) -{ - uae_s32 dstreg = 3; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FPP.L #.W,#.L */ -uae_u32 REGPARAM2 op_f23c_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fpp_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,Dn */ -uae_u32 REGPARAM2 op_f240_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(An) */ -uae_u32 REGPARAM2 op_f250_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(An)+ */ -uae_u32 REGPARAM2 op_f258_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,-(An) */ -uae_u32 REGPARAM2 op_f260_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(d16,An) */ -uae_u32 REGPARAM2 op_f268_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(d8,An,Xn) */ -uae_u32 REGPARAM2 op_f270_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(xxx).W */ -uae_u32 REGPARAM2 op_f278_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FScc.L #.W,(xxx).L */ -uae_u32 REGPARAM2 op_f279_0_comp_nf(uae_u32 opcode) -{ - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); - comp_fscc_opp(opcode,extra); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FBccQ.L #,#.W */ -uae_u32 REGPARAM2 op_f280_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 63); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - comp_fbcc_opp(opcode); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* FBccQ.L #,#.L */ -uae_u32 REGPARAM2 op_f2c0_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 63); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -#ifdef USE_JIT_FPU - comp_fbcc_opp(opcode); -#else - failure = 1; -#endif - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* MOVE16.L (An)+,(xxx).L */ -uae_u32 REGPARAM2 op_f600_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -if (special_mem) { - FAIL(1); - return 0; -} - int srca=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - jnf_ADD_im8(srcreg + 8, srcreg + 8, 16); - jnf_MOVE16(dsta, srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* MOVE16.L (xxx).L,(An)+ */ -uae_u32 REGPARAM2 op_f608_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -if (special_mem) { - FAIL(1); - return 0; -} - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dsta=dstreg+8; - jnf_ADD_im8(dstreg + 8, dstreg + 8, 16); - jnf_MOVE16(dsta, srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* MOVE16.L (An),(xxx).L */ -uae_u32 REGPARAM2 op_f610_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -if (special_mem) { - FAIL(1); - return 0; -} - int srca=srcreg+8; - int dsta=alloc_scratch(); - mov_l_ri(dsta,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - jnf_MOVE16(dsta, srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* MOVE16.L (xxx).L,(An) */ -uae_u32 REGPARAM2 op_f618_0_comp_nf(uae_u32 opcode) -{ - uae_u32 dstreg = opcode & 7; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -if (special_mem) { - FAIL(1); - return 0; -} - int srca=alloc_scratch(); - mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ - int dsta=dstreg+8; - jnf_MOVE16(dsta, srca); - if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -/* MOVE16.L (An)+,(An)+ */ -uae_u32 REGPARAM2 op_f620_0_comp_nf(uae_u32 opcode) -{ - uae_s32 srcreg = (opcode & 7); - uae_s32 dstreg = 0; - uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; - m68k_pc_offset+=2; -if (special_mem) { - FAIL(1); - return 0; -} -{ uae_u16 dstreg = ((comp_get_iword((m68k_pc_offset+=2)-2))>>12) & 0x07; - int srca=srcreg + 8; - int dsta=dstreg + 8; - jnf_MOVE16(dsta, srca); - if (srcreg != dstreg) - jnf_ADD_im8(srcreg + 8, srcreg + 8, 16); - jnf_ADD_im8(dstreg + 8, dstreg + 8, 16); -} if (m68k_pc_offset>SYNC_PC_OFFSET) sync_m68k_pc(); - if (failure) m68k_pc_offset=m68k_pc_offset_thisinst; -return 0; -} -#endif - +// +// Created by midwan on 22/12/2023. +// + +#if defined(CPU_arm) || defined(CPU_AARCH64) +#include "arm/compemu_arm.cpp" +#elif defined(__x86_64__) || defined(_M_AMD64) +#include "x86/compemu_x86.cpp" #endif diff --git a/src/jit/compemu.h b/src/jit/compemu.h index e02dd8b96..ba9fd8cd4 100644 --- a/src/jit/compemu.h +++ b/src/jit/compemu.h @@ -1,392 +1,14 @@ -/* - * compiler/compemu.h - Public interface and definitions - * - * Copyright (c) 2001-2004 Milan Jurik of ARAnyM dev team (see AUTHORS) - * - * Inspired by Christian Bauer's Basilisk II - * - * This file is part of the ARAnyM project which builds a new and powerful - * TOS/FreeMiNT compatible virtual machine running on almost any hardware. - * - * JIT compiler m68k -> IA-32 and AMD64 - * - * Original 68040 JIT compiler for UAE, copyright 2000-2002 Bernd Meyer - * Adaptation for Basilisk II and improvements, copyright 2000-2004 Gwenole Beauchesne - * Portions related to CPU detection come from linux/arch/i386/kernel/setup.c - * - * ARAnyM is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * ARAnyM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with ARAnyM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ +// +// Created by midwan on 22/12/2023. +// -#ifndef COMPEMU_H -#define COMPEMU_H +#ifndef AMIBERRY_COMPEMU_H +#define AMIBERRY_COMPEMU_H -#include "sysconfig.h" -#include "newcpu.h" - -#ifdef UAE -#ifdef CPU_64_BIT -typedef uae_u64 uintptr; -typedef uae_s64 intptr; -#else -typedef uae_u32 uintptr; -#endif -/* FIXME: cpummu.cpp also checks for USE_JIT, possibly others */ -#define USE_JIT -#endif - -#define JITPTR (uae_u32)(uintptr) - -/* Now that we do block chaining, and also have linked lists on each tag, - TAGMASK can be much smaller and still do its job. Saves several megs - of memory! */ -#define TAGMASK 0x0000ffff -#define TAGSIZE (TAGMASK+1) -#define MAXRUN 1024 -#define cacheline(x) (((uintptr)x)&TAGMASK) - -extern uae_u8* start_pc_p; -extern uae_u32 start_pc; - -struct blockinfo_t; - -typedef struct { - uae_u16* location; - uae_u8 specmem; -} cpu_history; - -typedef union { - cpuop_func* handler; - struct blockinfo_t* bi; -} cacheline; - -#define COMP_DEBUG 0 - -#if COMP_DEBUG -#define Dif(x) if (x) -#else -#define Dif(x) if (0) -#endif - -#define SCALE 2 -#define MAXCYCLES (1000 * CYCLE_UNIT) - -#define BYTES_PER_INST 10240 /* paranoid ;-) */ -#if defined(CPU_arm) -#define LONGEST_68K_INST 256 /* The number of bytes the longest possible - 68k instruction takes */ -#else -#define LONGEST_68K_INST 16 /* The number of bytes the longest possible - 68k instruction takes */ -#endif -#define MAX_CHECKSUM_LEN 2048 /* The maximum size we calculate checksums - for. Anything larger will be flushed - unconditionally even with SOFT_FLUSH */ -#define MAX_HOLD_BI 3 /* One for the current block, and up to two - for jump targets */ - -#if 1 -// gb-- my format from readcpu.cpp is not the same -#define FLAG_X 0x0010 -#define FLAG_N 0x0008 -#define FLAG_Z 0x0004 -#define FLAG_V 0x0002 -#define FLAG_C 0x0001 -#else -#define FLAG_C 0x0010 -#define FLAG_V 0x0008 -#define FLAG_Z 0x0004 -#define FLAG_N 0x0002 -#define FLAG_X 0x0001 -#endif -#define FLAG_CZNV (FLAG_C | FLAG_Z | FLAG_N | FLAG_V) -#define FLAG_ALL (FLAG_C | FLAG_Z | FLAG_N | FLAG_V | FLAG_X) -#define FLAG_ZNV (FLAG_Z | FLAG_N | FLAG_V) - -#if defined(CPU_arm) - -//#define DEBUG_DATA_BUFFER - -#if defined(CPU_AARCH64) -#define N_REGS 18 /* really 32, but 29 to 31 are FP, LR, SP; 18 has special meaning; 27 holds memstart and 28 holds regs-struct */ -#else -#define N_REGS 11 /* really 16, but 13 to 15 are SP, LR, PC; 11 holds memstart and 12 is scratch register */ -#endif - -#else -#define N_REGS 8 /* really only 7, but they are numbered 0,1,2,3,5,6,7 */ -#endif - -#define N_FREGS 16 // We use 10 regs: 6 - FP_RESULT, 7 - SCRATCH, 8-15 - Amiga regs FP0-FP7 - -/* Functions exposed to newcpu, or to what was moved from newcpu.c to - * compemu_support.c */ -extern void compiler_exit(void); -extern void build_comp(void); -extern void set_cache_state(int enabled); -#ifdef JIT -extern void flush_icache(int n); -extern void flush_icache_hard(int n); +#if defined(CPU_arm) || defined(CPU_AARCH64) +#include "arm/compemu_arm.h" +#elif defined(__x86_64__) || defined(_M_AMD64) +#include "x86/compemu_x86.h" #endif -extern void alloc_cache(void); -extern void compile_block(cpu_history* pc_hist, int blocklen, int totcyles); -extern int check_for_cache_miss(void); - -#define scaled_cycles(x) (currprefs.m68k_speed<0?(((x)/SCALE)?(((x)/SCALE - -#include "sysdeps.h" - -#include "options.h" -#include "memory.h" -#include "newcpu.h" -#include "compemu.h" -#include "flags_arm.h" - -#if defined(USE_JIT_FPU) - -extern void fpp_to_exten(fpdata *fpd, uae_u32 wrd1, uae_u32 wrd2, uae_u32 wrd3); - -static const int sz1[8] = { 4, 4, 12, 12, 2, 8, 1, 0 }; -static const int sz2[8] = { 4, 4, 12, 12, 2, 8, 2, 0 }; - -/* return the required floating point precision or -1 for failure, 0=E, 1=S, 2=D */ -STATIC_INLINE int comp_fp_get (uae_u32 opcode, uae_u16 extra, int treg) -{ - int reg = opcode & 7; - int mode = (opcode >> 3) & 7; - int size = (extra >> 10) & 7; - - if (size == 3 || size == 7) /* 3 = packed decimal, 7 is not defined */ - return -1; - switch (mode) { - case 0: /* Dn */ - switch (size) { - case 0: /* Long */ - fmov_l_rr (treg, reg); - return 2; - case 1: /* Single */ - fmov_s_rr (treg, reg); - return 1; - case 4: /* Word */ - fmov_w_rr (treg, reg); - return 1; - case 6: /* Byte */ - fmov_b_rr (treg, reg); - return 1; - default: - return -1; - } - case 1: /* An, invalid mode */ - return -1; - case 2: /* (An) */ - mov_l_rr (S1, reg + 8); - break; - case 3: /* (An)+ */ - mov_l_rr (S1, reg + 8); - arm_ADD_l_ri8(reg + 8, (reg == 7 ? sz2[size] : sz1[size])); - break; - case 4: /* -(An) */ - arm_SUB_l_ri8(reg + 8, (reg == 7 ? sz2[size] : sz1[size])); - mov_l_rr (S1, reg + 8); - break; - case 5: /* (d16,An) */ - { - uae_u32 off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); - mov_l_rr (S1, reg + 8); - lea_l_brr (S1, S1, off); - break; - } - case 6: /* (d8,An,Xn) or (bd,An,Xn) or ([bd,An,Xn],od) or ([bd,An],Xn,od) */ - { - uae_u32 dp = comp_get_iword ((m68k_pc_offset += 2) - 2); - calc_disp_ea_020 (reg + 8, dp, S1); - break; - } - case 7: - switch (reg) { - case 0: /* (xxx).W */ - { - uae_u32 off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); - mov_l_ri (S1, off); - break; - } - case 1: /* (xxx).L */ - { - uae_u32 off = comp_get_ilong ((m68k_pc_offset += 4) - 4); - mov_l_ri (S1, off); - break; - } - case 2: /* (d16,PC) */ - { - uae_u32 address = start_pc + ((uae_char*) comp_pc_p - (uae_char*) start_pc_p) + m68k_pc_offset; - uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); - mov_l_ri (S1, address + PC16off); - break; - } - case 3: /* (d8,PC,Xn) or (bd,PC,Xn) or ([bd,PC,Xn],od) or ([bd,PC],Xn,od) */ - return -1; /* rarely used, fallback to non-JIT */ - case 4: /* # < data >; Constants should be converted just once by the JIT */ - m68k_pc_offset += sz2[size]; - switch (size) { - case 0: - { - uae_s32 li = comp_get_ilong(m68k_pc_offset - 4); - float si = (float)li; - - if (li == (int)si) { - //write_log ("converted immediate LONG constant to SINGLE\n"); - fmov_s_ri(treg, *(uae_u32 *)&si); - return 1; - } - //write_log ("immediate LONG constant\n"); - fmov_l_ri(treg, *(uae_u32 *)&li); - return 2; - } - case 1: - //write_log (_T("immediate SINGLE constant\n")); - fmov_s_ri(treg, comp_get_ilong(m68k_pc_offset - 4)); - return 1; - case 2: - { - //write_log (_T("immediate LONG DOUBLE constant\n")); - uae_u32 wrd1, wrd2, wrd3; - fpdata tmp; - wrd3 = comp_get_ilong(m68k_pc_offset - 4); - wrd2 = comp_get_ilong(m68k_pc_offset - 8); - wrd1 = comp_get_iword(m68k_pc_offset - 12) << 16; - fpp_to_exten(&tmp, wrd1, wrd2, wrd3); - mov_l_ri(S1, ((uae_u32*)&tmp)[0]); - mov_l_ri(S2, ((uae_u32*)&tmp)[1]); - fmov_d_rrr (treg, S1, S2); - return 0; - } - case 4: - { - float si = (float)(uae_s16)comp_get_iword(m68k_pc_offset-2); - - //write_log (_T("converted immediate WORD constant %f to SINGLE\n"), si); - fmov_s_ri(treg, *(uae_u32 *)&si); - return 1; - } - case 5: - { - //write_log (_T("immediate DOUBLE constant\n")); - mov_l_ri(S1, comp_get_ilong(m68k_pc_offset - 4)); - mov_l_ri(S2, comp_get_ilong(m68k_pc_offset - 8)); - fmov_d_rrr (treg, S1, S2); - return 2; - } - case 6: - { - float si = (float)(uae_s8)comp_get_ibyte(m68k_pc_offset - 2); - - //write_log (_T("converted immediate BYTE constant to SINGLE\n")); - fmov_s_ri(treg, *(uae_u32 *)&si); - return 1; - } - default: /* never reached */ - return -1; - } - default: /* never reached */ - return -1; - } - } - - switch (size) { - case 0: /* Long */ - readlong (S1, S2); - fmov_l_rr (treg, S2); - return 2; - case 1: /* Single */ - readlong (S1, S2); - fmov_s_rr (treg, S2); - return 1; - case 2: /* Long Double */ - fp_to_exten_rm (treg, S1); - return 0; - case 4: /* Word */ - readword (S1, S2); - fmov_w_rr (treg, S2); - return 1; - case 5: /* Double */ - fp_to_double_rm (treg, S1); - return 2; - case 6: /* Byte */ - readbyte (S1, S2); - fmov_b_rr (treg, S2); - return 1; - default: - return -1; - } - return -1; -} - -/* return of -1 means failure, >=0 means OK */ -STATIC_INLINE int comp_fp_put (uae_u32 opcode, uae_u16 extra) -{ - int reg = opcode & 7; - int sreg = (extra >> 7) & 7; - int mode = (opcode >> 3) & 7; - int size = (extra >> 10) & 7; - - if (size == 3 || size == 7) /* 3 = packed decimal, 7 is not defined */ - return -1; - switch (mode) { - case 0: /* Dn */ - switch (size) { - case 0: /* FMOVE.L FPx, Dn */ - fmov_to_l_rr(reg, sreg); - return 0; - case 1: /* FMOVE.S FPx, Dn */ - fmov_to_s_rr(reg, sreg); - return 0; - case 4: /* FMOVE.W FPx, Dn */ - fmov_to_w_rr(reg, sreg); - return 0; - case 6: /* FMOVE.B FPx, Dn */ - fmov_to_b_rr(reg, sreg); - return 0; - default: - return -1; - } - case 1: /* An, invalid mode */ - return -1; - case 2: /* (An) */ - mov_l_rr (S1, reg + 8); - break; - case 3: /* (An)+ */ - mov_l_rr (S1, reg + 8); - arm_ADD_l_ri8(reg + 8, (reg == 7 ? sz2[size] : sz1[size])); - break; - case 4: /* -(An) */ - arm_SUB_l_ri8(reg + 8, (reg == 7 ? sz2[size] : sz1[size])); - mov_l_rr (S1, reg + 8); - break; - case 5: /* (d16,An) */ - { - uae_u32 off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); - mov_l_rr (S1, reg + 8); - arm_ADD_l_ri (S1, off); - break; - } - case 6: /* (d8,An,Xn) or (bd,An,Xn) or ([bd,An,Xn],od) or ([bd,An],Xn,od) */ - { - uae_u32 dp = comp_get_iword ((m68k_pc_offset += 2) - 2); - calc_disp_ea_020 (reg + 8, dp, S1); - break; - } - case 7: - switch (reg) { - case 0: /* (xxx).W */ - { - uae_u32 off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); - mov_l_ri (S1, off); - break; - } - case 1: /* (xxx).L */ - { - uae_u32 off = comp_get_ilong ((m68k_pc_offset += 4) - 4); - mov_l_ri (S1, off); - break; - } - default: /* All other modes are not allowed for FPx to */ - write_log (_T ("JIT FMOVE FPx, Mode is not allowed %04x %04x\n"), opcode, extra); - return -1; - } - } - switch (size) { - case 0: /* Long */ - fmov_to_l_rr(S2, sreg); - writelong_clobber (S1, S2); - return 0; - case 1: /* Single */ - fmov_to_s_rr(S2, sreg); - writelong_clobber (S1, S2); - return 0; - case 2:/* Long Double */ - fp_from_exten_mr (S1, sreg); - return 0; - case 4: /* Word */ - fmov_to_w_rr(S2, sreg); - writeword_clobber (S1, S2); - return 0; - case 5: /* Double */ - fp_from_double_mr(S1, sreg); - return 0; - case 6: /* Byte */ - fmov_to_b_rr(S2, sreg); - writebyte (S1, S2); - return 0; - default: - return -1; - } - return -1; -} - -/* return -1 for failure, or register number for success */ -STATIC_INLINE int comp_fp_adr (uae_u32 opcode) -{ - uae_s32 off; - int mode = (opcode >> 3) & 7; - int reg = opcode & 7; - - switch (mode) { - case 2: - case 3: - case 4: - mov_l_rr (S1, 8 + reg); - return S1; - case 5: - off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); - mov_l_rr (S1, 8 + reg); - arm_ADD_l_ri (S1, off); - return S1; - case 7: - switch (reg) { - case 0: - off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); - mov_l_ri (S1, off); - return S1; - case 1: - off = comp_get_ilong ((m68k_pc_offset += 4) - 4); - mov_l_ri (S1, off); - return S1; - } - default: - return -1; - } -} - -void comp_fscc_opp (uae_u32 opcode, uae_u16 extra) -{ - int reg; - - if (!currprefs.compfpu) { - FAIL (1); - return; - } - - if (extra & 0x20) { /* only cc from 00 to 1f are defined */ - FAIL (1); - return; - } - if ((opcode & 0x38) != 0) { /* We can only do to integer register */ - FAIL (1); - return; - } - - fflags_into_flags (); - reg = (opcode & 7); - - if (!(opcode & 0x38)) { - switch (extra & 0x0f) { /* according to fpp.c, the 0x10 bit is ignored */ - case 0: fp_fscc_ri(reg, NATIVE_CC_F_NEVER); break; - case 1: fp_fscc_ri(reg, NATIVE_CC_EQ); break; - case 2: fp_fscc_ri(reg, NATIVE_CC_F_OGT); break; - case 3: fp_fscc_ri(reg, NATIVE_CC_F_OGE); break; - case 4: fp_fscc_ri(reg, NATIVE_CC_F_OLT); break; - case 5: fp_fscc_ri(reg, NATIVE_CC_F_OLE); break; - case 6: fp_fscc_ri(reg, NATIVE_CC_F_OGL); break; - case 7: fp_fscc_ri(reg, NATIVE_CC_F_OR); break; - case 8: fp_fscc_ri(reg, NATIVE_CC_F_UN); break; - case 9: fp_fscc_ri(reg, NATIVE_CC_F_UEQ); break; - case 10: fp_fscc_ri(reg, NATIVE_CC_F_UGT); break; - case 11: fp_fscc_ri(reg, NATIVE_CC_F_UGE); break; - case 12: fp_fscc_ri(reg, NATIVE_CC_F_ULT); break; - case 13: fp_fscc_ri(reg, NATIVE_CC_F_ULE); break; - case 14: fp_fscc_ri(reg, NATIVE_CC_NE); break; - case 15: fp_fscc_ri(reg, NATIVE_CC_AL); break; - } - } -} - -void comp_fbcc_opp (uae_u32 opcode) -{ - uae_u32 start_68k_offset = m68k_pc_offset; - uae_u32 off, v1, v2; - int cc; - - if (!currprefs.compfpu) { - FAIL (1); - return; - } - - if (opcode & 0x20) { /* only cc from 00 to 1f are defined */ - FAIL (1); - return; - } - if (!(opcode & 0x40)) { - off = (uae_s32) (uae_s16) comp_get_iword ((m68k_pc_offset += 2) - 2); - } - else { - off = comp_get_ilong ((m68k_pc_offset += 4) - 4); - } - - /* according to fpp.c, the 0x10 bit is ignored - (it handles exception handling, which we don't - do, anyway ;-) */ - cc = opcode & 0x0f; - if(cc == 0) - return; /* jump never */ - - /* Note, "off" will sometimes be (unsigned) "negative", so the following - * uintptr can be > 0xffffffff, but the result will be correct due to - * wraparound when truncated to 32 bit in the call to mov_l_ri. */ - mov_l_ri(S1, (uintptr) - (comp_pc_p + off - (m68k_pc_offset - start_68k_offset))); - mov_l_ri(PC_P, (uintptr) comp_pc_p); - - /* Now they are both constant. Might as well fold in m68k_pc_offset */ - arm_ADD_l_ri (S1, m68k_pc_offset); - arm_ADD_l_ri (PC_P, m68k_pc_offset); - m68k_pc_offset = 0; - - v1 = get_const (PC_P); - v2 = get_const (S1); - fflags_into_flags (); - - switch (cc) { - case 1: register_branch (v1, v2, NATIVE_CC_EQ); break; - case 2: register_branch (v1, v2, NATIVE_CC_F_OGT); break; - case 3: register_branch (v1, v2, NATIVE_CC_F_OGE); break; - case 4: register_branch (v1, v2, NATIVE_CC_F_OLT); break; - case 5: register_branch (v1, v2, NATIVE_CC_F_OLE); break; - case 6: register_branch (v1, v2, NATIVE_CC_F_OGL); break; - case 7: register_branch (v1, v2, NATIVE_CC_F_OR); break; - case 8: register_branch (v1, v2, NATIVE_CC_F_UN); break; - case 9: register_branch (v1, v2, NATIVE_CC_F_UEQ); break; - case 10: register_branch (v1, v2, NATIVE_CC_F_UGT); break; - case 11: register_branch (v1, v2, NATIVE_CC_F_UGE); break; - case 12: register_branch (v1, v2, NATIVE_CC_F_ULT); break; - case 13: register_branch (v1, v2, NATIVE_CC_F_ULE); break; - case 14: register_branch (v1, v2, NATIVE_CC_NE); break; - case 15: register_branch (v2, v2, NATIVE_CC_AL); break; - } -} - -static uae_u32 dhex_pi[] ={0x54442D18, 0x400921FB}; -static uae_u32 dhex_exp_1[] ={0x8B145769, 0x4005BF0A}; -static uae_u32 dhex_l2_e[] ={0x652B82FE, 0x3FF71547}; -static uae_u32 dhex_ln_2[] ={0xFEFA39EF, 0x3FE62E42}; -static uae_u32 dhex_ln_10[] ={0xBBB55516, 0x40026BB1}; -static uae_u32 dhex_l10_2[] ={0x509F79FF, 0x3FD34413}; -static uae_u32 dhex_l10_e[] ={0x1526E50E, 0x3FDBCB7B}; -static uae_u32 dhex_1e16[] ={0x37E08000, 0x4341C379}; -static uae_u32 dhex_1e32[] ={0xB5056E17, 0x4693B8B5}; -static uae_u32 dhex_1e64[] ={0xE93FF9F5, 0x4D384F03}; -static uae_u32 dhex_1e128[] ={0xF9301D32, 0x5A827748}; -static uae_u32 dhex_1e256[] ={0x7F73BF3C, 0x75154FDD}; -static double fp_1e8; - -void comp_fpp_opp (uae_u32 opcode, uae_u16 extra) -{ - int reg; - int sreg, prec = 0; - int dreg = (extra >> 7) & 7; - int source = (extra >> 13) & 7; - int opmode = extra & 0x7f; - - if (special_mem) { - FAIL(1); - return; - } - - if (!currprefs.compfpu) { - FAIL (1); - return; - } - switch (source) { - case 3: /* FMOVE FPx, */ - if (comp_fp_put (opcode, extra) < 0) - FAIL (1); - return; - case 4: /* FMOVE.L , ControlReg */ - if ((opcode & 0x38) == 0) { - // Dn - // Only single selected control register is allowed - // All control register bits unset = FPIAR - uae_u16 bits = extra & (0x1000 | 0x0800 | 0x0400); - if (bits && bits != 0x1000 && bits != 0x0800 && bits != 0x400) { - FAIL(1); - return; - } - if (extra & 0x1000) { /* FPCR */ - FAIL (1); - } - if (extra & 0x0800) { /* FPSR */ - FAIL (1); - } - if ((extra & 0x0400) || !bits) /* FPIAR */ - mov_l_mr ((uintptr)®s.fpiar, opcode & 15); - return; - } else if ((opcode & 0x38) == 0x08) { - // An - // Only FPIAR can be moved to/from address register - // All bits unset = FPIAR - uae_u16 bits = extra & (0x1000 | 0x0800 | 0x0400); - if (bits && bits != 0x0400) { - FAIL(1); - return; - } - mov_l_mr ((uintptr)®s.fpiar, opcode & 15); - return; - } - else if ((opcode & 0x3f) == 0x3c) { - if (extra & 0x1000) { /* FPCR */ - FAIL(1); - return; - } - if (extra & 0x0800) { /* FPSR */ - FAIL (1); - return; - } - if (extra & 0x0400) { /* FPIAR */ - uae_u32 val = comp_get_ilong ((m68k_pc_offset += 4) - 4); - mov_l_mi ((uintptr)®s.fpiar, val); - return; - } - } - FAIL (1); - return; - case 5: /* FMOVE.L ControlReg, */ - if ((opcode & 0x38) == 0) { - // Dn - // Only single selected control register is allowed - // All control register bits unset = FPIAR - uae_u16 bits = extra & (0x1000 | 0x0800 | 0x0400); - if (bits && bits != 0x1000 && bits != 0x0800 && bits != 0x400) { - FAIL(1); - return; - } - if (extra & 0x1000) /* FPCR */ - mov_l_rm (opcode & 15, (uintptr)®s.fpcr); - if (extra & 0x0800) { /* FPSR */ - FAIL (1); - } - if ((extra & 0x0400) || !bits) /* FPIAR */ - mov_l_rm (opcode & 15, (uintptr)®s.fpiar); - return; - } else if ((opcode & 0x38) == 0x08) { - // An - // Only FPIAR can be moved to/from address register - // All bits unset = FPIAR - uae_u16 bits = extra & (0x1000 | 0x0800 | 0x0400); - if (bits && bits != 0x0400) { - FAIL(1); - return; - } - mov_l_rm (opcode & 15, (uintptr)®s.fpiar); - return; - } - FAIL (1); - return; - case 6: - case 7: - { - uae_u32 list = 0; - int incr = 0; - if (extra & 0x2000) { - int ad; - - /* FMOVEM FPP->memory */ - switch ((extra >> 11) & 3) { /* Get out early if failure */ - case 0: - case 2: - break; - case 1: - case 3: - default: - FAIL (1); - return; - } - ad = comp_fp_adr (opcode); - if (ad < 0) { - m68k_setpc (m68k_getpc () - 4); - op_illg (opcode); - return; - } - switch ((extra >> 11) & 3) { - case 0: /* static pred */ - list = extra & 0xff; - incr = -1; - break; - case 2: /* static postinc */ - list = extra & 0xff; - incr = 1; - break; - case 1: /* dynamic pred */ - case 3: /* dynamic postinc */ - abort (); - } - if (incr < 0) { /* Predecrement */ - for (reg = 7; reg >= 0; reg--) { - if (list & 0x80) { - sub_l_ri (ad, 12); - fp_from_exten_mr (ad, reg); - } - list <<= 1; - } - } else { /* Postincrement */ - for (reg = 0; reg <= 7; reg++) { - if (list & 0x80) { - fp_from_exten_mr (ad, reg); - arm_ADD_l_ri (ad, 12); - } - list <<= 1; - } - } - if ((opcode & 0x38) == 0x18) - mov_l_rr ((opcode & 7) + 8, ad); - if ((opcode & 0x38) == 0x20) - mov_l_rr ((opcode & 7) + 8, ad); - } else { - /* FMOVEM memory->FPP */ - int ad; - switch ((extra >> 11) & 3) { /* Get out early if failure */ - case 0: - case 2: - break; - case 1: - case 3: - default: - FAIL (1); - return; - } - ad = comp_fp_adr (opcode); - if (ad < 0) { - m68k_setpc (m68k_getpc () - 4); - op_illg (opcode); - return; - } - switch ((extra >> 11) & 3) { - case 0: /* static pred */ - list = extra & 0xff; - incr = -1; - break; - case 2: /* static postinc */ - list = extra & 0xff; - incr = 1; - break; - case 1: /* dynamic pred */ - case 3: /* dynamic postinc */ - abort (); - } - - if (incr < 0) { - // not reached - for (reg = 7; reg >= 0; reg--) { - if (list & 0x80) { - sub_l_ri (ad, 12); - fp_to_exten_rm(reg, ad); - } - list <<= 1; - } - } else { - for (reg = 0; reg <= 7; reg++) { - if (list & 0x80) { - fp_to_exten_rm(reg, ad); - arm_ADD_l_ri (ad, 12); - } - list <<= 1; - } - } - if ((opcode & 0x38) == 0x18) - mov_l_rr ((opcode & 7) + 8, ad); - if ((opcode & 0x38) == 0x20) - mov_l_rr ((opcode & 7) + 8, ad); - } - } - return; - case 2: /* from to FPx */ - dont_care_fflags (); - if ((extra & 0xfc00) == 0x5c00) { /* FMOVECR */ - //write_log (_T("JIT FMOVECR %x\n"), opmode); - switch (opmode) { - case 0x00: - fmov_d_rm (dreg, (uintptr)&dhex_pi); - break; - case 0x0b: - fmov_d_rm (dreg, (uintptr)&dhex_l10_2); - break; - case 0x0c: - fmov_d_rm (dreg, (uintptr)&dhex_exp_1); - break; - case 0x0d: - fmov_d_rm (dreg, (uintptr)&dhex_l2_e); - break; - case 0x0e: - fmov_d_rm (dreg, (uintptr)&dhex_l10_e); - break; - case 0x0f: - fmov_d_ri_0 (dreg); - break; - case 0x30: - fmov_d_rm (dreg, (uintptr)&dhex_ln_2); - break; - case 0x31: - fmov_d_rm (dreg, (uintptr)&dhex_ln_10); - break; - case 0x32: - fmov_d_ri_1 (dreg); - break; - case 0x33: - fmov_d_ri_10 (dreg); - break; - case 0x34: - fmov_d_ri_100 (dreg); - break; - case 0x35: - fmov_l_ri (dreg, 10000); - break; - case 0x36: - fmov_rm (dreg, (uintptr)&fp_1e8); - break; - case 0x37: - fmov_d_rm (dreg, (uintptr)&dhex_1e16); - break; - case 0x38: - fmov_d_rm (dreg, (uintptr)&dhex_1e32); - break; - case 0x39: - fmov_d_rm (dreg, (uintptr)&dhex_1e64); - break; - case 0x3a: - fmov_d_rm (dreg, (uintptr)&dhex_1e128); - break; - case 0x3b: - fmov_d_rm (dreg, (uintptr)&dhex_1e256); - break; - default: - FAIL (1); - return; - } - fmov_rr (FP_RESULT, dreg); - return; - } - if (opmode & 0x20) /* two operands, so we need a scratch reg */ - sreg = FS1; - else /* one operand only, thus we can load the argument into dreg */ - sreg = dreg; - if(opmode >= 0x30 && opmode <= 0x37) { - // get out early for unsupported ops - FAIL (1); - return; - } - if ((prec = comp_fp_get (opcode, extra, sreg)) < 0) { - FAIL (1); - return; - } - if (!opmode) { /* FMOVE ,FPx */ - fmov_rr (FP_RESULT, dreg); - return; - } - /* no break here for to dreg */ - case 0: /* directly from sreg to dreg */ - if (!source) { /* no */ - dont_care_fflags (); - sreg = (extra >> 10) & 7; - } - switch (opmode) { - case 0x00: /* FMOVE */ - fmov_rr (dreg, sreg); - break; - case 0x01: /* FINT */ - frndint_rr (dreg, sreg); - break; - case 0x02: /* FSINH */ - ffunc_rr (sinh, dreg, sreg); - break; - case 0x03: /* FINTRZ */ - frndintz_rr (dreg, sreg); - break; - case 0x04: /* FSQRT */ - fsqrt_rr (dreg, sreg); - break; - case 0x06: /* FLOGNP1 */ - ffunc_rr (log1p, dreg, sreg); - break; - case 0x08: /* FETOXM1 */ - ffunc_rr (expm1, dreg, sreg); - break; - case 0x09: /* FTANH */ - ffunc_rr (tanh, dreg, sreg); - break; - case 0x0a: /* FATAN */ - ffunc_rr (atan, dreg, sreg); - break; - case 0x0c: /* FASIN */ - ffunc_rr (asin, dreg, sreg); - break; - case 0x0d: /* FATANH */ - ffunc_rr (atanh, dreg, sreg); - break; - case 0x0e: /* FSIN */ - ffunc_rr (sin, dreg, sreg); - break; - case 0x0f: /* FTAN */ - ffunc_rr (tan, dreg, sreg); - break; - case 0x10: /* FETOX */ - ffunc_rr (exp, dreg, sreg); - break; - case 0x11: /* FTWOTOX */ - fpowx_rr (2, dreg, sreg); - break; - case 0x12: /* FTENTOX */ - fpowx_rr (10, dreg, sreg); - break; - case 0x14: /* FLOGN */ - ffunc_rr (log, dreg, sreg); - break; - case 0x15: /* FLOG10 */ - ffunc_rr (log10, dreg, sreg); - break; - case 0x16: /* FLOG2 */ - ffunc_rr (log2, dreg, sreg); - break; - case 0x18: /* FABS */ - fabs_rr (dreg, sreg); - break; - case 0x19: /* FCOSH */ - ffunc_rr (cosh, dreg, sreg); - break; - case 0x1a: /* FNEG */ - fneg_rr (dreg, sreg); - break; - case 0x1c: /* FACOS */ - ffunc_rr (acos, dreg, sreg); - break; - case 0x1d: /* FCOS */ - ffunc_rr (cos, dreg, sreg); - break; - case 0x20: /* FDIV */ - fdiv_rr (dreg, sreg); - break; - case 0x21: /* FMOD */ - fmod_rr (dreg, sreg); - break; - case 0x22: /* FADD */ - fadd_rr (dreg, sreg); - break; - case 0x23: /* FMUL */ - fmul_rr (dreg, sreg); - break; - case 0x24: /* FSGLDIV */ - fsgldiv_rr (dreg, sreg); - break; - case 0x60: /* FSDIV */ - fdiv_rr (dreg, sreg); - if (!currprefs.fpu_strict) /* faster, but less strict rounding */ - break; - fcuts_r (dreg); - break; - case 0x25: /* FREM */ - frem1_rr (dreg, sreg); - break; - case 0x27: /* FSGLMUL */ - fsglmul_rr (dreg, sreg); - break; - case 0x63: /* FSMUL */ - fmul_rr (dreg, sreg); - if (!currprefs.fpu_strict) /* faster, but less strict rounding */ - break; - fcuts_r (dreg); - break; - case 0x28: /* FSUB */ - fsub_rr (dreg, sreg); - break; - case 0x30: /* FSINCOS */ - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - FAIL (1); - return; - case 0x38: /* FCMP */ - fmov_rr (FP_RESULT, dreg); - fsub_rr (FP_RESULT, sreg); - return; - case 0x3a: /* FTST */ - fmov_rr (FP_RESULT, sreg); - return; - case 0x40: /* FSMOVE */ - if (prec == 1 || !currprefs.fpu_strict) { - if (sreg != dreg) /* no */ - fmov_rr (dreg, sreg); - } - else { - fmovs_rr (dreg, sreg); - } - break; - case 0x44: /* FDMOVE */ - if (sreg != dreg) /* no */ - fmov_rr (dreg, sreg); - break; - case 0x41: /* FSSQRT */ - fsqrt_rr (dreg, sreg); - if (!currprefs.fpu_strict) /* faster, but less strict rounding */ - break; - fcuts_r (dreg); - break; - case 0x45: /* FDSQRT */ - fsqrt_rr (dreg, sreg); - break; - case 0x58: /* FSABS */ - fabs_rr (dreg, sreg); - if (prec != 1 && currprefs.fpu_strict) - fcuts_r (dreg); - break; - case 0x5a: /* FSNEG */ - fneg_rr (dreg, sreg); - if (prec != 1 && currprefs.fpu_strict) - fcuts_r (dreg); - break; - case 0x5c: /* FDABS */ - fabs_rr (dreg, sreg); - break; - case 0x5e: /* FDNEG */ - fneg_rr (dreg, sreg); - break; - case 0x62: /* FSADD */ - fadd_rr (dreg, sreg); - if (!currprefs.fpu_strict) /* faster, but less strict rounding */ - break; - fcuts_r (dreg); - break; - case 0x64: /* FDDIV */ - fdiv_rr (dreg, sreg); - break; - case 0x66: /* FDADD */ - fadd_rr (dreg, sreg); - break; - case 0x67: /* FDMUL */ - fmul_rr (dreg, sreg); - break; - case 0x68: /* FSSUB */ - fsub_rr (dreg, sreg); - if (!currprefs.fpu_strict) /* faster, but less strict rounding */ - break; - fcuts_r (dreg); - break; - case 0x6c: /* FDSUB */ - fsub_rr (dreg, sreg); - break; - default: - FAIL (1); - return; - } - fmov_rr (FP_RESULT, dreg); - return; - default: - write_log (_T ("Unsupported JIT-FPU instruction: 0x%04x %04x\n"), opcode, extra); - FAIL (1); - return; - } -} -#endif +// +// Created by midwan on 22/12/2023. +// + +#if defined(CPU_arm) || defined(CPU_AARCH64) +#include "arm/compemu_fpp_arm.cpp" +#elif defined(__x86_64__) || defined(_M_AMD64) +#include "x86/compemu_fpp_x86.cpp" +#endif \ No newline at end of file diff --git a/src/jit/compemu_prefs.cpp b/src/jit/compemu_prefs.cpp new file mode 100644 index 000000000..ab11119cf --- /dev/null +++ b/src/jit/compemu_prefs.cpp @@ -0,0 +1,84 @@ +/******************************************************************** + * Preferences handling. This is just a convenient place to put it * + ********************************************************************/ +extern bool have_done_picasso; + +bool check_prefs_changed_comp (bool checkonly) +{ + bool changed = 0; + static int cachesize_prev, comptrust_prev; + static bool canbang_prev; + + special_mem_default = currprefs.comptrustbyte ? (S_READ | S_WRITE | S_N_ADDR) : 0; + + if (currprefs.comptrustbyte != changed_prefs.comptrustbyte || + currprefs.comptrustword != changed_prefs.comptrustword || + currprefs.comptrustlong != changed_prefs.comptrustlong || + currprefs.comptrustnaddr!= changed_prefs.comptrustnaddr || + currprefs.compnf != changed_prefs.compnf || + currprefs.comp_hardflush != changed_prefs.comp_hardflush || + currprefs.comp_constjump != changed_prefs.comp_constjump || + currprefs.compfpu != changed_prefs.compfpu || + currprefs.fpu_strict != changed_prefs.fpu_strict || + currprefs.cachesize != changed_prefs.cachesize) + changed = 1; + + if (checkonly) + return changed; + + currprefs.comptrustbyte = changed_prefs.comptrustbyte; + currprefs.comptrustword = changed_prefs.comptrustword; + currprefs.comptrustlong = changed_prefs.comptrustlong; + currprefs.comptrustnaddr= changed_prefs.comptrustnaddr; + currprefs.compnf = changed_prefs.compnf; + currprefs.comp_hardflush = changed_prefs.comp_hardflush; + currprefs.comp_constjump = changed_prefs.comp_constjump; + currprefs.compfpu = changed_prefs.compfpu; + currprefs.fpu_strict = changed_prefs.fpu_strict; + + if (currprefs.cachesize != changed_prefs.cachesize) { + if (currprefs.cachesize && !changed_prefs.cachesize) { + cachesize_prev = currprefs.cachesize; + comptrust_prev = currprefs.comptrustbyte; + canbang_prev = canbang; + } else if (!currprefs.cachesize && changed_prefs.cachesize == cachesize_prev) { + changed_prefs.comptrustbyte = currprefs.comptrustbyte = comptrust_prev; + changed_prefs.comptrustword = currprefs.comptrustword = comptrust_prev; + changed_prefs.comptrustlong = currprefs.comptrustlong = comptrust_prev; + changed_prefs.comptrustnaddr = currprefs.comptrustnaddr = comptrust_prev; + } + currprefs.cachesize = changed_prefs.cachesize; + alloc_cache(); + changed = 1; + } + + // Turn off illegal-mem logging when using JIT... + if(currprefs.cachesize) + currprefs.illegal_mem = changed_prefs.illegal_mem;// = 0; + + if ((!canbang || !currprefs.cachesize) && currprefs.comptrustbyte != 1) { + // Set all of these to indirect when canbang == 0 + currprefs.comptrustbyte = 1; + currprefs.comptrustword = 1; + currprefs.comptrustlong = 1; + currprefs.comptrustnaddr= 1; + + changed_prefs.comptrustbyte = 1; + changed_prefs.comptrustword = 1; + changed_prefs.comptrustlong = 1; + changed_prefs.comptrustnaddr= 1; + + changed = 1; + + if (currprefs.cachesize) + write_log (_T("JIT: Reverting to \"indirect\" access, because canbang is zero!\n")); + } + + if (changed) + write_log (_T("JIT: cache=%d. b=%d w=%d l=%d fpu=%d nf=%d inline=%d hard=%d\n"), + currprefs.cachesize, + currprefs.comptrustbyte, currprefs.comptrustword, currprefs.comptrustlong, + currprefs.compfpu, currprefs.compnf, currprefs.comp_constjump, currprefs.comp_hardflush); + + return changed; +} diff --git a/src/jit/compemu_support.cpp b/src/jit/compemu_support.cpp index 0475a5a56..780e4c12f 100644 --- a/src/jit/compemu_support.cpp +++ b/src/jit/compemu_support.cpp @@ -1,2634 +1,9 @@ -/* - * compiler/compemu_support.cpp - Core dynamic translation engine - * - * Copyright (c) 2001-2009 Milan Jurik of ARAnyM dev team (see AUTHORS) - * - * Inspired by Christian Bauer's Basilisk II - * - * This file is part of the ARAnyM project which builds a new and powerful - * TOS/FreeMiNT compatible virtual machine running on almost any hardware. - * - * JIT compiler m68k -> ARM - * - * Original 68040 JIT compiler for UAE, copyright 2000-2002 Bernd Meyer - * Adaptation for Basilisk II and improvements, copyright 2000-2004 Gwenole Beauchesne - * Portions related to CPU detection come from linux/arch/i386/kernel/setup.c - * - * ARAnyM is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * ARAnyM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with ARAnyM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#include "sysdeps.h" - -#if defined(JIT) - -#include "options.h" -#include "include/memory.h" -#include "newcpu.h" -#include "custom.h" -#include "comptbl.h" -#include "compemu.h" -#include - - -#ifdef __MACH__ -// Needed for sys_cache_invalidate to on the JIT space region, Mac OS X specific -#include -#endif - -#if DEBUG -#define PROFILE_COMPILE_TIME 1 -#endif -//#define PROFILE_UNTRANSLATED_INSNS 1 - -#if defined(CPU_AARCH64) -#define PRINT_PTR "%016llx" -#else -#define PRINT_PTR "%08x" -#endif - -#define jit_log(format, ...) \ - write_log("JIT: " format "\n", ##__VA_ARGS__); - -#ifdef JIT_DEBUG -#undef abort -#define abort() do { \ - fprintf(stderr, "Abort in file %s at line %d\n", __FILE__, __LINE__); \ - SDL_Quit(); \ - exit(EXIT_FAILURE); \ -} while (0) -#endif - -#ifdef PROFILE_COMPILE_TIME -#include -static uae_u32 compile_count = 0; -static clock_t compile_time = 0; -static clock_t emul_start_time = 0; -static clock_t emul_end_time = 0; -#endif - -#ifdef PROFILE_UNTRANSLATED_INSNS -static int untranslated_top_ten = 20; -static uae_u32 raw_cputbl_count[65536] = { 0, }; -static uae_u16 opcode_nums[65536]; - - -static int untranslated_compfn(const void *e1, const void *e2) -{ - return raw_cputbl_count[*(const uae_u16*)e1] < raw_cputbl_count[*(const uae_u16*)e2]; - int v1 = *(const uae_u16*)e1; - int v2 = *(const uae_u16*)e2; - return (int)raw_cputbl_count[v2] - (int)raw_cputbl_count[v1]; -} -#endif - -static compop_func *compfunctbl[65536]; -static compop_func *nfcompfunctbl[65536]; -uae_u8* comp_pc_p; - -// gb-- Extra data for Basilisk II/JIT -#define follow_const_jumps (true) - -static uae_u32 cache_size = 0; // Size of total cache allocated for compiled blocks -static uae_u32 current_cache_size = 0; // Cache grows upwards: how much has been consumed already -#ifdef USE_JIT_FPU -#define avoid_fpu (!currprefs.compfpu) -#else -#define avoid_fpu (true) -#endif -static const int optcount = 4; // How often a block has to be executed before it is translated - -op_properties prop[65536]; - -bool may_raise_exception = false; -static bool flags_carry_inverted = false; -static bool disasm_this = false; - - -STATIC_INLINE bool is_const_jump(uae_u32 opcode) -{ - return (prop[opcode].cflow == fl_const_jump); -} - -uae_u8* start_pc_p; -uae_u32 start_pc; -static uintptr current_block_start_target; -uae_u32 needed_flags; -static uintptr next_pc_p; -static uintptr taken_pc_p; -static int branch_cc; - -uae_u8* current_compile_p = NULL; -static uae_u8* max_compile_start; -uae_u8* compiled_code = NULL; -const int POPALLSPACE_SIZE = 2048; /* That should be enough space */ -uae_u8* popallspace = NULL; - -void* pushall_call_handler = NULL; -static void* popall_execute_normal = NULL; -static void* popall_check_checksum = NULL; -static void* popall_execute_normal_setpc = NULL; -static void* popall_check_checksum_setpc = NULL; -static void* popall_exec_nostats_setpc = NULL; -static void* popall_recompile_block = NULL; -static void* popall_do_nothing = NULL; -static void* popall_cache_miss = NULL; -static void* popall_execute_exception = NULL; - -/* The 68k only ever executes from even addresses. So right now, we - * waste half the entries in this array - * UPDATE: We now use those entries to store the start of the linked - * lists that we maintain for each hash result. - */ -static cacheline cache_tags[TAGSIZE]; -static int cache_enabled=0; -static blockinfo* hold_bi[MAX_HOLD_BI]; -blockinfo* active; -blockinfo* dormant; - -#if !defined (WIN32) || !defined(ANDROID) -#include - -static void cache_free (uae_u8 *cache, int size) -{ - munmap(cache, size); -} - -static uae_u8 *cache_alloc (int size) -{ - size = size < getpagesize() ? getpagesize() : size; -// Mac OS sets MAP_FAILED if things fail so we need to check for that error code on Mac OS -// In addition, the only way we get to have both WRITE and EXEC on the same process is by enabling MAP_JIT and there are further limitations as to how we can use that -// Mainly that we're not allowed to have both WRITE and EXEC active at the same time, we need to call pthread_jit_write_protect with true/false to either enable WRITE -// or Exec (but never both at the same time) -#ifdef __MACH__ - void *cache = mmap(0, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_JIT | MAP_PRIVATE | MAP_ANON, -1, 0); - if (cache == MAP_FAILED) { -#else - void *cache = mmap(0, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0); - if (!cache) { -#endif - printf ("Cache_Alloc of %d failed. ERR=%d\n", size, errno); - } else { -#ifdef __MACH__ - // Disable write protect on the JIT before we memset it on OS X, this would work on x86-64 Mac OS x as well, but is a no-op - pthread_jit_write_protect_np(false); -#endif - memset(cache, 0, size); - } - return (uae_u8 *) cache; -} - -#endif - -extern const struct comptbl op_smalltbl_0_comp_nf[]; -extern const struct comptbl op_smalltbl_0_comp_ff[]; - -static bigstate live; - -static int writereg(int r); -static void unlock2(int r); -static void setlock(int r); -static int readreg(int r); -static void prepare_for_call_1(void); -static void prepare_for_call_2(void); - -STATIC_INLINE void flush_cpu_icache(void *from, void *to); -STATIC_INLINE void write_jmp_target(uae_u32 *jmpaddr, uintptr a); - -uae_u32 m68k_pc_offset; - -/* Flag handling is complicated. - * - * ARM instructions create flags, which quite often are exactly what we - * want. So at times, the "68k" flags are actually in the ARM flags. - * Exception: carry is often inverted. - * - * Then again, sometimes we do ARM instructions that clobber the ARM - * flags, but don't represent a corresponding m68k instruction. In that - * case, we have to save them. - * - * We used to save them to the stack, but now store them back directly - * into the regflags.nzcv of the traditional emulation. Thus some odd - * names. - * - * So flags can be in either of two places (used to be three; boy were - * things complicated back then!); And either place can contain either - * valid flags or invalid trash (and on the stack, there was also the - * option of "nothing at all", now gone). A couple of variables keep - * track of the respective states. - * - * To make things worse, we might or might not be interested in the flags. - * by default, we are, but a call to dont_care_flags can change that - * until the next call to live_flags. If we are not, pretty much whatever - * is in the register and/or the native flags is seen as valid. -*/ - -STATIC_INLINE blockinfo* get_blockinfo(uae_u32 cl) -{ - return cache_tags[cl + 1].bi; -} - -STATIC_INLINE blockinfo* get_blockinfo_addr(void* addr) -{ - blockinfo* bi = get_blockinfo(cacheline(addr)); - - while (bi) { - if (bi->pc_p == addr) - return bi; - bi = bi->next_same_cl; - } - return NULL; -} - - -/******************************************************************* - * All sorts of list related functions for all of the lists * - *******************************************************************/ - -STATIC_INLINE void remove_from_cl_list(blockinfo* bi) -{ - uae_u32 cl = cacheline(bi->pc_p); - - if (bi->prev_same_cl_p) - *(bi->prev_same_cl_p) = bi->next_same_cl; - if (bi->next_same_cl) - bi->next_same_cl->prev_same_cl_p = bi->prev_same_cl_p; - if (cache_tags[cl + 1].bi) - cache_tags[cl].handler = cache_tags[cl + 1].bi->handler_to_use; - else - cache_tags[cl].handler = (cpuop_func*)popall_execute_normal; -} - -STATIC_INLINE void remove_from_list(blockinfo* bi) -{ - if (bi->prev_p) - *(bi->prev_p) = bi->next; - if (bi->next) - bi->next->prev_p = bi->prev_p; -} - -STATIC_INLINE void add_to_cl_list(blockinfo* bi) -{ - uae_u32 cl = cacheline(bi->pc_p); - - if (cache_tags[cl + 1].bi) - cache_tags[cl + 1].bi->prev_same_cl_p = &(bi->next_same_cl); - bi->next_same_cl = cache_tags[cl + 1].bi; - - cache_tags[cl + 1].bi = bi; - bi->prev_same_cl_p = &(cache_tags[cl + 1].bi); - - cache_tags[cl].handler = bi->handler_to_use; -} - -void raise_in_cl_list(blockinfo* bi) -{ - remove_from_cl_list(bi); - add_to_cl_list(bi); -} - -STATIC_INLINE void add_to_active(blockinfo* bi) -{ - if (active) - active->prev_p = &(bi->next); - bi->next = active; - - active = bi; - bi->prev_p = &active; -} - -STATIC_INLINE void add_to_dormant(blockinfo* bi) -{ - if (dormant) - dormant->prev_p = &(bi->next); - bi->next = dormant; - - dormant = bi; - bi->prev_p = &dormant; -} - -STATIC_INLINE void remove_dep(dependency* d) -{ - if (d->prev_p) - *(d->prev_p) = d->next; - if (d->next) - d->next->prev_p = d->prev_p; - d->prev_p = NULL; - d->next = NULL; -} - -/* This block's code is about to be thrown away, so it no longer - depends on anything else */ -STATIC_INLINE void remove_deps(blockinfo* bi) -{ - remove_dep(&(bi->dep[0])); - remove_dep(&(bi->dep[1])); -} - -STATIC_INLINE void adjust_jmpdep(dependency* d, cpuop_func* a) -{ - write_jmp_target(d->jmp_off, (uintptr)a); -} - -/******************************************************************** - * Soft flush handling support functions * - ********************************************************************/ - -STATIC_INLINE void set_dhtu(blockinfo* bi, cpuop_func* dh) -{ - if (dh != bi->direct_handler_to_use) { - dependency* x = bi->deplist; - while (x) { - if (x->jmp_off) { - adjust_jmpdep(x, dh); - } - x = x->next; - } - bi->direct_handler_to_use = (cpuop_func*)dh; - } -} - -void invalidate_block(blockinfo* bi) -{ - int i; - - bi->optlevel = 0; - bi->count = optcount - 1; - bi->handler = NULL; - bi->handler_to_use = (cpuop_func*)popall_execute_normal; - bi->direct_handler = NULL; - set_dhtu(bi, bi->direct_pen); - bi->needed_flags = 0xff; - bi->status = BI_INVALID; - for (i = 0; i < 2; i++) { - bi->dep[i].jmp_off = NULL; - bi->dep[i].target = NULL; - } - remove_deps(bi); -} - -STATIC_INLINE void create_jmpdep(blockinfo* bi, int i, uae_u32* jmpaddr, uae_u32 target) -{ - blockinfo* tbi = get_blockinfo_addr((void*)(uintptr)target); - - bi->dep[i].jmp_off = jmpaddr; - bi->dep[i].source = bi; - bi->dep[i].target = tbi; - bi->dep[i].next = tbi->deplist; - if (bi->dep[i].next) - bi->dep[i].next->prev_p = &(bi->dep[i].next); - bi->dep[i].prev_p = &(tbi->deplist); - tbi->deplist = &(bi->dep[i]); -} - -STATIC_INLINE blockinfo* get_blockinfo_addr_new(void* addr) -{ - blockinfo* bi = get_blockinfo_addr(addr); - int i; - - if (!bi) { - for (i = 0; i < MAX_HOLD_BI && !bi; i++) { - if (hold_bi[i]) { - (void)cacheline(addr); - - bi = hold_bi[i]; - hold_bi[i] = NULL; - bi->pc_p = (uae_u8*)addr; - invalidate_block(bi); - add_to_active(bi); - add_to_cl_list(bi); - } - } - } - if (!bi) { - jit_abort(_T("JIT: Looking for blockinfo, can't find free one\n")); - } - return bi; -} - -static void prepare_block(blockinfo* bi); - -/* Management of blockinfos. - - A blockinfo struct is allocated whenever a new block has to be - compiled. If the list of free blockinfos is empty, we allocate a new - pool of blockinfos and link the newly created blockinfos altogether - into the list of free blockinfos. Otherwise, we simply pop a structure - of the free list. - - Blockinfo are lazily deallocated, i.e. chained altogether in the - list of free blockinfos whenvever a translation cache flush (hard or - soft) request occurs. -*/ - -template< class T > -class LazyBlockAllocator -{ - enum { - kPoolSize = 1 + (16384 - sizeof(T) - sizeof(void*)) / sizeof(T) - }; - struct Pool { - T chunk[kPoolSize]; - Pool* next; - }; - Pool* mPools; - T* mChunks; -public: - LazyBlockAllocator() : mPools(0), mChunks(0) { } - ~LazyBlockAllocator(); - T* acquire(); - void release(T* const); -}; - -template< class T > -LazyBlockAllocator::~LazyBlockAllocator() -{ - Pool* currentPool = mPools; - while (currentPool) { - Pool* deadPool = currentPool; - currentPool = currentPool->next; - free(deadPool); - } -} - -template< class T > -T* LazyBlockAllocator::acquire() -{ - if (!mChunks) { - // There is no chunk left, allocate a new pool and link the - // chunks into the free list - Pool* newPool = (Pool*)malloc(sizeof(Pool)); - if (newPool == NULL) { - jit_abort(_T("FATAL: Could not allocate block pool!\n")); - } - for (T* chunk = &newPool->chunk[0]; chunk < &newPool->chunk[kPoolSize]; chunk++) { - chunk->next = mChunks; - mChunks = chunk; - } - newPool->next = mPools; - mPools = newPool; - } - T* chunk = mChunks; - mChunks = chunk->next; - return chunk; -} - -template< class T > -void LazyBlockAllocator::release(T* const chunk) -{ - chunk->next = mChunks; - mChunks = chunk; -} - - -static LazyBlockAllocator BlockInfoAllocator; -static LazyBlockAllocator ChecksumInfoAllocator; - -STATIC_INLINE checksum_info* alloc_checksum_info(void) -{ - checksum_info* csi = ChecksumInfoAllocator.acquire(); - csi->next = NULL; - return csi; -} - -STATIC_INLINE void free_checksum_info(checksum_info* csi) -{ - csi->next = NULL; - ChecksumInfoAllocator.release(csi); -} - -STATIC_INLINE void free_checksum_info_chain(checksum_info* csi) -{ - while (csi != NULL) { - checksum_info* csi2 = csi->next; - free_checksum_info(csi); - csi = csi2; - } -} - -STATIC_INLINE blockinfo* alloc_blockinfo(void) -{ - blockinfo* bi = BlockInfoAllocator.acquire(); - bi->csi = NULL; - return bi; -} - -STATIC_INLINE void free_blockinfo(blockinfo* bi) -{ - free_checksum_info_chain(bi->csi); - bi->csi = NULL; - BlockInfoAllocator.release(bi); -} - -STATIC_INLINE void alloc_blockinfos(void) -{ - int i; - blockinfo* bi; - - for (i = 0; i < MAX_HOLD_BI; i++) { - if (hold_bi[i]) - return; - bi = hold_bi[i] = alloc_blockinfo(); -#ifdef __MACH__ - // Turn off write protect (which prevents execution) on JIT cache while the blocks are prepared, this is Mac OS X specific, it will work on x86-64, but as a noop - pthread_jit_write_protect_np(false); -#endif - prepare_block(bi); - } -} - -bool check_prefs_changed_comp(bool checkonly) -{ - bool changed = 0; - static int cachesize_prev, comptrust_prev; - static bool canbang_prev; - - special_mem_default = currprefs.comptrustbyte ? (S_READ | S_WRITE | S_N_ADDR) : 0; - - if (currprefs.comptrustbyte != changed_prefs.comptrustbyte || - currprefs.comptrustword != changed_prefs.comptrustword || - currprefs.comptrustlong != changed_prefs.comptrustlong || - currprefs.comptrustnaddr != changed_prefs.comptrustnaddr || - currprefs.compnf != changed_prefs.compnf || - currprefs.comp_hardflush != changed_prefs.comp_hardflush || - currprefs.comp_constjump != changed_prefs.comp_constjump || - currprefs.compfpu != changed_prefs.compfpu || - currprefs.fpu_strict != changed_prefs.fpu_strict || - currprefs.cachesize != changed_prefs.cachesize) - changed = 1; - - if (checkonly) - return changed; - - currprefs.comptrustbyte = changed_prefs.comptrustbyte; - currprefs.comptrustword = changed_prefs.comptrustword; - currprefs.comptrustlong = changed_prefs.comptrustlong; - currprefs.comptrustnaddr = changed_prefs.comptrustnaddr; - currprefs.compnf = changed_prefs.compnf; - currprefs.comp_hardflush = changed_prefs.comp_hardflush; - currprefs.comp_constjump = changed_prefs.comp_constjump; - currprefs.compfpu = changed_prefs.compfpu; - currprefs.fpu_strict = changed_prefs.fpu_strict; - - if (currprefs.cachesize != changed_prefs.cachesize) { - if (currprefs.cachesize && !changed_prefs.cachesize) { - cachesize_prev = currprefs.cachesize; - comptrust_prev = currprefs.comptrustbyte; - canbang_prev = canbang; - } - else if (!currprefs.cachesize && changed_prefs.cachesize == cachesize_prev) { - changed_prefs.comptrustbyte = currprefs.comptrustbyte = comptrust_prev; - changed_prefs.comptrustword = currprefs.comptrustword = comptrust_prev; - changed_prefs.comptrustlong = currprefs.comptrustlong = comptrust_prev; - changed_prefs.comptrustnaddr = currprefs.comptrustnaddr = comptrust_prev; - } - currprefs.cachesize = changed_prefs.cachesize; -#ifdef AMIBERRY - if (currprefs.cachesize && currprefs.fast_copper) - chipmem_bank.jit_write_flag = S_WRITE; - else - chipmem_bank.jit_write_flag = 0; -#endif - alloc_cache(); - changed = 1; - } - - // Turn off illegal-mem logging when using JIT... - if (currprefs.cachesize) - currprefs.illegal_mem = changed_prefs.illegal_mem;// = 0; - - if ((!canbang || !currprefs.cachesize) && currprefs.comptrustbyte != 1) { - // Set all of these to indirect when canbang == 0 - currprefs.comptrustbyte = 1; - currprefs.comptrustword = 1; - currprefs.comptrustlong = 1; - currprefs.comptrustnaddr = 1; - - changed_prefs.comptrustbyte = 1; - changed_prefs.comptrustword = 1; - changed_prefs.comptrustlong = 1; - changed_prefs.comptrustnaddr = 1; - - changed = 1; - - if (currprefs.cachesize) - write_log(_T("JIT: Reverting to \"indirect\" access, because canbang is zero!\n")); - } - - if (changed) - write_log(_T("JIT: cache=%d. b=%d w=%d l=%d fpu=%d nf=%d inline=%d hard=%d\n"), - currprefs.cachesize, - currprefs.comptrustbyte, currprefs.comptrustword, currprefs.comptrustlong, - currprefs.compfpu, currprefs.compnf, currprefs.comp_constjump, currprefs.comp_hardflush); - - return changed; -} - -/******************************************************************** - * Functions to emit data into memory, and other general support * - ********************************************************************/ - -static uae_u8* target; - -STATIC_INLINE void emit_long(uae_u32 x) -{ - *(uae_u32*)target = x; - target += 4; -} - -STATIC_INLINE void emit_longlong(uae_u64 x) -{ - *(uae_u64*)target = x; - target += 8; -} - -#define MAX_COMPILE_PTR max_compile_start - -static void set_target(uae_u8* t) -{ - target = t; -} - -STATIC_INLINE uae_u8* get_target(void) -{ - return target; -} - -/******************************************************************** - * New version of data buffer: interleave data and code * - ********************************************************************/ -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - -#define DATA_BUFFER_SIZE 768 // Enlarge POPALLSPACE_SIZE if this value is greater than 768 -#define DATA_BUFFER_MAXOFFSET 4096 - 32 // max range between emit of data and use of data -static uae_u8* data_writepos = 0; -static uae_u8* data_endpos = 0; -#ifdef DEBUG_DATA_BUFFER -static uae_u32 data_wasted = 0; -static uae_u32 data_buffers_used = 0; -#endif - -STATIC_INLINE void compemu_raw_branch(IM32 d); - -STATIC_INLINE void data_check_end(uae_s32 n, uae_s32 codesize) -{ - if (data_writepos + n > data_endpos || get_target() + codesize - data_writepos > DATA_BUFFER_MAXOFFSET) { - // Start new buffer -#ifdef DEBUG_DATA_BUFFER - if (data_writepos < data_endpos) - data_wasted += data_endpos - data_writepos; - data_buffers_used++; -#endif - compemu_raw_branch(DATA_BUFFER_SIZE); - data_writepos = get_target(); - data_endpos = data_writepos + DATA_BUFFER_SIZE; - set_target(get_target() + DATA_BUFFER_SIZE); - } -} - -STATIC_INLINE uae_s32 data_word_offs(uae_u16 x) -{ - data_check_end(4, 4); - *((uae_u16*)data_writepos) = x; - data_writepos += 2; - *((uae_u16*)data_writepos) = 0; - data_writepos += 2; - return (uae_s32)data_writepos - (uae_s32)get_target() - 12; -} - -STATIC_INLINE uae_s32 data_long(uae_u32 x, uae_s32 codesize) -{ - data_check_end(4, codesize); - *((uae_u32*)data_writepos) = x; - data_writepos += 4; - return (uae_s32)data_writepos - 4; -} - -STATIC_INLINE uae_s32 data_long_offs(uae_u32 x) -{ - data_check_end(4, 4); - *((uae_u32*)data_writepos) = x; - data_writepos += 4; - return (uae_s32)data_writepos - (uae_s32)get_target() - 12; -} - -STATIC_INLINE uae_s32 get_data_offset(uae_s32 t) -{ - return t - (uae_s32)get_target() - 8; -} - -STATIC_INLINE void reset_data_buffer(void) -{ - data_writepos = 0; - data_endpos = 0; -} - -#endif - -/******************************************************************** - * Getting the information about the target CPU * - ********************************************************************/ -STATIC_INLINE void clobber_flags(void); - -#if defined(CPU_AARCH64) -#include "codegen_armA64.cpp" -#elif defined(CPU_arm) -#include "codegen_arm.cpp" -#endif -#if defined(CPU_i386) || defined(CPU_x86_64) -#include "codegen_x86.cpp" -#endif - - -/******************************************************************** - * Flags status handling. EMIT TIME! * - ********************************************************************/ - -static void make_flags_live_internal(void) -{ - if (live.flags_in_flags == VALID) - return; - if (live.flags_on_stack == VALID) { - int tmp; - tmp = readreg(FLAGTMP); - raw_reg_to_flags(tmp); - unlock2(tmp); - flags_carry_inverted = false; - - live.flags_in_flags = VALID; - return; - } - jit_abort("Huh? live.flags_in_flags=%d, live.flags_on_stack=%d, but need to make live", - live.flags_in_flags, live.flags_on_stack); -} - -static void flags_to_stack(void) -{ - if (live.flags_on_stack == VALID) { - flags_carry_inverted = false; - return; - } - if (!live.flags_are_important) { - live.flags_on_stack = VALID; - flags_carry_inverted = false; - return; - } - - int tmp = writereg(FLAGTMP); - raw_flags_to_reg(tmp); - unlock2(tmp); - - live.flags_on_stack = VALID; -} - -STATIC_INLINE void clobber_flags(void) -{ - if (live.flags_in_flags == VALID && live.flags_on_stack != VALID) - flags_to_stack(); - live.flags_in_flags = TRASH; -} - -/* Prepare for leaving the compiled stuff */ -STATIC_INLINE void flush_flags(void) -{ - flags_to_stack(); -} - -static int touchcnt; - -/******************************************************************** - * register allocation per block logging * - ********************************************************************/ - -STATIC_INLINE void do_load_reg(int n, int r) -{ - compemu_raw_mov_l_rm(n, (uintptr)live.state[r].mem); -} - -/******************************************************************** - * register status handling. EMIT TIME! * - ********************************************************************/ - -STATIC_INLINE void set_status(int r, int status) -{ - live.state[r].status = status; -} - -STATIC_INLINE int isinreg(int r) -{ - return live.state[r].status == CLEAN || live.state[r].status == DIRTY; -} - -static void tomem(int r) -{ - if (live.state[r].status == DIRTY) { - compemu_raw_mov_l_mr((uintptr)live.state[r].mem, live.state[r].realreg); - set_status(r, CLEAN); - } -} - -STATIC_INLINE int isconst(int r) -{ - return live.state[r].status == ISCONST; -} - -STATIC_INLINE void writeback_const(int r) -{ - if (!isconst(r)) - return; - - compemu_raw_mov_l_mi((uintptr)live.state[r].mem, live.state[r].val); - live.state[r].val = 0; - set_status(r, INMEM); -} - -static void evict(int r) -{ - if (!isinreg(r)) - return; - tomem(r); - int rr = live.state[r].realreg; - - live.nat[rr].nholds--; - if (live.nat[rr].nholds != live.state[r].realind) { /* Was not last */ - int topreg = live.nat[rr].holds[live.nat[rr].nholds]; - int thisind = live.state[r].realind; - - live.nat[rr].holds[thisind] = topreg; - live.state[topreg].realind = thisind; - } - live.state[r].realreg = -1; - set_status(r, INMEM); -} - -STATIC_INLINE void free_nreg(int r) -{ - int i = live.nat[r].nholds; - - while (i) { - int vr; - - --i; - vr = live.nat[r].holds[i]; - evict(vr); - } -} - -/* Use with care! */ -STATIC_INLINE void isclean(int r) -{ - if (!isinreg(r)) - return; - live.state[r].val = 0; - set_status(r, CLEAN); -} - -STATIC_INLINE void disassociate(int r) -{ - isclean(r); - evict(r); -} - -STATIC_INLINE void set_const(int r, uae_u32 val) -{ - disassociate(r); - live.state[r].val = val; - set_status(r, ISCONST); -} - -bool has_free_reg(void) -{ - for (int i = N_REGS - 1; i >= 0; i--) { - if(!live.nat[i].locked) { - if (live.nat[i].nholds == 0) - return true; - } - } - return false; -} - -static int alloc_reg_hinted(int r, int willclobber, int hint) -{ - int bestreg = -1; - uae_s32 when = 2000000000; - int i; - - for (i = N_REGS - 1; i >= 0; i--) { - if (!live.nat[i].locked) { - uae_s32 badness = live.nat[i].touched; - if (live.nat[i].nholds == 0) - badness = 0; - if (i == hint) - badness -= 200000000; - if (badness < when) { - bestreg = i; - when = badness; - if (live.nat[i].nholds == 0 && hint < 0) - break; - if (i == hint) - break; - } - } - } - - if (live.nat[bestreg].nholds > 0) { - free_nreg(bestreg); - } - - if (!willclobber) { - if (live.state[r].status != UNDEF) { - if (isconst(r)) { - compemu_raw_mov_l_ri(bestreg, live.state[r].val); - live.state[r].val = 0; - set_status(r, DIRTY); - } else { - do_load_reg(bestreg, r); - set_status(r, CLEAN); - } - } else { - live.state[r].val = 0; - set_status(r, CLEAN); - } - } else { /* this is the easiest way, but not optimal. */ - live.state[r].val = 0; - set_status(r, DIRTY); - } - live.state[r].realreg = bestreg; - live.state[r].realind = 0; - live.nat[bestreg].touched = touchcnt++; - live.nat[bestreg].holds[0] = r; - live.nat[bestreg].nholds = 1; - - return bestreg; -} - - -static void unlock2(int r) -{ - live.nat[r].locked--; -} - -static void setlock(int r) -{ - live.nat[r].locked++; -} - - -static void mov_nregs(int d, int s) -{ - if (s == d) - return; - - if (live.nat[d].nholds > 0) - free_nreg(d); - - compemu_raw_mov_l_rr(d, s); - - for (int i = 0; i < live.nat[s].nholds; i++) { - int vs = live.nat[s].holds[i]; - - live.state[vs].realreg = d; - live.state[vs].realind = i; - live.nat[d].holds[i] = vs; - } - live.nat[d].nholds = live.nat[s].nholds; - - live.nat[s].nholds = 0; -} - - -STATIC_INLINE void make_exclusive(int r, int needcopy) -{ - reg_status oldstate; - int rr = live.state[r].realreg; - int nr; - int nind; - - if (!isinreg(r)) - return; - if (live.nat[rr].nholds == 1) - return; - - /* We have to split the register */ - oldstate = live.state[r]; - - setlock(rr); /* Make sure this doesn't go away */ - /* Forget about r being in the register rr */ - disassociate(r); - /* Get a new register, that we will clobber completely */ - nr = alloc_reg_hinted(r, 1, -1); - nind = live.state[r].realind; - live.state[r] = oldstate; /* Keep all the old state info */ - live.state[r].realreg = nr; - live.state[r].realind = nind; - - if (needcopy) { - compemu_raw_mov_l_rr(nr, rr); /* Make another copy */ - } - unlock2(rr); -} - -STATIC_INLINE int readreg_general(int r, int spec) -{ - int answer = -1; - - if (live.state[r].status == UNDEF) { - jit_log("WARNING: Unexpected read of undefined register %d", r); - } - - if (isinreg(r)) { - answer = live.state[r].realreg; - } else { - /* the value is in memory to start with */ - answer = alloc_reg_hinted(r, 0, spec); - } - - if (spec >= 0 && spec != answer) { - /* Too bad */ - mov_nregs(spec, answer); - answer = spec; - } - live.nat[answer].locked++; - live.nat[answer].touched = touchcnt++; - return answer; -} - - -static int readreg(int r) -{ - return readreg_general(r, -1); -} - -static int readreg_specific(int r, int spec) -{ - return readreg_general(r, spec); -} - -/* writereg(r) - * - * INPUT - * - r : mid-layer register - * - * OUTPUT - * - hard (physical, x86 here) register allocated to virtual register r - */ -static int writereg(int r) -{ - int answer = -1; - - make_exclusive(r, 0); - if (isinreg(r)) { - answer = live.state[r].realreg; - } else { - /* the value is in memory to start with */ - answer = alloc_reg_hinted(r, 1, -1); - } - - live.nat[answer].locked++; - live.nat[answer].touched = touchcnt++; - live.state[r].val = 0; - set_status(r, DIRTY); - return answer; -} - -static int rmw(int r) -{ - int answer = -1; - - if (live.state[r].status == UNDEF) { - jit_log("WARNING: Unexpected read of undefined register %d", r); - } - make_exclusive(r, 1); - - if (isinreg(r)) { - answer = live.state[r].realreg; - } else { - /* the value is in memory to start with */ - answer = alloc_reg_hinted(r, 0, -1); - } - - set_status(r, DIRTY); - - live.nat[answer].locked++; - live.nat[answer].touched = touchcnt++; - - return answer; -} - -/******************************************************************** - * FPU register status handling. EMIT TIME! * - ********************************************************************/ -#ifdef USE_JIT_FPU - -STATIC_INLINE void f_tomem_drop(int r) -{ - if (live.fate[r].status == DIRTY) { - compemu_raw_fmov_mr_drop((uintptr)live.fate[r].mem, live.fate[r].realreg); - live.fate[r].status = INMEM; - } -} - - -STATIC_INLINE int f_isinreg(int r) -{ - return live.fate[r].status == CLEAN || live.fate[r].status == DIRTY; -} - -STATIC_INLINE void f_evict(int r) -{ - int rr; - - if (!f_isinreg(r)) - return; - rr = live.fate[r].realreg; - f_tomem_drop(r); - - live.fat[rr].nholds = 0; - live.fate[r].status = INMEM; - live.fate[r].realreg = -1; -} - -STATIC_INLINE void f_free_nreg(int r) -{ - int vr = live.fat[r].holds; - f_evict(vr); -} - - -/* Use with care! */ -STATIC_INLINE void f_isclean(int r) -{ - if (!f_isinreg(r)) - return; - live.fate[r].status = CLEAN; -} - -STATIC_INLINE void f_disassociate(int r) -{ - f_isclean(r); - f_evict(r); -} - -static int f_alloc_reg(int r, int willclobber) -{ - int bestreg; - - if (r < 8) - bestreg = r + 8; // map real Amiga reg to ARM VFP reg 8-15 (call save) - else if (r == FP_RESULT) - bestreg = 6; // map FP_RESULT to ARM VFP reg 6 - else // FS1 - bestreg = 7; // map FS1 to ARM VFP reg 7 - - if (!willclobber) { - if (live.fate[r].status == INMEM) { - compemu_raw_fmov_rm(bestreg, (uintptr)live.fate[r].mem); - live.fate[r].status = CLEAN; - } - } else { - live.fate[r].status = DIRTY; - } - live.fate[r].realreg = bestreg; - live.fat[bestreg].holds = r; - live.fat[bestreg].nholds = 1; - - return bestreg; -} - -STATIC_INLINE void f_unlock(int r) -{ -} - -STATIC_INLINE int f_readreg(int r) -{ - int answer; - - if (f_isinreg(r)) { - answer = live.fate[r].realreg; - } else { - /* the value is in memory to start with */ - answer = f_alloc_reg(r, 0); - } - - return answer; -} - -STATIC_INLINE int f_writereg(int r) -{ - int answer; - - if (f_isinreg(r)) { - answer = live.fate[r].realreg; - } else { - answer = f_alloc_reg(r, 1); - } - live.fate[r].status = DIRTY; - return answer; -} - -STATIC_INLINE int f_rmw(int r) -{ - int n; - - if (f_isinreg(r)) { - n = live.fate[r].realreg; - } else { - n = f_alloc_reg(r, 0); - } - live.fate[r].status = DIRTY; - return n; -} - -static void fflags_into_flags_internal(void) -{ - int r = f_readreg(FP_RESULT); - raw_fflags_into_flags(r); - f_unlock(r); - live_flags(); -} - -#endif - -#if defined(CPU_AARCH64) -#include "compemu_midfunc_armA64.cpp" -#include "compemu_midfunc_armA64_2.cpp" -#elif defined(CPU_arm) -#include "compemu_midfunc_arm.cpp" -#include "compemu_midfunc_arm2.cpp" -#endif - -#if defined(CPU_i386) || defined(CPU_x86_64) -#include "compemu_midfunc_x86.cpp" -#endif - - -/******************************************************************** - * Support functions exposed to gencomp. CREATE time * - ********************************************************************/ - -#ifdef __MACH__ -void cache_invalidate(void) { - // Invalidate cache on the JIT cache - sys_icache_invalidate(popallspace, POPALLSPACE_SIZE + MAX_JIT_CACHE * 1024); -} -#endif - -uae_u32 get_const(int r) -{ - return live.state[r].val; -} - -void sync_m68k_pc(void) -{ - if (m68k_pc_offset) { - arm_ADD_l_ri(PC_P, m68k_pc_offset); - comp_pc_p += m68k_pc_offset; - m68k_pc_offset = 0; - } -} - -/******************************************************************** - * Support functions exposed to newcpu * - ********************************************************************/ - -void compiler_exit(void) -{ - //if(current_compile_p != 0 && compiled_code != 0 && current_compile_p > compiled_code) - // jit_log("used size: %8d bytes", current_compile_p - compiled_code); - -#ifdef PROFILE_COMPILE_TIME - emul_end_time = clock(); -#endif - -#if defined(CPU_arm) && !defined(ARMV6T2) -#ifdef DEBUG_DATA_BUFFER - printf("data_wasted = %d bytes in %d blocks\n", data_wasted, data_buffers_used); -#endif -#endif - - // Deallocate translation cache - compiled_code = 0; - - // Deallocate popallspace - if (popallspace) { - cache_free(popallspace, POPALLSPACE_SIZE + MAX_JIT_CACHE * 1024); - popallspace = 0; - } - -#ifdef PROFILE_COMPILE_TIME - jit_log("### Compile Block statistics"); - jit_log("Number of calls to compile_block : %d", compile_count); - uae_u32 emul_time = emul_end_time - emul_start_time; - jit_log("Total emulation time : %.1f sec", double(emul_time) / double(CLOCKS_PER_SEC)); - jit_log("Total compilation time : %.1f sec (%.1f%%)", double(compile_time) / double(CLOCKS_PER_SEC), 100.0 * double(compile_time) / double(emul_time)); -#endif - -#ifdef PROFILE_UNTRANSLATED_INSNS - uae_u64 untranslated_count = 0; - for (int i = 0; i < 65536; i++) { - opcode_nums[i] = i; - untranslated_count += raw_cputbl_count[i]; - } - jit_log("Sorting out untranslated instructions count, total %llu...\n", untranslated_count); - qsort(opcode_nums, 65536, sizeof(uae_u16), untranslated_compfn); - jit_log("Rank Opc Count Name\n"); - for (int i = 0; i < untranslated_top_ten && i < 65536; i++) { - uae_u32 count = raw_cputbl_count[opcode_nums[i]]; - struct instr* dp; - struct mnemolookup* lookup; - if (!count) - break; - dp = table68k + opcode_nums[i]; - for (lookup = lookuptab; lookup->mnemo != (instrmnem)dp->mnemo; lookup++) - ; - jit_log(_T("%03d: %04x %10u %s\n"), i, opcode_nums[i], count, lookup->name); - } -#endif - - exit_table68k(); -} - -static void init_comp(void) -{ - int i; - uae_s8* au = always_used; - - for (i = 0; i < VREGS; i++) { - live.state[i].realreg = -1; - live.state[i].val = 0; - set_status(i, UNDEF); - } - for (i = 0; i < SCRATCH_REGS; ++i) - live.scratch_in_use[i] = 0; - - for (i = 0; i < VFREGS; i++) { - live.fate[i].status = UNDEF; - live.fate[i].realreg = -1; - live.fate[i].needflush = NF_SCRATCH; - } - - for (i = 0; i < VREGS; i++) { - if (i < 16) { /* First 16 registers map to 68k registers */ - live.state[i].mem = ®s.regs[i]; - set_status(i, INMEM); - } else if (i >= S1) { - live.state[i].mem = ®s.scratchregs[i - S1]; - } - } - live.state[PC_P].mem = (uae_u32*)&(regs.pc_p); - set_const(PC_P, (uintptr)comp_pc_p); - - live.state[FLAGX].mem = (uae_u32*)&(regs.ccrflags.x); - set_status(FLAGX, INMEM); - -#if defined(CPU_arm) - live.state[FLAGTMP].mem = (uae_u32*)&(regs.ccrflags.nzcv); -#else - live.state[FLAGTMP].mem = (uae_u32*)&(regs.ccrflags.cznv); -#endif - set_status(FLAGTMP, INMEM); - flags_carry_inverted = false; - - for (i = 0; i < VFREGS; i++) { - if (i < 8) { /* First 8 registers map to 68k FPU registers */ - live.fate[i].mem = (uae_u32*)(®s.fp[i].fp); - live.fate[i].needflush = NF_TOMEM; - live.fate[i].status = INMEM; - } else if (i == FP_RESULT) { - live.fate[i].mem = (uae_u32*)(®s.fp_result.fp); - live.fate[i].needflush = NF_TOMEM; - live.fate[i].status = INMEM; - } else { - live.fate[i].mem = (uae_u32*)(®s.scratchfregs[i - 8]); - } - } - - for (i = 0; i < N_REGS; i++) { - live.nat[i].touched = 0; - live.nat[i].nholds = 0; - live.nat[i].locked = 0; - if (*au == i) { - live.nat[i].locked = 1; - au++; - } - } - - for (i = 0; i < N_FREGS; i++) { - live.fat[i].nholds = 0; - } - - touchcnt = 1; - m68k_pc_offset = 0; - live.flags_in_flags = TRASH; - live.flags_on_stack = VALID; - live.flags_are_important = 1; - - regs.jit_exception = 0; -} - -/* Only do this if you really mean it! The next call should be to init!*/ -static void flush(int save_regs) -{ - int i; - - flush_flags(); /* low level */ - sync_m68k_pc(); /* mid level */ - - if (save_regs) { -#ifdef USE_JIT_FPU - for (i = 0; i < VFREGS; i++) { - if (live.fate[i].needflush == NF_SCRATCH || live.fate[i].status == CLEAN) { - f_disassociate(i); - } - } -#endif - for (i = 0; i <= FLAGTMP; i++) { - switch (live.state[i].status) { - case INMEM: - if (live.state[i].val) { - write_log("JIT: flush INMEM and val != 0!\n"); - } - break; - case CLEAN: - case DIRTY: - tomem(i); - break; - case ISCONST: - if (i != PC_P) - writeback_const(i); - break; - default: - break; - } - } -#ifdef USE_JIT_FPU - for (i = 0; i <= FP_RESULT; i++) { - if (live.fate[i].status == DIRTY) { - f_evict(i); - } - } -#endif - } -} - -int alloc_scratch(void) -{ - for(int i = 0; i < SCRATCH_REGS; ++i) { - if (live.scratch_in_use[i] == 0) { - live.scratch_in_use[i] = 1; - return S1 + i; - } - } - jit_log("Running out of scratch register."); - abort(); -} - -void release_scratch(int i) -{ - if (i < S1 || i >= S1 + SCRATCH_REGS) - jit_log("release_scratch(): %d is not a scratch reg.", i); - if(live.scratch_in_use[i - S1]) { - forget_about(i); - live.scratch_in_use[i - S1] = 0; - } else { - jit_log("release_scratch(): %d not in use.", i); - } -} - -static void freescratch(void) -{ - int i; - for (i = 0; i < N_REGS; i++) { -#if defined(CPU_AARCH64) - if (live.nat[i].locked && i > 5 && i < 18) { -#elif defined(CPU_arm) - if (live.nat[i].locked && i != 2 && i != 3 && i != 10 && i != 11 && i != 12) { -#else - if (live.nat[i].locked && i != 4 && i != 12) { -#endif - jit_log("Warning! %d is locked", i); - } - } - - for (i = S1; i < VREGS; i++) - forget_about(i); - for (i = 0; i < SCRATCH_REGS; ++i) - live.scratch_in_use[i] = 0; - -#ifdef USE_JIT_FPU - f_forget_about(FS1); -#endif -} - -/******************************************************************** - * Support functions, internal * - ********************************************************************/ - - -STATIC_INLINE int isinrom(uintptr addr) -{ - return (addr >= (uintptr)kickmem_bank.baseaddr && - addr < (uintptr)(kickmem_bank.baseaddr + 8 * 65536)); -} - -static void flush_all(void) -{ - int i; - - for (i = 0; i < VREGS; i++) { - if (live.state[i].status == DIRTY) { - if (!call_saved[live.state[i].realreg]) { - tomem(i); - } - } - } - -#ifdef USE_JIT_FPU - if (f_isinreg(FP_RESULT)) - f_evict(FP_RESULT); - if (f_isinreg(FS1)) - f_evict(FS1); -#endif -} - -/* Make sure all registers that will get clobbered by a call are - save and sound in memory */ -static void prepare_for_call_1(void) -{ - flush_all(); -} - -/* We will call a C routine in a moment. That will clobber all registers, - so we need to disassociate everything */ -static void prepare_for_call_2(void) -{ - int i; - for (i = 0; i < N_REGS; i++) { -#if defined(CPU_AARCH64) - if (live.nat[i].nholds > 0) // in aarch64: first 18 regs not call saved -#else - if (!call_saved[i] && live.nat[i].nholds > 0) -#endif - free_nreg(i); - } - -#ifdef USE_JIT_FPU - for (i = 6; i <= 7; i++) // only FP_RESULT and FS1, FP0-FP7 are call save - if (live.fat[i].nholds > 0) - f_free_nreg(i); -#endif - live.flags_in_flags = TRASH; /* Note: We assume we already rescued the - flags at the very start of the call_r functions! */ -} - -/******************************************************************** - * Memory access and related functions, CREATE time * - ********************************************************************/ - -void register_branch(uae_u32 not_taken, uae_u32 taken, uae_u8 cond) -{ - next_pc_p = not_taken; - taken_pc_p = taken; - branch_cc = cond; -} - -void register_possible_exception(void) -{ - may_raise_exception = true; -} - -/* Note: get_handler may fail in 64 Bit environments, if direct_handler_to_use is - * outside 32 bit - */ -static uintptr get_handler(uintptr addr) -{ - blockinfo* bi = get_blockinfo_addr_new((void*)(uintptr)addr); - return (uintptr)bi->direct_handler_to_use; -} - -/* This version assumes that it is writing *real* memory, and *will* fail - * if that assumption is wrong! No branches, no second chances, just - * straight go-for-it attitude */ - -static void writemem_real(int address, int source, int size) -{ - if (currprefs.address_space_24) { - switch (size) { - case 1: jnf_MEM_WRITE24_OFF_b(address, source); break; - case 2: jnf_MEM_WRITE24_OFF_w(address, source); break; - case 4: jnf_MEM_WRITE24_OFF_l(address, source); break; - } - } else { - switch (size) { - case 1: jnf_MEM_WRITE_OFF_b(address, source); break; - case 2: jnf_MEM_WRITE_OFF_w(address, source); break; - case 4: jnf_MEM_WRITE_OFF_l(address, source); break; - } - } -} - -STATIC_INLINE void writemem_special(int address, int source, int offset) -{ - jnf_MEM_WRITEMEMBANK(address, source, offset); -} - -void writebyte(int address, int source) -{ - if (special_mem & S_WRITE) - writemem_special(address, source, SIZEOF_VOID_P * 5); - else - writemem_real(address, source, 1); -} - -void writeword(int address, int source) -{ - if (special_mem & S_WRITE) - writemem_special(address, source, SIZEOF_VOID_P * 4); - else - writemem_real(address, source, 2); -} - -void writelong(int address, int source) -{ - if (special_mem & S_WRITE) - writemem_special(address, source, SIZEOF_VOID_P * 3); - else - writemem_real(address, source, 4); -} - -// Now the same for clobber variant -void writeword_clobber(int address, int source) -{ - if (special_mem & S_WRITE) - writemem_special(address, source, SIZEOF_VOID_P * 4); - else - writemem_real(address, source, 2); - forget_about(source); -} - -void writelong_clobber(int address, int source) -{ - if (special_mem & S_WRITE) - writemem_special(address, source, SIZEOF_VOID_P * 3); - else - writemem_real(address, source, 4); - forget_about(source); -} - - -/* This version assumes that it is reading *real* memory, and *will* fail - * if that assumption is wrong! No branches, no second chances, just - * straight go-for-it attitude */ - -static void readmem_real(int address, int dest, int size) -{ - if (currprefs.address_space_24) { - switch (size) { - case 1: jnf_MEM_READ24_OFF_b(dest, address); break; - case 2: jnf_MEM_READ24_OFF_w(dest, address); break; - case 4: jnf_MEM_READ24_OFF_l(dest, address); break; - } - } else { - switch (size) { - case 1: jnf_MEM_READ_OFF_b(dest, address); break; - case 2: jnf_MEM_READ_OFF_w(dest, address); break; - case 4: jnf_MEM_READ_OFF_l(dest, address); break; - } - } -} - -STATIC_INLINE void readmem_special(int address, int dest, int offset) -{ - jnf_MEM_READMEMBANK(dest, address, offset); -} - -void readbyte(int address, int dest) -{ - if (special_mem & S_READ) - readmem_special(address, dest, SIZEOF_VOID_P * 2); - else - readmem_real(address, dest, 1); -} - -void readword(int address, int dest) -{ - if (special_mem & S_READ) - readmem_special(address, dest, SIZEOF_VOID_P * 1); - else - readmem_real(address, dest, 2); -} - -void readlong(int address, int dest) -{ - if (special_mem & S_READ) - readmem_special(address, dest, SIZEOF_VOID_P * 0); - else - readmem_real(address, dest, 4); -} - -/* This one might appear a bit odd... */ -STATIC_INLINE void get_n_addr_old(int address, int dest) -{ - readmem_special(address, dest, SIZEOF_VOID_P * 6); -} - -STATIC_INLINE void get_n_addr_real(int address, int dest) -{ - if (currprefs.address_space_24) - jnf_MEM_GETADR24_OFF(dest, address); - else - jnf_MEM_GETADR_OFF(dest, address); -} - -void get_n_addr(int address, int dest) -{ - if (special_mem) - get_n_addr_old(address, dest); - else - get_n_addr_real(address, dest); -} - -void get_n_addr_jmp(int address, int dest) -{ - /* For this, we need to get the same address as the rest of UAE - would --- otherwise we end up translating everything twice */ - if (special_mem) - get_n_addr_old(address, dest); - else - get_n_addr_real(address, dest); -} - -/* base is a register, but dp is an actual value. - target is a register */ -void calc_disp_ea_020(int base, uae_u32 dp, int target) -{ - int reg = (dp >> 12) & 15; - int regd_shift = (dp >> 9) & 3; - - if (dp & 0x100) { - int ignorebase = (dp & 0x80); - int ignorereg = (dp & 0x40); - int addbase = 0; - int outer = 0; - - if ((dp & 0x30) == 0x20) - addbase = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset += 2) - 2); - if ((dp & 0x30) == 0x30) - addbase = comp_get_ilong((m68k_pc_offset += 4) - 4); - - if ((dp & 0x3) == 0x2) - outer = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset += 2) - 2); - if ((dp & 0x3) == 0x3) - outer = comp_get_ilong((m68k_pc_offset += 4) - 4); - - if ((dp & 0x4) == 0) { /* add regd *before* the get_long */ - if (!ignorereg) { - disp_ea20_target_mov(target, reg, regd_shift, ((dp & 0x800) == 0)); - } else { - mov_l_ri(target, 0); - } - - /* target is now regd */ - if (!ignorebase) - arm_ADD_l(target, base); - arm_ADD_l_ri(target, addbase); - if (dp & 0x03) - readlong(target, target); - } else { /* do the getlong first, then add regd */ - if (!ignorebase) { - mov_l_rr(target, base); - arm_ADD_l_ri(target, addbase); - } else { - mov_l_ri(target, addbase); - } - if (dp & 0x03) - readlong(target, target); - - if (!ignorereg) { - disp_ea20_target_add(target, reg, regd_shift, ((dp & 0x800) == 0)); - } - } - arm_ADD_l_ri(target, outer); - } else { /* 68000 version */ - if ((dp & 0x800) == 0) { /* Sign extend */ - sign_extend_16_rr(target, reg); - lea_l_brr_indexed(target, base, target, 1 << regd_shift, (uae_s8)dp); - } else { - lea_l_brr_indexed(target, base, reg, 1 << regd_shift, (uae_s8)dp); - } - } -} - -void set_cache_state(int enabled) -{ - if (enabled != cache_enabled) - flush_icache_hard(3); - cache_enabled = enabled; -} - -void alloc_cache(void) -{ - if (compiled_code) { - flush_icache_hard(3); - compiled_code = 0; - } - - cache_size = currprefs.cachesize; - if (cache_size == 0) - return; - - if (popallspace) - compiled_code = popallspace + POPALLSPACE_SIZE; - - if (compiled_code) { - write_log("Actual translation cache size : %d KB at %p-%p\n", cache_size, compiled_code, compiled_code + cache_size * 1024); -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - max_compile_start = compiled_code + cache_size * 1024 - BYTES_PER_INST - DATA_BUFFER_SIZE; -#else - max_compile_start = compiled_code + cache_size * 1024 - BYTES_PER_INST; -#endif - current_compile_p = compiled_code; - current_cache_size = 0; -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - reset_data_buffer(); -#endif - } -} - -static void calc_checksum(blockinfo* bi, uae_u32* c1, uae_u32* c2) -{ - uae_u32 k1 = 0; - uae_u32 k2 = 0; - - checksum_info* csi = bi->csi; - while (csi) { - uae_s32 len = csi->length; - uintptr tmp = (uintptr)csi->start_p; - uae_u32* pos; - - len += (tmp & 3); - tmp &= ~((uintptr)3); - pos = (uae_u32*)tmp; - - if (len >= 0 && len <= MAX_CHECKSUM_LEN) { - while (len > 0) { - k1 += *pos; - k2 ^= *pos; - pos++; - len -= 4; - } - } - - csi = csi->next; - } - - *c1 = k1; - *c2 = k2; -} - -int check_for_cache_miss(void) -{ - blockinfo* bi = get_blockinfo_addr(regs.pc_p); - - if (bi) { - int cl = cacheline(regs.pc_p); - if (bi != cache_tags[cl + 1].bi) { - raise_in_cl_list(bi); - return 1; - } - } - return 0; -} - - -static void recompile_block(void) -{ - /* An existing block's countdown code has expired. We need to make - sure that execute_normal doesn't refuse to recompile due to a - perceived cache miss... */ - blockinfo* bi = get_blockinfo_addr(regs.pc_p); - - raise_in_cl_list(bi); - execute_normal(); -} - -static void cache_miss(void) -{ - blockinfo* bi = get_blockinfo_addr(regs.pc_p); - - if (!bi) { - execute_normal(); /* Compile this block now */ - return; - } - raise_in_cl_list(bi); -} - -static int called_check_checksum(blockinfo* bi); - -STATIC_INLINE int block_check_checksum(blockinfo* bi) -{ - uae_u32 c1, c2; - int isgood; - - if (bi->status != BI_NEED_CHECK) - return 1; /* This block is in a checked state */ - - if (bi->c1 || bi->c2) - calc_checksum(bi, &c1, &c2); - else - c1 = c2 = 1; /* Make sure it doesn't match */ - - isgood = (c1 == bi->c1 && c2 == bi->c2); - - if (isgood) { - /* This block is still OK. So we reactivate. Of course, that - means we have to move it into the needs-to-be-flushed list */ - bi->handler_to_use = bi->handler; - set_dhtu(bi, bi->direct_handler); - bi->status = BI_CHECKING; - isgood = called_check_checksum(bi) != 0; - } - if (isgood) { - remove_from_list(bi); - add_to_active(bi); - raise_in_cl_list(bi); - bi->status = BI_ACTIVE; - } else { - /* This block actually changed. We need to invalidate it, - and set it up to be recompiled */ - invalidate_block(bi); - raise_in_cl_list(bi); - } - return isgood; -} - -static int called_check_checksum(blockinfo* bi) -{ - int isgood = 1; - int i; - - for (i = 0; i < 2 && isgood; i++) { - if (bi->dep[i].jmp_off) { - isgood = block_check_checksum(bi->dep[i].target); - } - } - return isgood; -} - -static void check_checksum(void) -{ - blockinfo* bi = get_blockinfo_addr(regs.pc_p); - uae_u32 cl = cacheline(regs.pc_p); - blockinfo* bi2 = get_blockinfo(cl); - - /* These are not the droids you are looking for... */ - if (!bi) { - /* Whoever is the primary target is in a dormant state, but - calling it was accidental, and we should just compile this - new block */ - execute_normal(); - return; - } - if (bi != bi2) { - /* The block was hit accidentally, but it does exist. Cache miss */ - cache_miss(); - return; - } - - if (!block_check_checksum(bi)) - execute_normal(); -} - -STATIC_INLINE void match_states(blockinfo* bi) -{ - if (bi->status == BI_NEED_CHECK) { - block_check_checksum(bi); - } -} - -STATIC_INLINE void create_popalls(void) -{ - int i, r; - - if (popallspace == NULL) { - if ((popallspace = cache_alloc(POPALLSPACE_SIZE + MAX_JIT_CACHE * 1024)) == NULL) { - jit_log("WARNING: Could not allocate popallspace!"); - /* This is not fatal if JIT is not used. If JIT is - * turned on, it will crash, but it would have crashed - * anyway. */ - return; - } - } - write_log("JIT popallspace: %p-%p\n", popallspace, popallspace + POPALLSPACE_SIZE); - - current_compile_p = popallspace; - set_target(current_compile_p); - -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - reset_data_buffer(); - data_long(0, 0); // Make sure we emit the branch over the first buffer outside pushall_call_handler -#endif - - /* We need to guarantee 16-byte stack alignment on x86 at any point - within the JIT generated code. We have multiple exit points - possible but a single entry. A "jmp" is used so that we don't - have to generate stack alignment in generated code that has to - call external functions (e.g. a generic instruction handler). - - In summary, JIT generated code is not leaf so we have to deal - with it here to maintain correct stack alignment. */ - current_compile_p = get_target(); - pushall_call_handler = get_target(); - raw_push_regs_to_preserve(); -#ifdef JIT_DEBUG - write_log("Address of regs: 0x%016x, regs.pc_p: 0x%016x\n", ®s, ®s.pc_p); - write_log("Address of natmem_offset: 0x%016x, natmem_offset = 0x%016x\n", ®s.natmem_offset, regs.natmem_offset); - write_log("Address of cache_tags: 0x%016x\n", cache_tags); -#endif - compemu_raw_init_r_regstruct((uintptr)®s); - compemu_raw_jmp_pc_tag(); - - /* now the exit points */ - popall_execute_normal_setpc = get_target(); - uintptr idx = (uintptr) & (regs.pc_p) - (uintptr)®s; -#if defined(CPU_AARCH64) - STR_xXi(REG_WORK1, R_REGSTRUCT, idx); -#else - STR_rRI(REG_WORK1, R_REGSTRUCT, idx); -#endif - popall_execute_normal = get_target(); - raw_pop_preserved_regs(); - compemu_raw_jmp((uintptr)execute_normal); - - popall_check_checksum_setpc = get_target(); -#if defined(CPU_AARCH64) - STR_xXi(REG_WORK1, R_REGSTRUCT, idx); -#else - STR_rRI(REG_WORK1, R_REGSTRUCT, idx); -#endif - popall_check_checksum = get_target(); - raw_pop_preserved_regs(); - compemu_raw_jmp((uintptr)check_checksum); - - popall_exec_nostats_setpc = get_target(); -#if defined(CPU_AARCH64) - STR_xXi(REG_WORK1, R_REGSTRUCT, idx); -#else - STR_rRI(REG_WORK1, R_REGSTRUCT, idx); -#endif - raw_pop_preserved_regs(); - compemu_raw_jmp((uintptr)exec_nostats); - - popall_recompile_block = get_target(); - raw_pop_preserved_regs(); - compemu_raw_jmp((uintptr)recompile_block); - - popall_do_nothing = get_target(); - raw_pop_preserved_regs(); - compemu_raw_jmp((uintptr)do_nothing); - - popall_cache_miss = get_target(); - raw_pop_preserved_regs(); - compemu_raw_jmp((uintptr)cache_miss); - - popall_execute_exception = get_target(); - raw_pop_preserved_regs(); - compemu_raw_jmp((uintptr)execute_exception); - -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - reset_data_buffer(); -#endif - - // no need to further write into popallspace - //TODO vm_protect(popallspace, POPALLSPACE_SIZE, VM_PAGE_READ | VM_PAGE_EXECUTE); - // No need to flush. Initialized and not modified - // flush_cpu_icache((void *)popallspace, (void *)target); -} - -STATIC_INLINE void reset_lists(void) -{ - int i; - - for (i = 0; i < MAX_HOLD_BI; i++) - hold_bi[i] = NULL; - active = NULL; - dormant = NULL; -} - -static void prepare_block(blockinfo* bi) -{ - int i; - - set_target(current_compile_p); - bi->direct_pen = (cpuop_func*)get_target(); - compemu_raw_execute_normal((uintptr) & (bi->pc_p)); - - bi->direct_pcc = (cpuop_func*)get_target(); - compemu_raw_check_checksum((uintptr) & (bi->pc_p)); - - flush_cpu_icache((void*)current_compile_p, (void*)target); - current_compile_p = get_target(); - - bi->deplist = NULL; - for (i = 0; i < 2; i++) { - bi->dep[i].prev_p = NULL; - bi->dep[i].next = NULL; - } - bi->status = BI_INVALID; -} - -void compemu_reset(void) -{ - set_cache_state(0); -} - -// OPCODE is in big endian format -STATIC_INLINE void reset_compop(int opcode) -{ - compfunctbl[opcode] = NULL; - nfcompfunctbl[opcode] = NULL; -} - -void build_comp(void) -{ - int i; - unsigned long opcode; - const struct comptbl* tbl = op_smalltbl_0_comp_ff; - const struct comptbl* nftbl = op_smalltbl_0_comp_nf; - unsigned int cpu_level = (currprefs.cpu_model - 68000) / 10; - if (cpu_level > 4) - cpu_level--; - -#ifdef PROFILE_UNTRANSLATED_INSNS - regs.raw_cputbl_count = raw_cputbl_count; -#endif - regs.mem_banks = (uintptr)mem_banks; - regs.cache_tags = (uintptr)cache_tags; - - for (opcode = 0; opcode < 65536; opcode++) { - reset_compop(opcode); - prop[opcode].use_flags = FLAG_ALL; - prop[opcode].set_flags = FLAG_ALL; - prop[opcode].cflow = fl_jump | fl_trap; // ILLEGAL instructions do trap - } - - for (i = 0; tbl[i].opcode < 65536; i++) { - int cflow = table68k[tbl[i].opcode].cflow; - if (follow_const_jumps && (tbl[i].specific & COMP_OPCODE_ISCJUMP)) - cflow = fl_const_jump; - else - cflow &= ~fl_const_jump; - prop[tbl[i].opcode].cflow = cflow; - - bool uses_fpu = (tbl[i].specific & COMP_OPCODE_USES_FPU) != 0; - if (uses_fpu && avoid_fpu) - compfunctbl[tbl[i].opcode] = NULL; - else - compfunctbl[tbl[i].opcode] = tbl[i].handler; - } - - for (i = 0; nftbl[i].opcode < 65536; i++) { - bool uses_fpu = (tbl[i].specific & COMP_OPCODE_USES_FPU) != 0; - if (uses_fpu && avoid_fpu) - nfcompfunctbl[nftbl[i].opcode] = NULL; - else - nfcompfunctbl[nftbl[i].opcode] = nftbl[i].handler; - } - - for (opcode = 0; opcode < 65536; opcode++) { - compop_func* f; - compop_func* nff; - int isaddx, cflow; - - if (table68k[opcode].mnemo == i_ILLG || table68k[opcode].clev > cpu_level) - continue; - - if (table68k[opcode].handler != -1) { - f = compfunctbl[table68k[opcode].handler]; - nff = nfcompfunctbl[table68k[opcode].handler]; - isaddx = prop[table68k[opcode].handler].is_addx; - prop[opcode].is_addx = isaddx; - cflow = prop[table68k[opcode].handler].cflow; - prop[opcode].cflow = cflow; - compfunctbl[opcode] = f; - nfcompfunctbl[opcode] = nff; - } - prop[opcode].set_flags = table68k[opcode].flagdead; - prop[opcode].use_flags = table68k[opcode].flaglive; - /* Unconditional jumps don't evaluate condition codes, so they - * don't actually use any flags themselves */ - if (prop[opcode].cflow & fl_const_jump) - prop[opcode].use_flags = 0; - } - -#ifdef JIT_DEBUG - int count = 0; - for (opcode = 0; opcode < 65536; opcode++) { - if (compfunctbl[opcode]) - count++; - } - jit_log("Supposedly %d compileable opcodes!", count); -#endif - - /* Initialise state */ - create_popalls(); - alloc_cache(); - reset_lists(); - - for (i = 0; i < TAGSIZE; i += 2) { - cache_tags[i].handler = (cpuop_func*)popall_execute_normal; - cache_tags[i + 1].bi = NULL; - } - compemu_reset(); -} - -void flush_icache_hard(int n) -{ - //if(current_compile_p != 0 && compiled_code != 0 && current_compile_p > compiled_code) - // jit_log("used size: %8d bytes", current_compile_p - compiled_code); - - blockinfo* bi, * dbi; - - bi = active; - while (bi) { - cache_tags[cacheline(bi->pc_p)].handler = (cpuop_func*)popall_execute_normal; - cache_tags[cacheline(bi->pc_p) + 1].bi = NULL; - dbi = bi; - bi = bi->next; - free_blockinfo(dbi); - } - bi = dormant; - while (bi) { - cache_tags[cacheline(bi->pc_p)].handler = (cpuop_func*)popall_execute_normal; - cache_tags[cacheline(bi->pc_p) + 1].bi = NULL; - dbi = bi; - bi = bi->next; - free_blockinfo(dbi); - } - - reset_lists(); - if (!compiled_code) - return; - -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - reset_data_buffer(); -#endif - - current_compile_p = compiled_code; - set_special(0); /* To get out of compiled code */ -} - - -/* "Soft flushing" --- instead of actually throwing everything away, - we simply mark everything as "needs to be checked". -*/ - -void flush_icache(int n) -{ - blockinfo* bi; - blockinfo* bi2; - - if (!active) - return; - - bi = active; - while (bi) { - uae_u32 cl = cacheline(bi->pc_p); - if (bi->status == BI_INVALID || bi->status == BI_NEED_RECOMP) { - if (bi == cache_tags[cl + 1].bi) - cache_tags[cl].handler = (cpuop_func*)popall_execute_normal; - bi->handler_to_use = (cpuop_func*)popall_execute_normal; - set_dhtu(bi, bi->direct_pen); - bi->status = BI_INVALID; - } else { - if (bi == cache_tags[cl + 1].bi) - cache_tags[cl].handler = (cpuop_func*)popall_check_checksum; - bi->handler_to_use = (cpuop_func*)popall_check_checksum; - set_dhtu(bi, bi->direct_pcc); - bi->status = BI_NEED_CHECK; - } - bi2 = bi; - bi = bi->next; - } - /* bi2 is now the last entry in the active list */ - bi2->next = dormant; - if (dormant) - dormant->prev_p = &(bi2->next); - - dormant = active; - active->prev_p = &dormant; - active = NULL; -} - -int failure; - -STATIC_INLINE unsigned int get_opcode_cft_map(unsigned int f) -{ - return ((f >> 8) & 255) | ((f & 255) << 8); -} -#define DO_GET_OPCODE(a) (get_opcode_cft_map((uae_u16)*(a))) - -void compile_block(cpu_history* pc_hist, int blocklen, int totcycles) -{ - if (cache_enabled && compiled_code && currprefs.cpu_model >= 68020) { -#ifdef PROFILE_COMPILE_TIME - compile_count++; - clock_t start_time = clock(); -#endif - - /* OK, here we need to 'compile' a block */ - int i; - int r; - int was_comp = 0; - uae_u8 liveflags[MAXRUN + 1]; - bool trace_in_rom = isinrom((uintptr)pc_hist[0].location) != 0; - uintptr max_pcp = (uintptr)pc_hist[blocklen - 1].location; - uintptr min_pcp = max_pcp; - uae_u32 cl = cacheline(pc_hist[0].location); - blockinfo* bi = NULL; - blockinfo* bi2; - - if (current_compile_p >= MAX_COMPILE_PTR) - flush_icache_hard(3); - - alloc_blockinfos(); - - bi = get_blockinfo_addr_new(pc_hist[0].location); - bi2 = get_blockinfo(cl); - - int optlev = bi->optlevel; - if (bi->count == -1) { - optlev = 2; - bi->count = -2; - } - - remove_deps(bi); /* We are about to create new code */ - bi->optlevel = optlev; - bi->pc_p = (uae_u8*)pc_hist[0].location; - free_checksum_info_chain(bi->csi); - bi->csi = NULL; - - liveflags[blocklen] = FLAG_ALL; /* All flags needed afterwards */ - i = blocklen; - while (i--) { - uae_u16* currpcp = pc_hist[i].location; - uae_u32 op = DO_GET_OPCODE(currpcp); - - trace_in_rom = trace_in_rom && isinrom((uintptr)currpcp); - if (follow_const_jumps && is_const_jump(op)) { - checksum_info* csi = alloc_checksum_info(); - csi->start_p = (uae_u8*)min_pcp; - csi->length = max_pcp - min_pcp + LONGEST_68K_INST; - csi->next = bi->csi; - bi->csi = csi; - max_pcp = (uintptr)currpcp; - } - min_pcp = (uintptr)currpcp; - - liveflags[i] = ((liveflags[i + 1] & (~prop[op].set_flags)) | prop[op].use_flags); - if (prop[op].is_addx && (liveflags[i + 1] & FLAG_Z) == 0) - liveflags[i] &= ~FLAG_Z; - } - - checksum_info* csi = alloc_checksum_info(); - csi->start_p = (uae_u8*)min_pcp; - csi->length = max_pcp - min_pcp + LONGEST_68K_INST; - csi->next = bi->csi; - bi->csi = csi; - - bi->needed_flags = liveflags[0]; - - /* This is the non-direct handler */ - was_comp = 0; - - bi->direct_handler = (cpuop_func*)get_target(); - set_dhtu(bi, bi->direct_handler); - bi->status = BI_COMPILING; - current_block_start_target = (uintptr)get_target(); - - if (bi->count >= 0) { /* Need to generate countdown code */ - compemu_raw_set_pc_i((uintptr)pc_hist[0].location); - compemu_raw_dec_m((uintptr) & (bi->count)); - compemu_raw_maybe_recompile(); - } - if (optlev == 0) { /* No need to actually translate */ - /* Execute normally without keeping stats */ - compemu_raw_exec_nostats((uintptr)pc_hist[0].location); - } else { - next_pc_p = 0; - taken_pc_p = 0; - branch_cc = 0; // Only to be initialized. Will be set together with next_pc_p - - comp_pc_p = (uae_u8*)pc_hist[0].location; - init_comp(); - was_comp = 1; - - for (i = 0; i < blocklen && get_target() < MAX_COMPILE_PTR; i++) { - may_raise_exception = false; - cpuop_func** cputbl; - compop_func** comptbl; - uae_u32 opcode = DO_GET_OPCODE(pc_hist[i].location); - needed_flags = (liveflags[i + 1] & prop[opcode].set_flags); - special_mem = pc_hist[i].specmem; -#ifdef JIT_DEBUG - write_log(" location=0x" PRINT_PTR ", opcode=0x%04x, target=0x" PRINT_PTR ", need_flags=%d\n", pc_hist[i].location, opcode, get_target(), needed_flags); -#endif - if (!needed_flags) { - cputbl = cpufunctbl; - comptbl = nfcompfunctbl; - } else { - cputbl = cpufunctbl; - comptbl = compfunctbl; - } - - failure = 1; // gb-- defaults to failure state - if (comptbl[opcode] && optlev > 1) { - failure = 0; - if (!was_comp) { - comp_pc_p = (uae_u8*)pc_hist[i].location; - init_comp(); - } - was_comp = 1; - - comptbl[opcode](opcode); - freescratch(); - if (!(liveflags[i + 1] & FLAG_CZNV)) { - /* We can forget about flags */ - dont_care_flags(); - } - } - - if (failure) { - if (was_comp) { - flush(1); - was_comp = 0; - } - compemu_raw_mov_l_ri(REG_PAR1, (uae_u32)opcode); - compemu_raw_mov_l_rr(REG_PAR2, R_REGSTRUCT); - compemu_raw_set_pc_i((uintptr)pc_hist[i].location); - compemu_raw_call((uintptr)cputbl[opcode]); -#ifdef PROFILE_UNTRANSLATED_INSNS - // raw_cputbl_count[] is indexed with plain opcode (in m68k order) - compemu_raw_inc_opcount(opcode); -#endif - - if (i < blocklen - 1) { -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - data_check_end(8, 64); -#endif - compemu_raw_maybe_do_nothing(scaled_cycles(totcycles)); - } - } else if (may_raise_exception) { -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - data_check_end(8, 64); -#endif - compemu_raw_handle_except(scaled_cycles(totcycles)); - may_raise_exception = false; - } - } - - if (next_pc_p) { /* A branch was registered */ - uintptr t1 = next_pc_p; - uintptr t2 = taken_pc_p; - int cc = branch_cc; // this is native (ARM) condition code - - uae_u32* branchadd; - uae_u32* tba; - bigstate tmp; - blockinfo* tbi; -#ifdef JIT_DEBUG - write_log(" branch detected: t1=0x%016llx, t2=0x" PRINT_PTR ", cc=%d\n", t1, t2, cc); -#endif - - if (taken_pc_p < next_pc_p) { - /* backward branch. Optimize for the "taken" case --- - which means the raw_jcc should fall through when - the 68k branch is taken. */ - t1 = taken_pc_p; - t2 = next_pc_p; - if (cc < NATIVE_CC_AL) - cc = branch_cc ^ 1; - else if (cc > NATIVE_CC_AL) - cc = 0x10 | (branch_cc ^ 0xf); - } - -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - data_check_end(8, 128); -#endif - flush(1); // Emitted code of this call doesn't modify flags - compemu_raw_jcc_l_oponly(cc); // Last emitted opcode is branch to target - branchadd = (uae_u32*)get_target() - 1; - - /* predicted outcome */ - tbi = get_blockinfo_addr_new((void*)t1); - match_states(tbi); - - tba = compemu_raw_endblock_pc_isconst(scaled_cycles(totcycles), t1); - write_jmp_target(tba, get_handler(t1)); - create_jmpdep(bi, 0, tba, t1); - - /* not-predicted outcome */ - write_jmp_target(branchadd, (uintptr)get_target()); - tbi = get_blockinfo_addr_new((void*)t2); - match_states(tbi); - - tba = compemu_raw_endblock_pc_isconst(scaled_cycles(totcycles), t2); - write_jmp_target(tba, get_handler(t2)); - create_jmpdep(bi, 1, tba, t2); - } else { - if (was_comp) { - flush(1); - } - - /* Let's find out where next_handler is... */ - if (was_comp && isinreg(PC_P)) { -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - data_check_end(4, 64); -#endif - r = live.state[PC_P].realreg; - compemu_raw_endblock_pc_inreg(r, scaled_cycles(totcycles)); - } else if (was_comp && isconst(PC_P)) { - uintptr v = live.state[PC_P].val; - uae_u32* tba; - blockinfo* tbi; - - tbi = get_blockinfo_addr_new((void*)v); - match_states(tbi); - -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - data_check_end(4, 64); -#endif - tba = compemu_raw_endblock_pc_isconst(scaled_cycles(totcycles), v); - write_jmp_target(tba, get_handler(v)); - create_jmpdep(bi, 0, tba, v); - } else { - r = REG_PC_TMP; - compemu_raw_mov_l_rm(r, (uintptr)®s.pc_p); -#if defined(CPU_arm) && !defined(ARMV6T2) && !defined(CPU_AARCH64) - data_check_end(4, 64); -#endif - compemu_raw_endblock_pc_inreg(r, scaled_cycles(totcycles)); - } - } - } - - remove_from_list(bi); - if (trace_in_rom) { - // No need to checksum that block trace on cache invalidation - free_checksum_info_chain(bi->csi); - bi->csi = NULL; - add_to_dormant(bi); - } else { - calc_checksum(bi, &(bi->c1), &(bi->c2)); - add_to_active(bi); - } - - current_cache_size += get_target() - (uae_u8*)current_compile_p; - - /* This is the non-direct handler */ - bi->handler = bi->handler_to_use = (cpuop_func*)get_target(); - compemu_raw_cmp_pc((uintptr)pc_hist[0].location); - compemu_raw_maybe_cachemiss(); - comp_pc_p = (uae_u8*)pc_hist[0].location; - - bi->status = BI_FINALIZING; - init_comp(); - match_states(bi); - flush(1); - - compemu_raw_jmp((uintptr)bi->direct_handler); - - flush_cpu_icache((void*)current_block_start_target, (void*)target); - current_compile_p = get_target(); - raise_in_cl_list(bi); - bi->nexthandler = current_compile_p; - - /* We will flush soon, anyway, so let's do it now */ - if (current_compile_p >= MAX_COMPILE_PTR) - flush_icache_hard(3); - - bi->status = BI_ACTIVE; - -#ifdef PROFILE_COMPILE_TIME - compile_time += (clock() - start_time); -#endif - /* Account for compilation time */ - do_extra_cycles(totcycles); - } -} - -#endif /* JIT */ +// +// Created by midwan on 22/12/2023. +// + +#if defined(CPU_arm) || defined(CPU_AARCH64) +#include "arm/compemu_support_arm.cpp" +#elif defined(__x86_64__) || defined(_M_AMD64) +#include "x86/compemu_support_x86.cpp" +#endif \ No newline at end of file diff --git a/src/jit/compstbl.cpp b/src/jit/compstbl.cpp index 3425e9a68..5f893e567 100644 --- a/src/jit/compstbl.cpp +++ b/src/jit/compstbl.cpp @@ -1,3748 +1,9 @@ -#include "sysconfig.h" -#if defined(JIT) -#include "sysdeps.h" -#include "options.h" -#include "uae/memory.h" -#include "readcpu.h" -#include "newcpu.h" -#include "comptbl.h" -#include "debug.h" -extern const struct comptbl op_smalltbl_0_comp_ff[] = { -{ op_0_0_comp_ff, 0x00000002, 0 }, /* OR */ -{ op_10_0_comp_ff, 0x00000002, 16 }, /* OR */ -{ op_18_0_comp_ff, 0x00000002, 24 }, /* OR */ -{ op_20_0_comp_ff, 0x00000002, 32 }, /* OR */ -{ op_28_0_comp_ff, 0x00000002, 40 }, /* OR */ -{ op_30_0_comp_ff, 0x00000002, 48 }, /* OR */ -{ op_38_0_comp_ff, 0x00000002, 56 }, /* OR */ -{ op_39_0_comp_ff, 0x00000002, 57 }, /* OR */ -{ op_3c_0_comp_ff, 0x00000002, 60 }, /* ORSR */ -{ op_40_0_comp_ff, 0x00000002, 64 }, /* OR */ -{ op_50_0_comp_ff, 0x00000002, 80 }, /* OR */ -{ op_58_0_comp_ff, 0x00000002, 88 }, /* OR */ -{ op_60_0_comp_ff, 0x00000002, 96 }, /* OR */ -{ op_68_0_comp_ff, 0x00000002, 104 }, /* OR */ -{ op_70_0_comp_ff, 0x00000002, 112 }, /* OR */ -{ op_78_0_comp_ff, 0x00000002, 120 }, /* OR */ -{ op_79_0_comp_ff, 0x00000002, 121 }, /* OR */ -{ NULL, 0x00000002, 124 }, /* ORSR */ -{ op_80_0_comp_ff, 0x00000002, 128 }, /* OR */ -{ op_90_0_comp_ff, 0x00000002, 144 }, /* OR */ -{ op_98_0_comp_ff, 0x00000002, 152 }, /* OR */ -{ op_a0_0_comp_ff, 0x00000002, 160 }, /* OR */ -{ op_a8_0_comp_ff, 0x00000002, 168 }, /* OR */ -{ op_b0_0_comp_ff, 0x00000002, 176 }, /* OR */ -{ op_b8_0_comp_ff, 0x00000002, 184 }, /* OR */ -{ op_b9_0_comp_ff, 0x00000002, 185 }, /* OR */ -{ NULL, 0x00000001, 208 }, /* CHK2 */ -{ NULL, 0x00000001, 232 }, /* CHK2 */ -{ NULL, 0x00000001, 240 }, /* CHK2 */ -{ NULL, 0x00000001, 248 }, /* CHK2 */ -{ NULL, 0x00000001, 249 }, /* CHK2 */ -{ NULL, 0x00000001, 250 }, /* CHK2 */ -{ NULL, 0x00000001, 251 }, /* CHK2 */ -{ op_100_0_comp_ff, 0x00000000, 256 }, /* BTST */ -{ NULL, 0x00000001, 264 }, /* MVPMR */ -{ op_110_0_comp_ff, 0x00000000, 272 }, /* BTST */ -{ op_118_0_comp_ff, 0x00000000, 280 }, /* BTST */ -{ op_120_0_comp_ff, 0x00000000, 288 }, /* BTST */ -{ op_128_0_comp_ff, 0x00000002, 296 }, /* BTST */ -{ op_130_0_comp_ff, 0x00000002, 304 }, /* BTST */ -{ op_138_0_comp_ff, 0x00000002, 312 }, /* BTST */ -{ op_139_0_comp_ff, 0x00000002, 313 }, /* BTST */ -{ op_13a_0_comp_ff, 0x00000002, 314 }, /* BTST */ -{ op_13b_0_comp_ff, 0x00000002, 315 }, /* BTST */ -{ op_13c_0_comp_ff, 0x00000002, 316 }, /* BTST */ -{ op_140_0_comp_ff, 0x00000000, 320 }, /* BCHG */ -{ NULL, 0x00000001, 328 }, /* MVPMR */ -{ op_150_0_comp_ff, 0x00000000, 336 }, /* BCHG */ -{ op_158_0_comp_ff, 0x00000000, 344 }, /* BCHG */ -{ op_160_0_comp_ff, 0x00000000, 352 }, /* BCHG */ -{ op_168_0_comp_ff, 0x00000002, 360 }, /* BCHG */ -{ op_170_0_comp_ff, 0x00000002, 368 }, /* BCHG */ -{ op_178_0_comp_ff, 0x00000002, 376 }, /* BCHG */ -{ op_179_0_comp_ff, 0x00000002, 377 }, /* BCHG */ -{ op_180_0_comp_ff, 0x00000000, 384 }, /* BCLR */ -{ NULL, 0x00000001, 392 }, /* MVPRM */ -{ op_190_0_comp_ff, 0x00000000, 400 }, /* BCLR */ -{ op_198_0_comp_ff, 0x00000000, 408 }, /* BCLR */ -{ op_1a0_0_comp_ff, 0x00000000, 416 }, /* BCLR */ -{ op_1a8_0_comp_ff, 0x00000002, 424 }, /* BCLR */ -{ op_1b0_0_comp_ff, 0x00000002, 432 }, /* BCLR */ -{ op_1b8_0_comp_ff, 0x00000002, 440 }, /* BCLR */ -{ op_1b9_0_comp_ff, 0x00000002, 441 }, /* BCLR */ -{ op_1c0_0_comp_ff, 0x00000000, 448 }, /* BSET */ -{ NULL, 0x00000001, 456 }, /* MVPRM */ -{ op_1d0_0_comp_ff, 0x00000000, 464 }, /* BSET */ -{ op_1d8_0_comp_ff, 0x00000000, 472 }, /* BSET */ -{ op_1e0_0_comp_ff, 0x00000000, 480 }, /* BSET */ -{ op_1e8_0_comp_ff, 0x00000002, 488 }, /* BSET */ -{ op_1f0_0_comp_ff, 0x00000002, 496 }, /* BSET */ -{ op_1f8_0_comp_ff, 0x00000002, 504 }, /* BSET */ -{ op_1f9_0_comp_ff, 0x00000002, 505 }, /* BSET */ -{ op_200_0_comp_ff, 0x00000002, 512 }, /* AND */ -{ op_210_0_comp_ff, 0x00000002, 528 }, /* AND */ -{ op_218_0_comp_ff, 0x00000002, 536 }, /* AND */ -{ op_220_0_comp_ff, 0x00000002, 544 }, /* AND */ -{ op_228_0_comp_ff, 0x00000002, 552 }, /* AND */ -{ op_230_0_comp_ff, 0x00000002, 560 }, /* AND */ -{ op_238_0_comp_ff, 0x00000002, 568 }, /* AND */ -{ op_239_0_comp_ff, 0x00000002, 569 }, /* AND */ -{ op_23c_0_comp_ff, 0x00000002, 572 }, /* ANDSR */ -{ op_240_0_comp_ff, 0x00000002, 576 }, /* AND */ -{ op_250_0_comp_ff, 0x00000002, 592 }, /* AND */ -{ op_258_0_comp_ff, 0x00000002, 600 }, /* AND */ -{ op_260_0_comp_ff, 0x00000002, 608 }, /* AND */ -{ op_268_0_comp_ff, 0x00000002, 616 }, /* AND */ -{ op_270_0_comp_ff, 0x00000002, 624 }, /* AND */ -{ op_278_0_comp_ff, 0x00000002, 632 }, /* AND */ -{ op_279_0_comp_ff, 0x00000002, 633 }, /* AND */ -{ NULL, 0x00000002, 636 }, /* ANDSR */ -{ op_280_0_comp_ff, 0x00000002, 640 }, /* AND */ -{ op_290_0_comp_ff, 0x00000002, 656 }, /* AND */ -{ op_298_0_comp_ff, 0x00000002, 664 }, /* AND */ -{ op_2a0_0_comp_ff, 0x00000002, 672 }, /* AND */ -{ op_2a8_0_comp_ff, 0x00000002, 680 }, /* AND */ -{ op_2b0_0_comp_ff, 0x00000002, 688 }, /* AND */ -{ op_2b8_0_comp_ff, 0x00000002, 696 }, /* AND */ -{ op_2b9_0_comp_ff, 0x00000002, 697 }, /* AND */ -{ NULL, 0x00000001, 720 }, /* CHK2 */ -{ NULL, 0x00000001, 744 }, /* CHK2 */ -{ NULL, 0x00000001, 752 }, /* CHK2 */ -{ NULL, 0x00000001, 760 }, /* CHK2 */ -{ NULL, 0x00000001, 761 }, /* CHK2 */ -{ NULL, 0x00000001, 762 }, /* CHK2 */ -{ NULL, 0x00000001, 763 }, /* CHK2 */ -{ op_400_0_comp_ff, 0x00000002, 1024 }, /* SUB */ -{ op_410_0_comp_ff, 0x00000002, 1040 }, /* SUB */ -{ op_418_0_comp_ff, 0x00000002, 1048 }, /* SUB */ -{ op_420_0_comp_ff, 0x00000002, 1056 }, /* SUB */ -{ op_428_0_comp_ff, 0x00000002, 1064 }, /* SUB */ -{ op_430_0_comp_ff, 0x00000002, 1072 }, /* SUB */ -{ op_438_0_comp_ff, 0x00000002, 1080 }, /* SUB */ -{ op_439_0_comp_ff, 0x00000002, 1081 }, /* SUB */ -{ op_440_0_comp_ff, 0x00000002, 1088 }, /* SUB */ -{ op_450_0_comp_ff, 0x00000002, 1104 }, /* SUB */ -{ op_458_0_comp_ff, 0x00000002, 1112 }, /* SUB */ -{ op_460_0_comp_ff, 0x00000002, 1120 }, /* SUB */ -{ op_468_0_comp_ff, 0x00000002, 1128 }, /* SUB */ -{ op_470_0_comp_ff, 0x00000002, 1136 }, /* SUB */ -{ op_478_0_comp_ff, 0x00000002, 1144 }, /* SUB */ -{ op_479_0_comp_ff, 0x00000002, 1145 }, /* SUB */ -{ op_480_0_comp_ff, 0x00000002, 1152 }, /* SUB */ -{ op_490_0_comp_ff, 0x00000002, 1168 }, /* SUB */ -{ op_498_0_comp_ff, 0x00000002, 1176 }, /* SUB */ -{ op_4a0_0_comp_ff, 0x00000002, 1184 }, /* SUB */ -{ op_4a8_0_comp_ff, 0x00000002, 1192 }, /* SUB */ -{ op_4b0_0_comp_ff, 0x00000002, 1200 }, /* SUB */ -{ op_4b8_0_comp_ff, 0x00000002, 1208 }, /* SUB */ -{ op_4b9_0_comp_ff, 0x00000002, 1209 }, /* SUB */ -{ NULL, 0x00000001, 1232 }, /* CHK2 */ -{ NULL, 0x00000001, 1256 }, /* CHK2 */ -{ NULL, 0x00000001, 1264 }, /* CHK2 */ -{ NULL, 0x00000001, 1272 }, /* CHK2 */ -{ NULL, 0x00000001, 1273 }, /* CHK2 */ -{ NULL, 0x00000001, 1274 }, /* CHK2 */ -{ NULL, 0x00000001, 1275 }, /* CHK2 */ -{ op_600_0_comp_ff, 0x00000002, 1536 }, /* ADD */ -{ op_610_0_comp_ff, 0x00000002, 1552 }, /* ADD */ -{ op_618_0_comp_ff, 0x00000002, 1560 }, /* ADD */ -{ op_620_0_comp_ff, 0x00000002, 1568 }, /* ADD */ -{ op_628_0_comp_ff, 0x00000002, 1576 }, /* ADD */ -{ op_630_0_comp_ff, 0x00000002, 1584 }, /* ADD */ -{ op_638_0_comp_ff, 0x00000002, 1592 }, /* ADD */ -{ op_639_0_comp_ff, 0x00000002, 1593 }, /* ADD */ -{ op_640_0_comp_ff, 0x00000002, 1600 }, /* ADD */ -{ op_650_0_comp_ff, 0x00000002, 1616 }, /* ADD */ -{ op_658_0_comp_ff, 0x00000002, 1624 }, /* ADD */ -{ op_660_0_comp_ff, 0x00000002, 1632 }, /* ADD */ -{ op_668_0_comp_ff, 0x00000002, 1640 }, /* ADD */ -{ op_670_0_comp_ff, 0x00000002, 1648 }, /* ADD */ -{ op_678_0_comp_ff, 0x00000002, 1656 }, /* ADD */ -{ op_679_0_comp_ff, 0x00000002, 1657 }, /* ADD */ -{ op_680_0_comp_ff, 0x00000002, 1664 }, /* ADD */ -{ op_690_0_comp_ff, 0x00000002, 1680 }, /* ADD */ -{ op_698_0_comp_ff, 0x00000002, 1688 }, /* ADD */ -{ op_6a0_0_comp_ff, 0x00000002, 1696 }, /* ADD */ -{ op_6a8_0_comp_ff, 0x00000002, 1704 }, /* ADD */ -{ op_6b0_0_comp_ff, 0x00000002, 1712 }, /* ADD */ -{ op_6b8_0_comp_ff, 0x00000002, 1720 }, /* ADD */ -{ op_6b9_0_comp_ff, 0x00000002, 1721 }, /* ADD */ -{ NULL, 0x00000001, 1728 }, /* RTM */ -{ NULL, 0x00000001, 1736 }, /* RTM */ -{ NULL, 0x00000001, 1744 }, /* CALLM */ -{ NULL, 0x00000001, 1768 }, /* CALLM */ -{ NULL, 0x00000001, 1776 }, /* CALLM */ -{ NULL, 0x00000001, 1784 }, /* CALLM */ -{ NULL, 0x00000001, 1785 }, /* CALLM */ -{ NULL, 0x00000001, 1786 }, /* CALLM */ -{ NULL, 0x00000001, 1787 }, /* CALLM */ -{ op_800_0_comp_ff, 0x00000002, 2048 }, /* BTST */ -{ op_810_0_comp_ff, 0x00000002, 2064 }, /* BTST */ -{ op_818_0_comp_ff, 0x00000002, 2072 }, /* BTST */ -{ op_820_0_comp_ff, 0x00000002, 2080 }, /* BTST */ -{ op_828_0_comp_ff, 0x00000002, 2088 }, /* BTST */ -{ op_830_0_comp_ff, 0x00000002, 2096 }, /* BTST */ -{ op_838_0_comp_ff, 0x00000002, 2104 }, /* BTST */ -{ op_839_0_comp_ff, 0x00000002, 2105 }, /* BTST */ -{ op_83a_0_comp_ff, 0x00000002, 2106 }, /* BTST */ -{ op_83b_0_comp_ff, 0x00000002, 2107 }, /* BTST */ -{ op_840_0_comp_ff, 0x00000002, 2112 }, /* BCHG */ -{ op_850_0_comp_ff, 0x00000002, 2128 }, /* BCHG */ -{ op_858_0_comp_ff, 0x00000002, 2136 }, /* BCHG */ -{ op_860_0_comp_ff, 0x00000002, 2144 }, /* BCHG */ -{ op_868_0_comp_ff, 0x00000002, 2152 }, /* BCHG */ -{ op_870_0_comp_ff, 0x00000002, 2160 }, /* BCHG */ -{ op_878_0_comp_ff, 0x00000002, 2168 }, /* BCHG */ -{ op_879_0_comp_ff, 0x00000002, 2169 }, /* BCHG */ -{ op_880_0_comp_ff, 0x00000002, 2176 }, /* BCLR */ -{ op_890_0_comp_ff, 0x00000002, 2192 }, /* BCLR */ -{ op_898_0_comp_ff, 0x00000002, 2200 }, /* BCLR */ -{ op_8a0_0_comp_ff, 0x00000002, 2208 }, /* BCLR */ -{ op_8a8_0_comp_ff, 0x00000002, 2216 }, /* BCLR */ -{ op_8b0_0_comp_ff, 0x00000002, 2224 }, /* BCLR */ -{ op_8b8_0_comp_ff, 0x00000002, 2232 }, /* BCLR */ -{ op_8b9_0_comp_ff, 0x00000002, 2233 }, /* BCLR */ -{ op_8c0_0_comp_ff, 0x00000002, 2240 }, /* BSET */ -{ op_8d0_0_comp_ff, 0x00000002, 2256 }, /* BSET */ -{ op_8d8_0_comp_ff, 0x00000002, 2264 }, /* BSET */ -{ op_8e0_0_comp_ff, 0x00000002, 2272 }, /* BSET */ -{ op_8e8_0_comp_ff, 0x00000002, 2280 }, /* BSET */ -{ op_8f0_0_comp_ff, 0x00000002, 2288 }, /* BSET */ -{ op_8f8_0_comp_ff, 0x00000002, 2296 }, /* BSET */ -{ op_8f9_0_comp_ff, 0x00000002, 2297 }, /* BSET */ -{ op_a00_0_comp_ff, 0x00000002, 2560 }, /* EOR */ -{ op_a10_0_comp_ff, 0x00000002, 2576 }, /* EOR */ -{ op_a18_0_comp_ff, 0x00000002, 2584 }, /* EOR */ -{ op_a20_0_comp_ff, 0x00000002, 2592 }, /* EOR */ -{ op_a28_0_comp_ff, 0x00000002, 2600 }, /* EOR */ -{ op_a30_0_comp_ff, 0x00000002, 2608 }, /* EOR */ -{ op_a38_0_comp_ff, 0x00000002, 2616 }, /* EOR */ -{ op_a39_0_comp_ff, 0x00000002, 2617 }, /* EOR */ -{ op_a3c_0_comp_ff, 0x00000002, 2620 }, /* EORSR */ -{ op_a40_0_comp_ff, 0x00000002, 2624 }, /* EOR */ -{ op_a50_0_comp_ff, 0x00000002, 2640 }, /* EOR */ -{ op_a58_0_comp_ff, 0x00000002, 2648 }, /* EOR */ -{ op_a60_0_comp_ff, 0x00000002, 2656 }, /* EOR */ -{ op_a68_0_comp_ff, 0x00000002, 2664 }, /* EOR */ -{ op_a70_0_comp_ff, 0x00000002, 2672 }, /* EOR */ -{ op_a78_0_comp_ff, 0x00000002, 2680 }, /* EOR */ -{ op_a79_0_comp_ff, 0x00000002, 2681 }, /* EOR */ -{ NULL, 0x00000002, 2684 }, /* EORSR */ -{ op_a80_0_comp_ff, 0x00000002, 2688 }, /* EOR */ -{ op_a90_0_comp_ff, 0x00000002, 2704 }, /* EOR */ -{ op_a98_0_comp_ff, 0x00000002, 2712 }, /* EOR */ -{ op_aa0_0_comp_ff, 0x00000002, 2720 }, /* EOR */ -{ op_aa8_0_comp_ff, 0x00000002, 2728 }, /* EOR */ -{ op_ab0_0_comp_ff, 0x00000002, 2736 }, /* EOR */ -{ op_ab8_0_comp_ff, 0x00000002, 2744 }, /* EOR */ -{ op_ab9_0_comp_ff, 0x00000002, 2745 }, /* EOR */ -{ NULL, 0x00000000, 2768 }, /* CAS */ -{ NULL, 0x00000000, 2776 }, /* CAS */ -{ NULL, 0x00000000, 2784 }, /* CAS */ -{ NULL, 0x00000000, 2792 }, /* CAS */ -{ NULL, 0x00000000, 2800 }, /* CAS */ -{ NULL, 0x00000000, 2808 }, /* CAS */ -{ NULL, 0x00000000, 2809 }, /* CAS */ -{ op_c00_0_comp_ff, 0x00000002, 3072 }, /* CMP */ -{ op_c10_0_comp_ff, 0x00000002, 3088 }, /* CMP */ -{ op_c18_0_comp_ff, 0x00000002, 3096 }, /* CMP */ -{ op_c20_0_comp_ff, 0x00000002, 3104 }, /* CMP */ -{ op_c28_0_comp_ff, 0x00000002, 3112 }, /* CMP */ -{ op_c30_0_comp_ff, 0x00000002, 3120 }, /* CMP */ -{ op_c38_0_comp_ff, 0x00000002, 3128 }, /* CMP */ -{ op_c39_0_comp_ff, 0x00000002, 3129 }, /* CMP */ -{ op_c3a_0_comp_ff, 0x00000002, 3130 }, /* CMP */ -{ op_c3b_0_comp_ff, 0x00000002, 3131 }, /* CMP */ -{ op_c40_0_comp_ff, 0x00000002, 3136 }, /* CMP */ -{ op_c50_0_comp_ff, 0x00000002, 3152 }, /* CMP */ -{ op_c58_0_comp_ff, 0x00000002, 3160 }, /* CMP */ -{ op_c60_0_comp_ff, 0x00000002, 3168 }, /* CMP */ -{ op_c68_0_comp_ff, 0x00000002, 3176 }, /* CMP */ -{ op_c70_0_comp_ff, 0x00000002, 3184 }, /* CMP */ -{ op_c78_0_comp_ff, 0x00000002, 3192 }, /* CMP */ -{ op_c79_0_comp_ff, 0x00000002, 3193 }, /* CMP */ -{ op_c7a_0_comp_ff, 0x00000002, 3194 }, /* CMP */ -{ op_c7b_0_comp_ff, 0x00000002, 3195 }, /* CMP */ -{ op_c80_0_comp_ff, 0x00000002, 3200 }, /* CMP */ -{ op_c90_0_comp_ff, 0x00000002, 3216 }, /* CMP */ -{ op_c98_0_comp_ff, 0x00000002, 3224 }, /* CMP */ -{ op_ca0_0_comp_ff, 0x00000002, 3232 }, /* CMP */ -{ op_ca8_0_comp_ff, 0x00000002, 3240 }, /* CMP */ -{ op_cb0_0_comp_ff, 0x00000002, 3248 }, /* CMP */ -{ op_cb8_0_comp_ff, 0x00000002, 3256 }, /* CMP */ -{ op_cb9_0_comp_ff, 0x00000002, 3257 }, /* CMP */ -{ op_cba_0_comp_ff, 0x00000002, 3258 }, /* CMP */ -{ op_cbb_0_comp_ff, 0x00000002, 3259 }, /* CMP */ -{ NULL, 0x00000000, 3280 }, /* CAS */ -{ NULL, 0x00000000, 3288 }, /* CAS */ -{ NULL, 0x00000000, 3296 }, /* CAS */ -{ NULL, 0x00000000, 3304 }, /* CAS */ -{ NULL, 0x00000000, 3312 }, /* CAS */ -{ NULL, 0x00000000, 3320 }, /* CAS */ -{ NULL, 0x00000000, 3321 }, /* CAS */ -{ NULL, 0x00000000, 3324 }, /* CAS2 */ -{ NULL, 0x00000001, 3600 }, /* MOVES */ -{ NULL, 0x00000001, 3608 }, /* MOVES */ -{ NULL, 0x00000001, 3616 }, /* MOVES */ -{ NULL, 0x00000001, 3624 }, /* MOVES */ -{ NULL, 0x00000001, 3632 }, /* MOVES */ -{ NULL, 0x00000001, 3640 }, /* MOVES */ -{ NULL, 0x00000001, 3641 }, /* MOVES */ -{ NULL, 0x00000001, 3664 }, /* MOVES */ -{ NULL, 0x00000001, 3672 }, /* MOVES */ -{ NULL, 0x00000001, 3680 }, /* MOVES */ -{ NULL, 0x00000001, 3688 }, /* MOVES */ -{ NULL, 0x00000001, 3696 }, /* MOVES */ -{ NULL, 0x00000001, 3704 }, /* MOVES */ -{ NULL, 0x00000001, 3705 }, /* MOVES */ -{ NULL, 0x00000001, 3728 }, /* MOVES */ -{ NULL, 0x00000001, 3736 }, /* MOVES */ -{ NULL, 0x00000001, 3744 }, /* MOVES */ -{ NULL, 0x00000001, 3752 }, /* MOVES */ -{ NULL, 0x00000001, 3760 }, /* MOVES */ -{ NULL, 0x00000001, 3768 }, /* MOVES */ -{ NULL, 0x00000001, 3769 }, /* MOVES */ -{ NULL, 0x00000000, 3792 }, /* CAS */ -{ NULL, 0x00000000, 3800 }, /* CAS */ -{ NULL, 0x00000000, 3808 }, /* CAS */ -{ NULL, 0x00000000, 3816 }, /* CAS */ -{ NULL, 0x00000000, 3824 }, /* CAS */ -{ NULL, 0x00000000, 3832 }, /* CAS */ -{ NULL, 0x00000000, 3833 }, /* CAS */ -{ NULL, 0x00000000, 3836 }, /* CAS2 */ -{ op_1000_0_comp_ff, 0x00000000, 4096 }, /* MOVE */ -{ op_1010_0_comp_ff, 0x00000000, 4112 }, /* MOVE */ -{ op_1018_0_comp_ff, 0x00000000, 4120 }, /* MOVE */ -{ op_1020_0_comp_ff, 0x00000000, 4128 }, /* MOVE */ -{ op_1028_0_comp_ff, 0x00000002, 4136 }, /* MOVE */ -{ op_1030_0_comp_ff, 0x00000002, 4144 }, /* MOVE */ -{ op_1038_0_comp_ff, 0x00000002, 4152 }, /* MOVE */ -{ op_1039_0_comp_ff, 0x00000002, 4153 }, /* MOVE */ -{ op_103a_0_comp_ff, 0x00000002, 4154 }, /* MOVE */ -{ op_103b_0_comp_ff, 0x00000002, 4155 }, /* MOVE */ -{ op_103c_0_comp_ff, 0x00000002, 4156 }, /* MOVE */ -{ op_1080_0_comp_ff, 0x00000000, 4224 }, /* MOVE */ -{ op_1090_0_comp_ff, 0x00000000, 4240 }, /* MOVE */ -{ op_1098_0_comp_ff, 0x00000000, 4248 }, /* MOVE */ -{ op_10a0_0_comp_ff, 0x00000000, 4256 }, /* MOVE */ -{ op_10a8_0_comp_ff, 0x00000002, 4264 }, /* MOVE */ -{ op_10b0_0_comp_ff, 0x00000002, 4272 }, /* MOVE */ -{ op_10b8_0_comp_ff, 0x00000002, 4280 }, /* MOVE */ -{ op_10b9_0_comp_ff, 0x00000002, 4281 }, /* MOVE */ -{ op_10ba_0_comp_ff, 0x00000002, 4282 }, /* MOVE */ -{ op_10bb_0_comp_ff, 0x00000002, 4283 }, /* MOVE */ -{ op_10bc_0_comp_ff, 0x00000002, 4284 }, /* MOVE */ -{ op_10c0_0_comp_ff, 0x00000000, 4288 }, /* MOVE */ -{ op_10d0_0_comp_ff, 0x00000000, 4304 }, /* MOVE */ -{ op_10d8_0_comp_ff, 0x00000000, 4312 }, /* MOVE */ -{ op_10e0_0_comp_ff, 0x00000000, 4320 }, /* MOVE */ -{ op_10e8_0_comp_ff, 0x00000002, 4328 }, /* MOVE */ -{ op_10f0_0_comp_ff, 0x00000002, 4336 }, /* MOVE */ -{ op_10f8_0_comp_ff, 0x00000002, 4344 }, /* MOVE */ -{ op_10f9_0_comp_ff, 0x00000002, 4345 }, /* MOVE */ -{ op_10fa_0_comp_ff, 0x00000002, 4346 }, /* MOVE */ -{ op_10fb_0_comp_ff, 0x00000002, 4347 }, /* MOVE */ -{ op_10fc_0_comp_ff, 0x00000002, 4348 }, /* MOVE */ -{ op_1100_0_comp_ff, 0x00000000, 4352 }, /* MOVE */ -{ op_1110_0_comp_ff, 0x00000000, 4368 }, /* MOVE */ -{ op_1118_0_comp_ff, 0x00000000, 4376 }, /* MOVE */ -{ op_1120_0_comp_ff, 0x00000000, 4384 }, /* MOVE */ -{ op_1128_0_comp_ff, 0x00000002, 4392 }, /* MOVE */ -{ op_1130_0_comp_ff, 0x00000002, 4400 }, /* MOVE */ -{ op_1138_0_comp_ff, 0x00000002, 4408 }, /* MOVE */ -{ op_1139_0_comp_ff, 0x00000002, 4409 }, /* MOVE */ -{ op_113a_0_comp_ff, 0x00000002, 4410 }, /* MOVE */ -{ op_113b_0_comp_ff, 0x00000002, 4411 }, /* MOVE */ -{ op_113c_0_comp_ff, 0x00000002, 4412 }, /* MOVE */ -{ op_1140_0_comp_ff, 0x00000002, 4416 }, /* MOVE */ -{ op_1150_0_comp_ff, 0x00000002, 4432 }, /* MOVE */ -{ op_1158_0_comp_ff, 0x00000002, 4440 }, /* MOVE */ -{ op_1160_0_comp_ff, 0x00000002, 4448 }, /* MOVE */ -{ op_1168_0_comp_ff, 0x00000002, 4456 }, /* MOVE */ -{ op_1170_0_comp_ff, 0x00000002, 4464 }, /* MOVE */ -{ op_1178_0_comp_ff, 0x00000002, 4472 }, /* MOVE */ -{ op_1179_0_comp_ff, 0x00000002, 4473 }, /* MOVE */ -{ op_117a_0_comp_ff, 0x00000002, 4474 }, /* MOVE */ -{ op_117b_0_comp_ff, 0x00000002, 4475 }, /* MOVE */ -{ op_117c_0_comp_ff, 0x00000002, 4476 }, /* MOVE */ -{ op_1180_0_comp_ff, 0x00000002, 4480 }, /* MOVE */ -{ op_1190_0_comp_ff, 0x00000002, 4496 }, /* MOVE */ -{ op_1198_0_comp_ff, 0x00000002, 4504 }, /* MOVE */ -{ op_11a0_0_comp_ff, 0x00000002, 4512 }, /* MOVE */ -{ op_11a8_0_comp_ff, 0x00000002, 4520 }, /* MOVE */ -{ op_11b0_0_comp_ff, 0x00000002, 4528 }, /* MOVE */ -{ op_11b8_0_comp_ff, 0x00000002, 4536 }, /* MOVE */ -{ op_11b9_0_comp_ff, 0x00000002, 4537 }, /* MOVE */ -{ op_11ba_0_comp_ff, 0x00000002, 4538 }, /* MOVE */ -{ op_11bb_0_comp_ff, 0x00000002, 4539 }, /* MOVE */ -{ op_11bc_0_comp_ff, 0x00000002, 4540 }, /* MOVE */ -{ op_11c0_0_comp_ff, 0x00000002, 4544 }, /* MOVE */ -{ op_11d0_0_comp_ff, 0x00000002, 4560 }, /* MOVE */ -{ op_11d8_0_comp_ff, 0x00000002, 4568 }, /* MOVE */ -{ op_11e0_0_comp_ff, 0x00000002, 4576 }, /* MOVE */ -{ op_11e8_0_comp_ff, 0x00000002, 4584 }, /* MOVE */ -{ op_11f0_0_comp_ff, 0x00000002, 4592 }, /* MOVE */ -{ op_11f8_0_comp_ff, 0x00000002, 4600 }, /* MOVE */ -{ op_11f9_0_comp_ff, 0x00000002, 4601 }, /* MOVE */ -{ op_11fa_0_comp_ff, 0x00000002, 4602 }, /* MOVE */ -{ op_11fb_0_comp_ff, 0x00000002, 4603 }, /* MOVE */ -{ op_11fc_0_comp_ff, 0x00000002, 4604 }, /* MOVE */ -{ op_13c0_0_comp_ff, 0x00000002, 5056 }, /* MOVE */ -{ op_13d0_0_comp_ff, 0x00000002, 5072 }, /* MOVE */ -{ op_13d8_0_comp_ff, 0x00000002, 5080 }, /* MOVE */ -{ op_13e0_0_comp_ff, 0x00000002, 5088 }, /* MOVE */ -{ op_13e8_0_comp_ff, 0x00000002, 5096 }, /* MOVE */ -{ op_13f0_0_comp_ff, 0x00000002, 5104 }, /* MOVE */ -{ op_13f8_0_comp_ff, 0x00000002, 5112 }, /* MOVE */ -{ op_13f9_0_comp_ff, 0x00000002, 5113 }, /* MOVE */ -{ op_13fa_0_comp_ff, 0x00000002, 5114 }, /* MOVE */ -{ op_13fb_0_comp_ff, 0x00000002, 5115 }, /* MOVE */ -{ op_13fc_0_comp_ff, 0x00000002, 5116 }, /* MOVE */ -{ op_2000_0_comp_ff, 0x00000000, 8192 }, /* MOVE */ -{ op_2008_0_comp_ff, 0x00000000, 8200 }, /* MOVE */ -{ op_2010_0_comp_ff, 0x00000000, 8208 }, /* MOVE */ -{ op_2018_0_comp_ff, 0x00000000, 8216 }, /* MOVE */ -{ op_2020_0_comp_ff, 0x00000000, 8224 }, /* MOVE */ -{ op_2028_0_comp_ff, 0x00000002, 8232 }, /* MOVE */ -{ op_2030_0_comp_ff, 0x00000002, 8240 }, /* MOVE */ -{ op_2038_0_comp_ff, 0x00000002, 8248 }, /* MOVE */ -{ op_2039_0_comp_ff, 0x00000002, 8249 }, /* MOVE */ -{ op_203a_0_comp_ff, 0x00000002, 8250 }, /* MOVE */ -{ op_203b_0_comp_ff, 0x00000002, 8251 }, /* MOVE */ -{ op_203c_0_comp_ff, 0x00000002, 8252 }, /* MOVE */ -{ op_2040_0_comp_ff, 0x00000000, 8256 }, /* MOVEA */ -{ op_2048_0_comp_ff, 0x00000000, 8264 }, /* MOVEA */ -{ op_2050_0_comp_ff, 0x00000000, 8272 }, /* MOVEA */ -{ op_2058_0_comp_ff, 0x00000000, 8280 }, /* MOVEA */ -{ op_2060_0_comp_ff, 0x00000000, 8288 }, /* MOVEA */ -{ op_2068_0_comp_ff, 0x00000002, 8296 }, /* MOVEA */ -{ op_2070_0_comp_ff, 0x00000002, 8304 }, /* MOVEA */ -{ op_2078_0_comp_ff, 0x00000002, 8312 }, /* MOVEA */ -{ op_2079_0_comp_ff, 0x00000002, 8313 }, /* MOVEA */ -{ op_207a_0_comp_ff, 0x00000002, 8314 }, /* MOVEA */ -{ op_207b_0_comp_ff, 0x00000002, 8315 }, /* MOVEA */ -{ op_207c_0_comp_ff, 0x00000002, 8316 }, /* MOVEA */ -{ op_2080_0_comp_ff, 0x00000000, 8320 }, /* MOVE */ -{ op_2088_0_comp_ff, 0x00000000, 8328 }, /* MOVE */ -{ op_2090_0_comp_ff, 0x00000000, 8336 }, /* MOVE */ -{ op_2098_0_comp_ff, 0x00000000, 8344 }, /* MOVE */ -{ op_20a0_0_comp_ff, 0x00000000, 8352 }, /* MOVE */ -{ op_20a8_0_comp_ff, 0x00000002, 8360 }, /* MOVE */ -{ op_20b0_0_comp_ff, 0x00000002, 8368 }, /* MOVE */ -{ op_20b8_0_comp_ff, 0x00000002, 8376 }, /* MOVE */ -{ op_20b9_0_comp_ff, 0x00000002, 8377 }, /* MOVE */ -{ op_20ba_0_comp_ff, 0x00000002, 8378 }, /* MOVE */ -{ op_20bb_0_comp_ff, 0x00000002, 8379 }, /* MOVE */ -{ op_20bc_0_comp_ff, 0x00000002, 8380 }, /* MOVE */ -{ op_20c0_0_comp_ff, 0x00000000, 8384 }, /* MOVE */ -{ op_20c8_0_comp_ff, 0x00000000, 8392 }, /* MOVE */ -{ op_20d0_0_comp_ff, 0x00000000, 8400 }, /* MOVE */ -{ op_20d8_0_comp_ff, 0x00000000, 8408 }, /* MOVE */ -{ op_20e0_0_comp_ff, 0x00000000, 8416 }, /* MOVE */ -{ op_20e8_0_comp_ff, 0x00000002, 8424 }, /* MOVE */ -{ op_20f0_0_comp_ff, 0x00000002, 8432 }, /* MOVE */ -{ op_20f8_0_comp_ff, 0x00000002, 8440 }, /* MOVE */ -{ op_20f9_0_comp_ff, 0x00000002, 8441 }, /* MOVE */ -{ op_20fa_0_comp_ff, 0x00000002, 8442 }, /* MOVE */ -{ op_20fb_0_comp_ff, 0x00000002, 8443 }, /* MOVE */ -{ op_20fc_0_comp_ff, 0x00000002, 8444 }, /* MOVE */ -{ op_2100_0_comp_ff, 0x00000000, 8448 }, /* MOVE */ -{ op_2108_0_comp_ff, 0x00000000, 8456 }, /* MOVE */ -{ op_2110_0_comp_ff, 0x00000000, 8464 }, /* MOVE */ -{ op_2118_0_comp_ff, 0x00000000, 8472 }, /* MOVE */ -{ op_2120_0_comp_ff, 0x00000000, 8480 }, /* MOVE */ -{ op_2128_0_comp_ff, 0x00000002, 8488 }, /* MOVE */ -{ op_2130_0_comp_ff, 0x00000002, 8496 }, /* MOVE */ -{ op_2138_0_comp_ff, 0x00000002, 8504 }, /* MOVE */ -{ op_2139_0_comp_ff, 0x00000002, 8505 }, /* MOVE */ -{ op_213a_0_comp_ff, 0x00000002, 8506 }, /* MOVE */ -{ op_213b_0_comp_ff, 0x00000002, 8507 }, /* MOVE */ -{ op_213c_0_comp_ff, 0x00000002, 8508 }, /* MOVE */ -{ op_2140_0_comp_ff, 0x00000002, 8512 }, /* MOVE */ -{ op_2148_0_comp_ff, 0x00000002, 8520 }, /* MOVE */ -{ op_2150_0_comp_ff, 0x00000002, 8528 }, /* MOVE */ -{ op_2158_0_comp_ff, 0x00000002, 8536 }, /* MOVE */ -{ op_2160_0_comp_ff, 0x00000002, 8544 }, /* MOVE */ -{ op_2168_0_comp_ff, 0x00000002, 8552 }, /* MOVE */ -{ op_2170_0_comp_ff, 0x00000002, 8560 }, /* MOVE */ -{ op_2178_0_comp_ff, 0x00000002, 8568 }, /* MOVE */ -{ op_2179_0_comp_ff, 0x00000002, 8569 }, /* MOVE */ -{ op_217a_0_comp_ff, 0x00000002, 8570 }, /* MOVE */ -{ op_217b_0_comp_ff, 0x00000002, 8571 }, /* MOVE */ -{ op_217c_0_comp_ff, 0x00000002, 8572 }, /* MOVE */ -{ op_2180_0_comp_ff, 0x00000002, 8576 }, /* MOVE */ -{ op_2188_0_comp_ff, 0x00000002, 8584 }, /* MOVE */ -{ op_2190_0_comp_ff, 0x00000002, 8592 }, /* MOVE */ -{ op_2198_0_comp_ff, 0x00000002, 8600 }, /* MOVE */ -{ op_21a0_0_comp_ff, 0x00000002, 8608 }, /* MOVE */ -{ op_21a8_0_comp_ff, 0x00000002, 8616 }, /* MOVE */ -{ op_21b0_0_comp_ff, 0x00000002, 8624 }, /* MOVE */ -{ op_21b8_0_comp_ff, 0x00000002, 8632 }, /* MOVE */ -{ op_21b9_0_comp_ff, 0x00000002, 8633 }, /* MOVE */ -{ op_21ba_0_comp_ff, 0x00000002, 8634 }, /* MOVE */ -{ op_21bb_0_comp_ff, 0x00000002, 8635 }, /* MOVE */ -{ op_21bc_0_comp_ff, 0x00000002, 8636 }, /* MOVE */ -{ op_21c0_0_comp_ff, 0x00000002, 8640 }, /* MOVE */ -{ op_21c8_0_comp_ff, 0x00000002, 8648 }, /* MOVE */ -{ op_21d0_0_comp_ff, 0x00000002, 8656 }, /* MOVE */ -{ op_21d8_0_comp_ff, 0x00000002, 8664 }, /* MOVE */ -{ op_21e0_0_comp_ff, 0x00000002, 8672 }, /* MOVE */ -{ op_21e8_0_comp_ff, 0x00000002, 8680 }, /* MOVE */ -{ op_21f0_0_comp_ff, 0x00000002, 8688 }, /* MOVE */ -{ op_21f8_0_comp_ff, 0x00000002, 8696 }, /* MOVE */ -{ op_21f9_0_comp_ff, 0x00000002, 8697 }, /* MOVE */ -{ op_21fa_0_comp_ff, 0x00000002, 8698 }, /* MOVE */ -{ op_21fb_0_comp_ff, 0x00000002, 8699 }, /* MOVE */ -{ op_21fc_0_comp_ff, 0x00000002, 8700 }, /* MOVE */ -{ op_23c0_0_comp_ff, 0x00000002, 9152 }, /* MOVE */ -{ op_23c8_0_comp_ff, 0x00000002, 9160 }, /* MOVE */ -{ op_23d0_0_comp_ff, 0x00000002, 9168 }, /* MOVE */ -{ op_23d8_0_comp_ff, 0x00000002, 9176 }, /* MOVE */ -{ op_23e0_0_comp_ff, 0x00000002, 9184 }, /* MOVE */ -{ op_23e8_0_comp_ff, 0x00000002, 9192 }, /* MOVE */ -{ op_23f0_0_comp_ff, 0x00000002, 9200 }, /* MOVE */ -{ op_23f8_0_comp_ff, 0x00000002, 9208 }, /* MOVE */ -{ op_23f9_0_comp_ff, 0x00000002, 9209 }, /* MOVE */ -{ op_23fa_0_comp_ff, 0x00000002, 9210 }, /* MOVE */ -{ op_23fb_0_comp_ff, 0x00000002, 9211 }, /* MOVE */ -{ op_23fc_0_comp_ff, 0x00000002, 9212 }, /* MOVE */ -{ op_3000_0_comp_ff, 0x00000000, 12288 }, /* MOVE */ -{ op_3008_0_comp_ff, 0x00000000, 12296 }, /* MOVE */ -{ op_3010_0_comp_ff, 0x00000000, 12304 }, /* MOVE */ -{ op_3018_0_comp_ff, 0x00000000, 12312 }, /* MOVE */ -{ op_3020_0_comp_ff, 0x00000000, 12320 }, /* MOVE */ -{ op_3028_0_comp_ff, 0x00000002, 12328 }, /* MOVE */ -{ op_3030_0_comp_ff, 0x00000002, 12336 }, /* MOVE */ -{ op_3038_0_comp_ff, 0x00000002, 12344 }, /* MOVE */ -{ op_3039_0_comp_ff, 0x00000002, 12345 }, /* MOVE */ -{ op_303a_0_comp_ff, 0x00000002, 12346 }, /* MOVE */ -{ op_303b_0_comp_ff, 0x00000002, 12347 }, /* MOVE */ -{ op_303c_0_comp_ff, 0x00000002, 12348 }, /* MOVE */ -{ op_3040_0_comp_ff, 0x00000000, 12352 }, /* MOVEA */ -{ op_3048_0_comp_ff, 0x00000000, 12360 }, /* MOVEA */ -{ op_3050_0_comp_ff, 0x00000000, 12368 }, /* MOVEA */ -{ op_3058_0_comp_ff, 0x00000000, 12376 }, /* MOVEA */ -{ op_3060_0_comp_ff, 0x00000000, 12384 }, /* MOVEA */ -{ op_3068_0_comp_ff, 0x00000002, 12392 }, /* MOVEA */ -{ op_3070_0_comp_ff, 0x00000002, 12400 }, /* MOVEA */ -{ op_3078_0_comp_ff, 0x00000002, 12408 }, /* MOVEA */ -{ op_3079_0_comp_ff, 0x00000002, 12409 }, /* MOVEA */ -{ op_307a_0_comp_ff, 0x00000002, 12410 }, /* MOVEA */ -{ op_307b_0_comp_ff, 0x00000002, 12411 }, /* MOVEA */ -{ op_307c_0_comp_ff, 0x00000002, 12412 }, /* MOVEA */ -{ op_3080_0_comp_ff, 0x00000000, 12416 }, /* MOVE */ -{ op_3088_0_comp_ff, 0x00000000, 12424 }, /* MOVE */ -{ op_3090_0_comp_ff, 0x00000000, 12432 }, /* MOVE */ -{ op_3098_0_comp_ff, 0x00000000, 12440 }, /* MOVE */ -{ op_30a0_0_comp_ff, 0x00000000, 12448 }, /* MOVE */ -{ op_30a8_0_comp_ff, 0x00000002, 12456 }, /* MOVE */ -{ op_30b0_0_comp_ff, 0x00000002, 12464 }, /* MOVE */ -{ op_30b8_0_comp_ff, 0x00000002, 12472 }, /* MOVE */ -{ op_30b9_0_comp_ff, 0x00000002, 12473 }, /* MOVE */ -{ op_30ba_0_comp_ff, 0x00000002, 12474 }, /* MOVE */ -{ op_30bb_0_comp_ff, 0x00000002, 12475 }, /* MOVE */ -{ op_30bc_0_comp_ff, 0x00000002, 12476 }, /* MOVE */ -{ op_30c0_0_comp_ff, 0x00000000, 12480 }, /* MOVE */ -{ op_30c8_0_comp_ff, 0x00000000, 12488 }, /* MOVE */ -{ op_30d0_0_comp_ff, 0x00000000, 12496 }, /* MOVE */ -{ op_30d8_0_comp_ff, 0x00000000, 12504 }, /* MOVE */ -{ op_30e0_0_comp_ff, 0x00000000, 12512 }, /* MOVE */ -{ op_30e8_0_comp_ff, 0x00000002, 12520 }, /* MOVE */ -{ op_30f0_0_comp_ff, 0x00000002, 12528 }, /* MOVE */ -{ op_30f8_0_comp_ff, 0x00000002, 12536 }, /* MOVE */ -{ op_30f9_0_comp_ff, 0x00000002, 12537 }, /* MOVE */ -{ op_30fa_0_comp_ff, 0x00000002, 12538 }, /* MOVE */ -{ op_30fb_0_comp_ff, 0x00000002, 12539 }, /* MOVE */ -{ op_30fc_0_comp_ff, 0x00000002, 12540 }, /* MOVE */ -{ op_3100_0_comp_ff, 0x00000000, 12544 }, /* MOVE */ -{ op_3108_0_comp_ff, 0x00000000, 12552 }, /* MOVE */ -{ op_3110_0_comp_ff, 0x00000000, 12560 }, /* MOVE */ -{ op_3118_0_comp_ff, 0x00000000, 12568 }, /* MOVE */ -{ op_3120_0_comp_ff, 0x00000000, 12576 }, /* MOVE */ -{ op_3128_0_comp_ff, 0x00000002, 12584 }, /* MOVE */ -{ op_3130_0_comp_ff, 0x00000002, 12592 }, /* MOVE */ -{ op_3138_0_comp_ff, 0x00000002, 12600 }, /* MOVE */ -{ op_3139_0_comp_ff, 0x00000002, 12601 }, /* MOVE */ -{ op_313a_0_comp_ff, 0x00000002, 12602 }, /* MOVE */ -{ op_313b_0_comp_ff, 0x00000002, 12603 }, /* MOVE */ -{ op_313c_0_comp_ff, 0x00000002, 12604 }, /* MOVE */ -{ op_3140_0_comp_ff, 0x00000002, 12608 }, /* MOVE */ -{ op_3148_0_comp_ff, 0x00000002, 12616 }, /* MOVE */ -{ op_3150_0_comp_ff, 0x00000002, 12624 }, /* MOVE */ -{ op_3158_0_comp_ff, 0x00000002, 12632 }, /* MOVE */ -{ op_3160_0_comp_ff, 0x00000002, 12640 }, /* MOVE */ -{ op_3168_0_comp_ff, 0x00000002, 12648 }, /* MOVE */ -{ op_3170_0_comp_ff, 0x00000002, 12656 }, /* MOVE */ -{ op_3178_0_comp_ff, 0x00000002, 12664 }, /* MOVE */ -{ op_3179_0_comp_ff, 0x00000002, 12665 }, /* MOVE */ -{ op_317a_0_comp_ff, 0x00000002, 12666 }, /* MOVE */ -{ op_317b_0_comp_ff, 0x00000002, 12667 }, /* MOVE */ -{ op_317c_0_comp_ff, 0x00000002, 12668 }, /* MOVE */ -{ op_3180_0_comp_ff, 0x00000002, 12672 }, /* MOVE */ -{ op_3188_0_comp_ff, 0x00000002, 12680 }, /* MOVE */ -{ op_3190_0_comp_ff, 0x00000002, 12688 }, /* MOVE */ -{ op_3198_0_comp_ff, 0x00000002, 12696 }, /* MOVE */ -{ op_31a0_0_comp_ff, 0x00000002, 12704 }, /* MOVE */ -{ op_31a8_0_comp_ff, 0x00000002, 12712 }, /* MOVE */ -{ op_31b0_0_comp_ff, 0x00000002, 12720 }, /* MOVE */ -{ op_31b8_0_comp_ff, 0x00000002, 12728 }, /* MOVE */ -{ op_31b9_0_comp_ff, 0x00000002, 12729 }, /* MOVE */ -{ op_31ba_0_comp_ff, 0x00000002, 12730 }, /* MOVE */ -{ op_31bb_0_comp_ff, 0x00000002, 12731 }, /* MOVE */ -{ op_31bc_0_comp_ff, 0x00000002, 12732 }, /* MOVE */ -{ op_31c0_0_comp_ff, 0x00000002, 12736 }, /* MOVE */ -{ op_31c8_0_comp_ff, 0x00000002, 12744 }, /* MOVE */ -{ op_31d0_0_comp_ff, 0x00000002, 12752 }, /* MOVE */ -{ op_31d8_0_comp_ff, 0x00000002, 12760 }, /* MOVE */ -{ op_31e0_0_comp_ff, 0x00000002, 12768 }, /* MOVE */ -{ op_31e8_0_comp_ff, 0x00000002, 12776 }, /* MOVE */ -{ op_31f0_0_comp_ff, 0x00000002, 12784 }, /* MOVE */ -{ op_31f8_0_comp_ff, 0x00000002, 12792 }, /* MOVE */ -{ op_31f9_0_comp_ff, 0x00000002, 12793 }, /* MOVE */ -{ op_31fa_0_comp_ff, 0x00000002, 12794 }, /* MOVE */ -{ op_31fb_0_comp_ff, 0x00000002, 12795 }, /* MOVE */ -{ op_31fc_0_comp_ff, 0x00000002, 12796 }, /* MOVE */ -{ op_33c0_0_comp_ff, 0x00000002, 13248 }, /* MOVE */ -{ op_33c8_0_comp_ff, 0x00000002, 13256 }, /* MOVE */ -{ op_33d0_0_comp_ff, 0x00000002, 13264 }, /* MOVE */ -{ op_33d8_0_comp_ff, 0x00000002, 13272 }, /* MOVE */ -{ op_33e0_0_comp_ff, 0x00000002, 13280 }, /* MOVE */ -{ op_33e8_0_comp_ff, 0x00000002, 13288 }, /* MOVE */ -{ op_33f0_0_comp_ff, 0x00000002, 13296 }, /* MOVE */ -{ op_33f8_0_comp_ff, 0x00000002, 13304 }, /* MOVE */ -{ op_33f9_0_comp_ff, 0x00000002, 13305 }, /* MOVE */ -{ op_33fa_0_comp_ff, 0x00000002, 13306 }, /* MOVE */ -{ op_33fb_0_comp_ff, 0x00000002, 13307 }, /* MOVE */ -{ op_33fc_0_comp_ff, 0x00000002, 13308 }, /* MOVE */ -{ op_4000_0_comp_ff, 0x00000008, 16384 }, /* NEGX */ -{ op_4010_0_comp_ff, 0x00000008, 16400 }, /* NEGX */ -{ op_4018_0_comp_ff, 0x00000008, 16408 }, /* NEGX */ -{ op_4020_0_comp_ff, 0x00000008, 16416 }, /* NEGX */ -{ op_4028_0_comp_ff, 0x0000000a, 16424 }, /* NEGX */ -{ op_4030_0_comp_ff, 0x0000000a, 16432 }, /* NEGX */ -{ op_4038_0_comp_ff, 0x0000000a, 16440 }, /* NEGX */ -{ op_4039_0_comp_ff, 0x0000000a, 16441 }, /* NEGX */ -{ op_4040_0_comp_ff, 0x00000008, 16448 }, /* NEGX */ -{ op_4050_0_comp_ff, 0x00000008, 16464 }, /* NEGX */ -{ op_4058_0_comp_ff, 0x00000008, 16472 }, /* NEGX */ -{ op_4060_0_comp_ff, 0x00000008, 16480 }, /* NEGX */ -{ op_4068_0_comp_ff, 0x0000000a, 16488 }, /* NEGX */ -{ op_4070_0_comp_ff, 0x0000000a, 16496 }, /* NEGX */ -{ op_4078_0_comp_ff, 0x0000000a, 16504 }, /* NEGX */ -{ op_4079_0_comp_ff, 0x0000000a, 16505 }, /* NEGX */ -{ op_4080_0_comp_ff, 0x00000008, 16512 }, /* NEGX */ -{ op_4090_0_comp_ff, 0x00000008, 16528 }, /* NEGX */ -{ op_4098_0_comp_ff, 0x00000008, 16536 }, /* NEGX */ -{ op_40a0_0_comp_ff, 0x00000008, 16544 }, /* NEGX */ -{ op_40a8_0_comp_ff, 0x0000000a, 16552 }, /* NEGX */ -{ op_40b0_0_comp_ff, 0x0000000a, 16560 }, /* NEGX */ -{ op_40b8_0_comp_ff, 0x0000000a, 16568 }, /* NEGX */ -{ op_40b9_0_comp_ff, 0x0000000a, 16569 }, /* NEGX */ -{ NULL, 0x00000001, 16576 }, /* MVSR2 */ -{ NULL, 0x00000001, 16592 }, /* MVSR2 */ -{ NULL, 0x00000001, 16600 }, /* MVSR2 */ -{ NULL, 0x00000001, 16608 }, /* MVSR2 */ -{ NULL, 0x00000001, 16616 }, /* MVSR2 */ -{ NULL, 0x00000001, 16624 }, /* MVSR2 */ -{ NULL, 0x00000001, 16632 }, /* MVSR2 */ -{ NULL, 0x00000001, 16633 }, /* MVSR2 */ -{ NULL, 0x00000001, 16640 }, /* CHK */ -{ NULL, 0x00000001, 16656 }, /* CHK */ -{ NULL, 0x00000001, 16664 }, /* CHK */ -{ NULL, 0x00000001, 16672 }, /* CHK */ -{ NULL, 0x00000001, 16680 }, /* CHK */ -{ NULL, 0x00000001, 16688 }, /* CHK */ -{ NULL, 0x00000001, 16696 }, /* CHK */ -{ NULL, 0x00000001, 16697 }, /* CHK */ -{ NULL, 0x00000001, 16698 }, /* CHK */ -{ NULL, 0x00000001, 16699 }, /* CHK */ -{ NULL, 0x00000001, 16700 }, /* CHK */ -{ NULL, 0x00000001, 16768 }, /* CHK */ -{ NULL, 0x00000001, 16784 }, /* CHK */ -{ NULL, 0x00000001, 16792 }, /* CHK */ -{ NULL, 0x00000001, 16800 }, /* CHK */ -{ NULL, 0x00000001, 16808 }, /* CHK */ -{ NULL, 0x00000001, 16816 }, /* CHK */ -{ NULL, 0x00000001, 16824 }, /* CHK */ -{ NULL, 0x00000001, 16825 }, /* CHK */ -{ NULL, 0x00000001, 16826 }, /* CHK */ -{ NULL, 0x00000001, 16827 }, /* CHK */ -{ NULL, 0x00000001, 16828 }, /* CHK */ -{ op_41d0_0_comp_ff, 0x00000000, 16848 }, /* LEA */ -{ op_41e8_0_comp_ff, 0x00000002, 16872 }, /* LEA */ -{ op_41f0_0_comp_ff, 0x00000002, 16880 }, /* LEA */ -{ op_41f8_0_comp_ff, 0x00000002, 16888 }, /* LEA */ -{ op_41f9_0_comp_ff, 0x00000002, 16889 }, /* LEA */ -{ op_41fa_0_comp_ff, 0x00000002, 16890 }, /* LEA */ -{ op_41fb_0_comp_ff, 0x00000002, 16891 }, /* LEA */ -{ op_4200_0_comp_ff, 0x00000000, 16896 }, /* CLR */ -{ op_4210_0_comp_ff, 0x00000000, 16912 }, /* CLR */ -{ op_4218_0_comp_ff, 0x00000000, 16920 }, /* CLR */ -{ op_4220_0_comp_ff, 0x00000000, 16928 }, /* CLR */ -{ op_4228_0_comp_ff, 0x00000002, 16936 }, /* CLR */ -{ op_4230_0_comp_ff, 0x00000002, 16944 }, /* CLR */ -{ op_4238_0_comp_ff, 0x00000002, 16952 }, /* CLR */ -{ op_4239_0_comp_ff, 0x00000002, 16953 }, /* CLR */ -{ op_4240_0_comp_ff, 0x00000000, 16960 }, /* CLR */ -{ op_4250_0_comp_ff, 0x00000000, 16976 }, /* CLR */ -{ op_4258_0_comp_ff, 0x00000000, 16984 }, /* CLR */ -{ op_4260_0_comp_ff, 0x00000000, 16992 }, /* CLR */ -{ op_4268_0_comp_ff, 0x00000002, 17000 }, /* CLR */ -{ op_4270_0_comp_ff, 0x00000002, 17008 }, /* CLR */ -{ op_4278_0_comp_ff, 0x00000002, 17016 }, /* CLR */ -{ op_4279_0_comp_ff, 0x00000002, 17017 }, /* CLR */ -{ op_4280_0_comp_ff, 0x00000000, 17024 }, /* CLR */ -{ op_4290_0_comp_ff, 0x00000000, 17040 }, /* CLR */ -{ op_4298_0_comp_ff, 0x00000000, 17048 }, /* CLR */ -{ op_42a0_0_comp_ff, 0x00000000, 17056 }, /* CLR */ -{ op_42a8_0_comp_ff, 0x00000002, 17064 }, /* CLR */ -{ op_42b0_0_comp_ff, 0x00000002, 17072 }, /* CLR */ -{ op_42b8_0_comp_ff, 0x00000002, 17080 }, /* CLR */ -{ op_42b9_0_comp_ff, 0x00000002, 17081 }, /* CLR */ -{ NULL, 0x00000001, 17088 }, /* MVSR2 */ -{ NULL, 0x00000001, 17104 }, /* MVSR2 */ -{ NULL, 0x00000001, 17112 }, /* MVSR2 */ -{ NULL, 0x00000001, 17120 }, /* MVSR2 */ -{ NULL, 0x00000001, 17128 }, /* MVSR2 */ -{ NULL, 0x00000001, 17136 }, /* MVSR2 */ -{ NULL, 0x00000001, 17144 }, /* MVSR2 */ -{ NULL, 0x00000001, 17145 }, /* MVSR2 */ -{ op_4400_0_comp_ff, 0x00000000, 17408 }, /* NEG */ -{ op_4410_0_comp_ff, 0x00000000, 17424 }, /* NEG */ -{ op_4418_0_comp_ff, 0x00000000, 17432 }, /* NEG */ -{ op_4420_0_comp_ff, 0x00000000, 17440 }, /* NEG */ -{ op_4428_0_comp_ff, 0x00000002, 17448 }, /* NEG */ -{ op_4430_0_comp_ff, 0x00000002, 17456 }, /* NEG */ -{ op_4438_0_comp_ff, 0x00000002, 17464 }, /* NEG */ -{ op_4439_0_comp_ff, 0x00000002, 17465 }, /* NEG */ -{ op_4440_0_comp_ff, 0x00000000, 17472 }, /* NEG */ -{ op_4450_0_comp_ff, 0x00000000, 17488 }, /* NEG */ -{ op_4458_0_comp_ff, 0x00000000, 17496 }, /* NEG */ -{ op_4460_0_comp_ff, 0x00000000, 17504 }, /* NEG */ -{ op_4468_0_comp_ff, 0x00000002, 17512 }, /* NEG */ -{ op_4470_0_comp_ff, 0x00000002, 17520 }, /* NEG */ -{ op_4478_0_comp_ff, 0x00000002, 17528 }, /* NEG */ -{ op_4479_0_comp_ff, 0x00000002, 17529 }, /* NEG */ -{ op_4480_0_comp_ff, 0x00000000, 17536 }, /* NEG */ -{ op_4490_0_comp_ff, 0x00000000, 17552 }, /* NEG */ -{ op_4498_0_comp_ff, 0x00000000, 17560 }, /* NEG */ -{ op_44a0_0_comp_ff, 0x00000000, 17568 }, /* NEG */ -{ op_44a8_0_comp_ff, 0x00000002, 17576 }, /* NEG */ -{ op_44b0_0_comp_ff, 0x00000002, 17584 }, /* NEG */ -{ op_44b8_0_comp_ff, 0x00000002, 17592 }, /* NEG */ -{ op_44b9_0_comp_ff, 0x00000002, 17593 }, /* NEG */ -{ NULL, 0x00000001, 17600 }, /* MV2SR */ -{ NULL, 0x00000001, 17616 }, /* MV2SR */ -{ NULL, 0x00000001, 17624 }, /* MV2SR */ -{ NULL, 0x00000001, 17632 }, /* MV2SR */ -{ NULL, 0x00000001, 17640 }, /* MV2SR */ -{ NULL, 0x00000001, 17648 }, /* MV2SR */ -{ NULL, 0x00000001, 17656 }, /* MV2SR */ -{ NULL, 0x00000001, 17657 }, /* MV2SR */ -{ NULL, 0x00000001, 17658 }, /* MV2SR */ -{ NULL, 0x00000001, 17659 }, /* MV2SR */ -{ NULL, 0x00000001, 17660 }, /* MV2SR */ -{ op_4600_0_comp_ff, 0x00000000, 17920 }, /* NOT */ -{ op_4610_0_comp_ff, 0x00000000, 17936 }, /* NOT */ -{ op_4618_0_comp_ff, 0x00000000, 17944 }, /* NOT */ -{ op_4620_0_comp_ff, 0x00000000, 17952 }, /* NOT */ -{ op_4628_0_comp_ff, 0x00000002, 17960 }, /* NOT */ -{ op_4630_0_comp_ff, 0x00000002, 17968 }, /* NOT */ -{ op_4638_0_comp_ff, 0x00000002, 17976 }, /* NOT */ -{ op_4639_0_comp_ff, 0x00000002, 17977 }, /* NOT */ -{ op_4640_0_comp_ff, 0x00000000, 17984 }, /* NOT */ -{ op_4650_0_comp_ff, 0x00000000, 18000 }, /* NOT */ -{ op_4658_0_comp_ff, 0x00000000, 18008 }, /* NOT */ -{ op_4660_0_comp_ff, 0x00000000, 18016 }, /* NOT */ -{ op_4668_0_comp_ff, 0x00000002, 18024 }, /* NOT */ -{ op_4670_0_comp_ff, 0x00000002, 18032 }, /* NOT */ -{ op_4678_0_comp_ff, 0x00000002, 18040 }, /* NOT */ -{ op_4679_0_comp_ff, 0x00000002, 18041 }, /* NOT */ -{ op_4680_0_comp_ff, 0x00000000, 18048 }, /* NOT */ -{ op_4690_0_comp_ff, 0x00000000, 18064 }, /* NOT */ -{ op_4698_0_comp_ff, 0x00000000, 18072 }, /* NOT */ -{ op_46a0_0_comp_ff, 0x00000000, 18080 }, /* NOT */ -{ op_46a8_0_comp_ff, 0x00000002, 18088 }, /* NOT */ -{ op_46b0_0_comp_ff, 0x00000002, 18096 }, /* NOT */ -{ op_46b8_0_comp_ff, 0x00000002, 18104 }, /* NOT */ -{ op_46b9_0_comp_ff, 0x00000002, 18105 }, /* NOT */ -{ NULL, 0x00000001, 18112 }, /* MV2SR */ -{ NULL, 0x00000001, 18128 }, /* MV2SR */ -{ NULL, 0x00000001, 18136 }, /* MV2SR */ -{ NULL, 0x00000001, 18144 }, /* MV2SR */ -{ NULL, 0x00000001, 18152 }, /* MV2SR */ -{ NULL, 0x00000001, 18160 }, /* MV2SR */ -{ NULL, 0x00000001, 18168 }, /* MV2SR */ -{ NULL, 0x00000001, 18169 }, /* MV2SR */ -{ NULL, 0x00000001, 18170 }, /* MV2SR */ -{ NULL, 0x00000001, 18171 }, /* MV2SR */ -{ NULL, 0x00000001, 18172 }, /* MV2SR */ -{ NULL, 0x00000000, 18432 }, /* NBCD */ -{ op_4808_0_comp_ff, 0x00000002, 18440 }, /* LINK */ -{ NULL, 0x00000000, 18448 }, /* NBCD */ -{ NULL, 0x00000000, 18456 }, /* NBCD */ -{ NULL, 0x00000000, 18464 }, /* NBCD */ -{ NULL, 0x00000000, 18472 }, /* NBCD */ -{ NULL, 0x00000000, 18480 }, /* NBCD */ -{ NULL, 0x00000000, 18488 }, /* NBCD */ -{ NULL, 0x00000000, 18489 }, /* NBCD */ -{ op_4840_0_comp_ff, 0x00000000, 18496 }, /* SWAP */ -{ NULL, 0x00000001, 18504 }, /* BKPT */ -{ op_4850_0_comp_ff, 0x00000000, 18512 }, /* PEA */ -{ op_4868_0_comp_ff, 0x00000002, 18536 }, /* PEA */ -{ op_4870_0_comp_ff, 0x00000002, 18544 }, /* PEA */ -{ op_4878_0_comp_ff, 0x00000002, 18552 }, /* PEA */ -{ op_4879_0_comp_ff, 0x00000002, 18553 }, /* PEA */ -{ op_487a_0_comp_ff, 0x00000002, 18554 }, /* PEA */ -{ op_487b_0_comp_ff, 0x00000002, 18555 }, /* PEA */ -{ op_4880_0_comp_ff, 0x00000000, 18560 }, /* EXT */ -{ op_4890_0_comp_ff, 0x00000002, 18576 }, /* MVMLE */ -{ op_48a0_0_comp_ff, 0x00000002, 18592 }, /* MVMLE */ -{ op_48a8_0_comp_ff, 0x00000002, 18600 }, /* MVMLE */ -{ op_48b0_0_comp_ff, 0x00000002, 18608 }, /* MVMLE */ -{ op_48b8_0_comp_ff, 0x00000002, 18616 }, /* MVMLE */ -{ op_48b9_0_comp_ff, 0x00000002, 18617 }, /* MVMLE */ -{ op_48c0_0_comp_ff, 0x00000000, 18624 }, /* EXT */ -{ op_48d0_0_comp_ff, 0x00000002, 18640 }, /* MVMLE */ -{ op_48e0_0_comp_ff, 0x00000002, 18656 }, /* MVMLE */ -{ op_48e8_0_comp_ff, 0x00000002, 18664 }, /* MVMLE */ -{ op_48f0_0_comp_ff, 0x00000002, 18672 }, /* MVMLE */ -{ op_48f8_0_comp_ff, 0x00000002, 18680 }, /* MVMLE */ -{ op_48f9_0_comp_ff, 0x00000002, 18681 }, /* MVMLE */ -{ op_49c0_0_comp_ff, 0x00000000, 18880 }, /* EXT */ -{ op_4a00_0_comp_ff, 0x00000000, 18944 }, /* TST */ -{ op_4a10_0_comp_ff, 0x00000000, 18960 }, /* TST */ -{ op_4a18_0_comp_ff, 0x00000000, 18968 }, /* TST */ -{ op_4a20_0_comp_ff, 0x00000000, 18976 }, /* TST */ -{ op_4a28_0_comp_ff, 0x00000002, 18984 }, /* TST */ -{ op_4a30_0_comp_ff, 0x00000002, 18992 }, /* TST */ -{ op_4a38_0_comp_ff, 0x00000002, 19000 }, /* TST */ -{ op_4a39_0_comp_ff, 0x00000002, 19001 }, /* TST */ -{ op_4a3a_0_comp_ff, 0x00000002, 19002 }, /* TST */ -{ op_4a3b_0_comp_ff, 0x00000002, 19003 }, /* TST */ -{ op_4a3c_0_comp_ff, 0x00000002, 19004 }, /* TST */ -{ op_4a40_0_comp_ff, 0x00000000, 19008 }, /* TST */ -{ op_4a48_0_comp_ff, 0x00000000, 19016 }, /* TST */ -{ op_4a50_0_comp_ff, 0x00000000, 19024 }, /* TST */ -{ op_4a58_0_comp_ff, 0x00000000, 19032 }, /* TST */ -{ op_4a60_0_comp_ff, 0x00000000, 19040 }, /* TST */ -{ op_4a68_0_comp_ff, 0x00000002, 19048 }, /* TST */ -{ op_4a70_0_comp_ff, 0x00000002, 19056 }, /* TST */ -{ op_4a78_0_comp_ff, 0x00000002, 19064 }, /* TST */ -{ op_4a79_0_comp_ff, 0x00000002, 19065 }, /* TST */ -{ op_4a7a_0_comp_ff, 0x00000002, 19066 }, /* TST */ -{ op_4a7b_0_comp_ff, 0x00000002, 19067 }, /* TST */ -{ op_4a7c_0_comp_ff, 0x00000002, 19068 }, /* TST */ -{ op_4a80_0_comp_ff, 0x00000000, 19072 }, /* TST */ -{ op_4a88_0_comp_ff, 0x00000000, 19080 }, /* TST */ -{ op_4a90_0_comp_ff, 0x00000000, 19088 }, /* TST */ -{ op_4a98_0_comp_ff, 0x00000000, 19096 }, /* TST */ -{ op_4aa0_0_comp_ff, 0x00000000, 19104 }, /* TST */ -{ op_4aa8_0_comp_ff, 0x00000002, 19112 }, /* TST */ -{ op_4ab0_0_comp_ff, 0x00000002, 19120 }, /* TST */ -{ op_4ab8_0_comp_ff, 0x00000002, 19128 }, /* TST */ -{ op_4ab9_0_comp_ff, 0x00000002, 19129 }, /* TST */ -{ op_4aba_0_comp_ff, 0x00000002, 19130 }, /* TST */ -{ op_4abb_0_comp_ff, 0x00000002, 19131 }, /* TST */ -{ op_4abc_0_comp_ff, 0x00000002, 19132 }, /* TST */ -{ NULL, 0x00000000, 19136 }, /* TAS */ -{ NULL, 0x00000000, 19152 }, /* TAS */ -{ NULL, 0x00000000, 19160 }, /* TAS */ -{ NULL, 0x00000000, 19168 }, /* TAS */ -{ NULL, 0x00000000, 19176 }, /* TAS */ -{ NULL, 0x00000000, 19184 }, /* TAS */ -{ NULL, 0x00000000, 19192 }, /* TAS */ -{ NULL, 0x00000000, 19193 }, /* TAS */ -{ op_4c00_0_comp_ff, 0x00000002, 19456 }, /* MULL */ -{ op_4c10_0_comp_ff, 0x00000002, 19472 }, /* MULL */ -{ op_4c18_0_comp_ff, 0x00000002, 19480 }, /* MULL */ -{ op_4c20_0_comp_ff, 0x00000002, 19488 }, /* MULL */ -{ op_4c28_0_comp_ff, 0x00000002, 19496 }, /* MULL */ -{ op_4c30_0_comp_ff, 0x00000002, 19504 }, /* MULL */ -{ op_4c38_0_comp_ff, 0x00000002, 19512 }, /* MULL */ -{ op_4c39_0_comp_ff, 0x00000002, 19513 }, /* MULL */ -{ op_4c3a_0_comp_ff, 0x00000002, 19514 }, /* MULL */ -{ op_4c3b_0_comp_ff, 0x00000002, 19515 }, /* MULL */ -{ op_4c3c_0_comp_ff, 0x00000002, 19516 }, /* MULL */ -{ op_4c40_0_comp_ff, 0x00000002, 19520 }, /* DIVL */ -{ op_4c50_0_comp_ff, 0x00000002, 19536 }, /* DIVL */ -{ op_4c58_0_comp_ff, 0x00000002, 19544 }, /* DIVL */ -{ op_4c60_0_comp_ff, 0x00000002, 19552 }, /* DIVL */ -{ op_4c68_0_comp_ff, 0x00000002, 19560 }, /* DIVL */ -{ op_4c70_0_comp_ff, 0x00000002, 19568 }, /* DIVL */ -{ op_4c78_0_comp_ff, 0x00000002, 19576 }, /* DIVL */ -{ op_4c79_0_comp_ff, 0x00000002, 19577 }, /* DIVL */ -{ op_4c7a_0_comp_ff, 0x00000002, 19578 }, /* DIVL */ -{ op_4c7b_0_comp_ff, 0x00000002, 19579 }, /* DIVL */ -{ op_4c7c_0_comp_ff, 0x00000002, 19580 }, /* DIVL */ -{ op_4c90_0_comp_ff, 0x00000002, 19600 }, /* MVMEL */ -{ op_4c98_0_comp_ff, 0x00000002, 19608 }, /* MVMEL */ -{ op_4ca8_0_comp_ff, 0x00000002, 19624 }, /* MVMEL */ -{ op_4cb0_0_comp_ff, 0x00000002, 19632 }, /* MVMEL */ -{ op_4cb8_0_comp_ff, 0x00000002, 19640 }, /* MVMEL */ -{ op_4cb9_0_comp_ff, 0x00000002, 19641 }, /* MVMEL */ -{ op_4cba_0_comp_ff, 0x00000002, 19642 }, /* MVMEL */ -{ op_4cbb_0_comp_ff, 0x00000002, 19643 }, /* MVMEL */ -{ op_4cd0_0_comp_ff, 0x00000002, 19664 }, /* MVMEL */ -{ op_4cd8_0_comp_ff, 0x00000002, 19672 }, /* MVMEL */ -{ op_4ce8_0_comp_ff, 0x00000002, 19688 }, /* MVMEL */ -{ op_4cf0_0_comp_ff, 0x00000002, 19696 }, /* MVMEL */ -{ op_4cf8_0_comp_ff, 0x00000002, 19704 }, /* MVMEL */ -{ op_4cf9_0_comp_ff, 0x00000002, 19705 }, /* MVMEL */ -{ op_4cfa_0_comp_ff, 0x00000002, 19706 }, /* MVMEL */ -{ op_4cfb_0_comp_ff, 0x00000002, 19707 }, /* MVMEL */ -{ NULL, 0x00000001, 20032 }, /* TRAP */ -{ op_4e50_0_comp_ff, 0x00000002, 20048 }, /* LINK */ -{ op_4e58_0_comp_ff, 0x00000000, 20056 }, /* UNLK */ -{ NULL, 0x00000001, 20064 }, /* MVR2USP */ -{ NULL, 0x00000001, 20072 }, /* MVUSP2R */ -{ NULL, 0x00000001, 20080 }, /* RESET */ -{ op_4e71_0_comp_ff, 0x00000000, 20081 }, /* NOP */ -{ NULL, 0x00000001, 20082 }, /* STOP */ -{ NULL, 0x00000001, 20083 }, /* RTE */ -{ op_4e74_0_comp_ff, 0x00000003, 20084 }, /* RTD */ -{ op_4e75_0_comp_ff, 0x00000001, 20085 }, /* RTS */ -{ NULL, 0x00000001, 20086 }, /* TRAPV */ -{ NULL, 0x00000001, 20087 }, /* RTR */ -{ NULL, 0x00000001, 20090 }, /* MOVEC2 */ -{ NULL, 0x00000001, 20091 }, /* MOVE2C */ -{ op_4e90_0_comp_ff, 0x00000001, 20112 }, /* JSR */ -{ op_4ea8_0_comp_ff, 0x00000003, 20136 }, /* JSR */ -{ op_4eb0_0_comp_ff, 0x00000003, 20144 }, /* JSR */ -{ op_4eb8_0_comp_ff, 0x00000003, 20152 }, /* JSR */ -{ op_4eb9_0_comp_ff, 0x00000003, 20153 }, /* JSR */ -{ op_4eba_0_comp_ff, 0x00000003, 20154 }, /* JSR */ -{ op_4ebb_0_comp_ff, 0x00000003, 20155 }, /* JSR */ -{ op_4ed0_0_comp_ff, 0x00000001, 20176 }, /* JMP */ -{ op_4ee8_0_comp_ff, 0x00000003, 20200 }, /* JMP */ -{ op_4ef0_0_comp_ff, 0x00000003, 20208 }, /* JMP */ -{ op_4ef8_0_comp_ff, 0x00000003, 20216 }, /* JMP */ -{ op_4ef9_0_comp_ff, 0x00000003, 20217 }, /* JMP */ -{ op_4efa_0_comp_ff, 0x00000003, 20218 }, /* JMP */ -{ op_4efb_0_comp_ff, 0x00000003, 20219 }, /* JMP */ -{ op_5000_0_comp_ff, 0x00000000, 20480 }, /* ADD */ -{ op_5010_0_comp_ff, 0x00000000, 20496 }, /* ADD */ -{ op_5018_0_comp_ff, 0x00000000, 20504 }, /* ADD */ -{ op_5020_0_comp_ff, 0x00000000, 20512 }, /* ADD */ -{ op_5028_0_comp_ff, 0x00000002, 20520 }, /* ADD */ -{ op_5030_0_comp_ff, 0x00000002, 20528 }, /* ADD */ -{ op_5038_0_comp_ff, 0x00000002, 20536 }, /* ADD */ -{ op_5039_0_comp_ff, 0x00000002, 20537 }, /* ADD */ -{ op_5040_0_comp_ff, 0x00000000, 20544 }, /* ADD */ -{ op_5048_0_comp_ff, 0x00000000, 20552 }, /* ADDA */ -{ op_5050_0_comp_ff, 0x00000000, 20560 }, /* ADD */ -{ op_5058_0_comp_ff, 0x00000000, 20568 }, /* ADD */ -{ op_5060_0_comp_ff, 0x00000000, 20576 }, /* ADD */ -{ op_5068_0_comp_ff, 0x00000002, 20584 }, /* ADD */ -{ op_5070_0_comp_ff, 0x00000002, 20592 }, /* ADD */ -{ op_5078_0_comp_ff, 0x00000002, 20600 }, /* ADD */ -{ op_5079_0_comp_ff, 0x00000002, 20601 }, /* ADD */ -{ op_5080_0_comp_ff, 0x00000000, 20608 }, /* ADD */ -{ op_5088_0_comp_ff, 0x00000000, 20616 }, /* ADDA */ -{ op_5090_0_comp_ff, 0x00000000, 20624 }, /* ADD */ -{ op_5098_0_comp_ff, 0x00000000, 20632 }, /* ADD */ -{ op_50a0_0_comp_ff, 0x00000000, 20640 }, /* ADD */ -{ op_50a8_0_comp_ff, 0x00000002, 20648 }, /* ADD */ -{ op_50b0_0_comp_ff, 0x00000002, 20656 }, /* ADD */ -{ op_50b8_0_comp_ff, 0x00000002, 20664 }, /* ADD */ -{ op_50b9_0_comp_ff, 0x00000002, 20665 }, /* ADD */ -{ op_50c0_0_comp_ff, 0x00000000, 20672 }, /* Scc */ -{ op_50c8_0_comp_ff, 0x00000003, 20680 }, /* DBcc */ -{ op_50d0_0_comp_ff, 0x00000000, 20688 }, /* Scc */ -{ op_50d8_0_comp_ff, 0x00000000, 20696 }, /* Scc */ -{ op_50e0_0_comp_ff, 0x00000000, 20704 }, /* Scc */ -{ op_50e8_0_comp_ff, 0x00000002, 20712 }, /* Scc */ -{ op_50f0_0_comp_ff, 0x00000002, 20720 }, /* Scc */ -{ op_50f8_0_comp_ff, 0x00000002, 20728 }, /* Scc */ -{ op_50f9_0_comp_ff, 0x00000002, 20729 }, /* Scc */ -{ NULL, 0x00000001, 20730 }, /* TRAPcc */ -{ NULL, 0x00000001, 20731 }, /* TRAPcc */ -{ NULL, 0x00000001, 20732 }, /* TRAPcc */ -{ op_5100_0_comp_ff, 0x00000000, 20736 }, /* SUB */ -{ op_5110_0_comp_ff, 0x00000000, 20752 }, /* SUB */ -{ op_5118_0_comp_ff, 0x00000000, 20760 }, /* SUB */ -{ op_5120_0_comp_ff, 0x00000000, 20768 }, /* SUB */ -{ op_5128_0_comp_ff, 0x00000002, 20776 }, /* SUB */ -{ op_5130_0_comp_ff, 0x00000002, 20784 }, /* SUB */ -{ op_5138_0_comp_ff, 0x00000002, 20792 }, /* SUB */ -{ op_5139_0_comp_ff, 0x00000002, 20793 }, /* SUB */ -{ op_5140_0_comp_ff, 0x00000000, 20800 }, /* SUB */ -{ op_5148_0_comp_ff, 0x00000000, 20808 }, /* SUBA */ -{ op_5150_0_comp_ff, 0x00000000, 20816 }, /* SUB */ -{ op_5158_0_comp_ff, 0x00000000, 20824 }, /* SUB */ -{ op_5160_0_comp_ff, 0x00000000, 20832 }, /* SUB */ -{ op_5168_0_comp_ff, 0x00000002, 20840 }, /* SUB */ -{ op_5170_0_comp_ff, 0x00000002, 20848 }, /* SUB */ -{ op_5178_0_comp_ff, 0x00000002, 20856 }, /* SUB */ -{ op_5179_0_comp_ff, 0x00000002, 20857 }, /* SUB */ -{ op_5180_0_comp_ff, 0x00000000, 20864 }, /* SUB */ -{ op_5188_0_comp_ff, 0x00000000, 20872 }, /* SUBA */ -{ op_5190_0_comp_ff, 0x00000000, 20880 }, /* SUB */ -{ op_5198_0_comp_ff, 0x00000000, 20888 }, /* SUB */ -{ op_51a0_0_comp_ff, 0x00000000, 20896 }, /* SUB */ -{ op_51a8_0_comp_ff, 0x00000002, 20904 }, /* SUB */ -{ op_51b0_0_comp_ff, 0x00000002, 20912 }, /* SUB */ -{ op_51b8_0_comp_ff, 0x00000002, 20920 }, /* SUB */ -{ op_51b9_0_comp_ff, 0x00000002, 20921 }, /* SUB */ -{ op_51c0_0_comp_ff, 0x00000000, 20928 }, /* Scc */ -{ op_51c8_0_comp_ff, 0x00000003, 20936 }, /* DBcc */ -{ op_51d0_0_comp_ff, 0x00000000, 20944 }, /* Scc */ -{ op_51d8_0_comp_ff, 0x00000000, 20952 }, /* Scc */ -{ op_51e0_0_comp_ff, 0x00000000, 20960 }, /* Scc */ -{ op_51e8_0_comp_ff, 0x00000002, 20968 }, /* Scc */ -{ op_51f0_0_comp_ff, 0x00000002, 20976 }, /* Scc */ -{ op_51f8_0_comp_ff, 0x00000002, 20984 }, /* Scc */ -{ op_51f9_0_comp_ff, 0x00000002, 20985 }, /* Scc */ -{ NULL, 0x00000001, 20986 }, /* TRAPcc */ -{ NULL, 0x00000001, 20987 }, /* TRAPcc */ -{ NULL, 0x00000001, 20988 }, /* TRAPcc */ -{ op_52c0_0_comp_ff, 0x00000000, 21184 }, /* Scc */ -{ op_52c8_0_comp_ff, 0x00000003, 21192 }, /* DBcc */ -{ op_52d0_0_comp_ff, 0x00000000, 21200 }, /* Scc */ -{ op_52d8_0_comp_ff, 0x00000000, 21208 }, /* Scc */ -{ op_52e0_0_comp_ff, 0x00000000, 21216 }, /* Scc */ -{ op_52e8_0_comp_ff, 0x00000002, 21224 }, /* Scc */ -{ op_52f0_0_comp_ff, 0x00000002, 21232 }, /* Scc */ -{ op_52f8_0_comp_ff, 0x00000002, 21240 }, /* Scc */ -{ op_52f9_0_comp_ff, 0x00000002, 21241 }, /* Scc */ -{ NULL, 0x00000001, 21242 }, /* TRAPcc */ -{ NULL, 0x00000001, 21243 }, /* TRAPcc */ -{ NULL, 0x00000001, 21244 }, /* TRAPcc */ -{ op_53c0_0_comp_ff, 0x00000000, 21440 }, /* Scc */ -{ op_53c8_0_comp_ff, 0x00000003, 21448 }, /* DBcc */ -{ op_53d0_0_comp_ff, 0x00000000, 21456 }, /* Scc */ -{ op_53d8_0_comp_ff, 0x00000000, 21464 }, /* Scc */ -{ op_53e0_0_comp_ff, 0x00000000, 21472 }, /* Scc */ -{ op_53e8_0_comp_ff, 0x00000002, 21480 }, /* Scc */ -{ op_53f0_0_comp_ff, 0x00000002, 21488 }, /* Scc */ -{ op_53f8_0_comp_ff, 0x00000002, 21496 }, /* Scc */ -{ op_53f9_0_comp_ff, 0x00000002, 21497 }, /* Scc */ -{ NULL, 0x00000001, 21498 }, /* TRAPcc */ -{ NULL, 0x00000001, 21499 }, /* TRAPcc */ -{ NULL, 0x00000001, 21500 }, /* TRAPcc */ -{ op_54c0_0_comp_ff, 0x00000000, 21696 }, /* Scc */ -{ op_54c8_0_comp_ff, 0x00000003, 21704 }, /* DBcc */ -{ op_54d0_0_comp_ff, 0x00000000, 21712 }, /* Scc */ -{ op_54d8_0_comp_ff, 0x00000000, 21720 }, /* Scc */ -{ op_54e0_0_comp_ff, 0x00000000, 21728 }, /* Scc */ -{ op_54e8_0_comp_ff, 0x00000002, 21736 }, /* Scc */ -{ op_54f0_0_comp_ff, 0x00000002, 21744 }, /* Scc */ -{ op_54f8_0_comp_ff, 0x00000002, 21752 }, /* Scc */ -{ op_54f9_0_comp_ff, 0x00000002, 21753 }, /* Scc */ -{ NULL, 0x00000001, 21754 }, /* TRAPcc */ -{ NULL, 0x00000001, 21755 }, /* TRAPcc */ -{ NULL, 0x00000001, 21756 }, /* TRAPcc */ -{ op_55c0_0_comp_ff, 0x00000000, 21952 }, /* Scc */ -{ op_55c8_0_comp_ff, 0x00000003, 21960 }, /* DBcc */ -{ op_55d0_0_comp_ff, 0x00000000, 21968 }, /* Scc */ -{ op_55d8_0_comp_ff, 0x00000000, 21976 }, /* Scc */ -{ op_55e0_0_comp_ff, 0x00000000, 21984 }, /* Scc */ -{ op_55e8_0_comp_ff, 0x00000002, 21992 }, /* Scc */ -{ op_55f0_0_comp_ff, 0x00000002, 22000 }, /* Scc */ -{ op_55f8_0_comp_ff, 0x00000002, 22008 }, /* Scc */ -{ op_55f9_0_comp_ff, 0x00000002, 22009 }, /* Scc */ -{ NULL, 0x00000001, 22010 }, /* TRAPcc */ -{ NULL, 0x00000001, 22011 }, /* TRAPcc */ -{ NULL, 0x00000001, 22012 }, /* TRAPcc */ -{ op_56c0_0_comp_ff, 0x00000000, 22208 }, /* Scc */ -{ op_56c8_0_comp_ff, 0x00000003, 22216 }, /* DBcc */ -{ op_56d0_0_comp_ff, 0x00000000, 22224 }, /* Scc */ -{ op_56d8_0_comp_ff, 0x00000000, 22232 }, /* Scc */ -{ op_56e0_0_comp_ff, 0x00000000, 22240 }, /* Scc */ -{ op_56e8_0_comp_ff, 0x00000002, 22248 }, /* Scc */ -{ op_56f0_0_comp_ff, 0x00000002, 22256 }, /* Scc */ -{ op_56f8_0_comp_ff, 0x00000002, 22264 }, /* Scc */ -{ op_56f9_0_comp_ff, 0x00000002, 22265 }, /* Scc */ -{ NULL, 0x00000001, 22266 }, /* TRAPcc */ -{ NULL, 0x00000001, 22267 }, /* TRAPcc */ -{ NULL, 0x00000001, 22268 }, /* TRAPcc */ -{ op_57c0_0_comp_ff, 0x00000000, 22464 }, /* Scc */ -{ op_57c8_0_comp_ff, 0x00000003, 22472 }, /* DBcc */ -{ op_57d0_0_comp_ff, 0x00000000, 22480 }, /* Scc */ -{ op_57d8_0_comp_ff, 0x00000000, 22488 }, /* Scc */ -{ op_57e0_0_comp_ff, 0x00000000, 22496 }, /* Scc */ -{ op_57e8_0_comp_ff, 0x00000002, 22504 }, /* Scc */ -{ op_57f0_0_comp_ff, 0x00000002, 22512 }, /* Scc */ -{ op_57f8_0_comp_ff, 0x00000002, 22520 }, /* Scc */ -{ op_57f9_0_comp_ff, 0x00000002, 22521 }, /* Scc */ -{ NULL, 0x00000001, 22522 }, /* TRAPcc */ -{ NULL, 0x00000001, 22523 }, /* TRAPcc */ -{ NULL, 0x00000001, 22524 }, /* TRAPcc */ -{ op_58c0_0_comp_ff, 0x00000000, 22720 }, /* Scc */ -{ op_58c8_0_comp_ff, 0x00000003, 22728 }, /* DBcc */ -{ op_58d0_0_comp_ff, 0x00000000, 22736 }, /* Scc */ -{ op_58d8_0_comp_ff, 0x00000000, 22744 }, /* Scc */ -{ op_58e0_0_comp_ff, 0x00000000, 22752 }, /* Scc */ -{ op_58e8_0_comp_ff, 0x00000002, 22760 }, /* Scc */ -{ op_58f0_0_comp_ff, 0x00000002, 22768 }, /* Scc */ -{ op_58f8_0_comp_ff, 0x00000002, 22776 }, /* Scc */ -{ op_58f9_0_comp_ff, 0x00000002, 22777 }, /* Scc */ -{ NULL, 0x00000001, 22778 }, /* TRAPcc */ -{ NULL, 0x00000001, 22779 }, /* TRAPcc */ -{ NULL, 0x00000001, 22780 }, /* TRAPcc */ -{ op_59c0_0_comp_ff, 0x00000000, 22976 }, /* Scc */ -{ op_59c8_0_comp_ff, 0x00000003, 22984 }, /* DBcc */ -{ op_59d0_0_comp_ff, 0x00000000, 22992 }, /* Scc */ -{ op_59d8_0_comp_ff, 0x00000000, 23000 }, /* Scc */ -{ op_59e0_0_comp_ff, 0x00000000, 23008 }, /* Scc */ -{ op_59e8_0_comp_ff, 0x00000002, 23016 }, /* Scc */ -{ op_59f0_0_comp_ff, 0x00000002, 23024 }, /* Scc */ -{ op_59f8_0_comp_ff, 0x00000002, 23032 }, /* Scc */ -{ op_59f9_0_comp_ff, 0x00000002, 23033 }, /* Scc */ -{ NULL, 0x00000001, 23034 }, /* TRAPcc */ -{ NULL, 0x00000001, 23035 }, /* TRAPcc */ -{ NULL, 0x00000001, 23036 }, /* TRAPcc */ -{ op_5ac0_0_comp_ff, 0x00000000, 23232 }, /* Scc */ -{ op_5ac8_0_comp_ff, 0x00000003, 23240 }, /* DBcc */ -{ op_5ad0_0_comp_ff, 0x00000000, 23248 }, /* Scc */ -{ op_5ad8_0_comp_ff, 0x00000000, 23256 }, /* Scc */ -{ op_5ae0_0_comp_ff, 0x00000000, 23264 }, /* Scc */ -{ op_5ae8_0_comp_ff, 0x00000002, 23272 }, /* Scc */ -{ op_5af0_0_comp_ff, 0x00000002, 23280 }, /* Scc */ -{ op_5af8_0_comp_ff, 0x00000002, 23288 }, /* Scc */ -{ op_5af9_0_comp_ff, 0x00000002, 23289 }, /* Scc */ -{ NULL, 0x00000001, 23290 }, /* TRAPcc */ -{ NULL, 0x00000001, 23291 }, /* TRAPcc */ -{ NULL, 0x00000001, 23292 }, /* TRAPcc */ -{ op_5bc0_0_comp_ff, 0x00000000, 23488 }, /* Scc */ -{ op_5bc8_0_comp_ff, 0x00000003, 23496 }, /* DBcc */ -{ op_5bd0_0_comp_ff, 0x00000000, 23504 }, /* Scc */ -{ op_5bd8_0_comp_ff, 0x00000000, 23512 }, /* Scc */ -{ op_5be0_0_comp_ff, 0x00000000, 23520 }, /* Scc */ -{ op_5be8_0_comp_ff, 0x00000002, 23528 }, /* Scc */ -{ op_5bf0_0_comp_ff, 0x00000002, 23536 }, /* Scc */ -{ op_5bf8_0_comp_ff, 0x00000002, 23544 }, /* Scc */ -{ op_5bf9_0_comp_ff, 0x00000002, 23545 }, /* Scc */ -{ NULL, 0x00000001, 23546 }, /* TRAPcc */ -{ NULL, 0x00000001, 23547 }, /* TRAPcc */ -{ NULL, 0x00000001, 23548 }, /* TRAPcc */ -{ op_5cc0_0_comp_ff, 0x00000000, 23744 }, /* Scc */ -{ op_5cc8_0_comp_ff, 0x00000003, 23752 }, /* DBcc */ -{ op_5cd0_0_comp_ff, 0x00000000, 23760 }, /* Scc */ -{ op_5cd8_0_comp_ff, 0x00000000, 23768 }, /* Scc */ -{ op_5ce0_0_comp_ff, 0x00000000, 23776 }, /* Scc */ -{ op_5ce8_0_comp_ff, 0x00000002, 23784 }, /* Scc */ -{ op_5cf0_0_comp_ff, 0x00000002, 23792 }, /* Scc */ -{ op_5cf8_0_comp_ff, 0x00000002, 23800 }, /* Scc */ -{ op_5cf9_0_comp_ff, 0x00000002, 23801 }, /* Scc */ -{ NULL, 0x00000001, 23802 }, /* TRAPcc */ -{ NULL, 0x00000001, 23803 }, /* TRAPcc */ -{ NULL, 0x00000001, 23804 }, /* TRAPcc */ -{ op_5dc0_0_comp_ff, 0x00000000, 24000 }, /* Scc */ -{ op_5dc8_0_comp_ff, 0x00000003, 24008 }, /* DBcc */ -{ op_5dd0_0_comp_ff, 0x00000000, 24016 }, /* Scc */ -{ op_5dd8_0_comp_ff, 0x00000000, 24024 }, /* Scc */ -{ op_5de0_0_comp_ff, 0x00000000, 24032 }, /* Scc */ -{ op_5de8_0_comp_ff, 0x00000002, 24040 }, /* Scc */ -{ op_5df0_0_comp_ff, 0x00000002, 24048 }, /* Scc */ -{ op_5df8_0_comp_ff, 0x00000002, 24056 }, /* Scc */ -{ op_5df9_0_comp_ff, 0x00000002, 24057 }, /* Scc */ -{ NULL, 0x00000001, 24058 }, /* TRAPcc */ -{ NULL, 0x00000001, 24059 }, /* TRAPcc */ -{ NULL, 0x00000001, 24060 }, /* TRAPcc */ -{ op_5ec0_0_comp_ff, 0x00000000, 24256 }, /* Scc */ -{ op_5ec8_0_comp_ff, 0x00000003, 24264 }, /* DBcc */ -{ op_5ed0_0_comp_ff, 0x00000000, 24272 }, /* Scc */ -{ op_5ed8_0_comp_ff, 0x00000000, 24280 }, /* Scc */ -{ op_5ee0_0_comp_ff, 0x00000000, 24288 }, /* Scc */ -{ op_5ee8_0_comp_ff, 0x00000002, 24296 }, /* Scc */ -{ op_5ef0_0_comp_ff, 0x00000002, 24304 }, /* Scc */ -{ op_5ef8_0_comp_ff, 0x00000002, 24312 }, /* Scc */ -{ op_5ef9_0_comp_ff, 0x00000002, 24313 }, /* Scc */ -{ NULL, 0x00000001, 24314 }, /* TRAPcc */ -{ NULL, 0x00000001, 24315 }, /* TRAPcc */ -{ NULL, 0x00000001, 24316 }, /* TRAPcc */ -{ op_5fc0_0_comp_ff, 0x00000000, 24512 }, /* Scc */ -{ op_5fc8_0_comp_ff, 0x00000003, 24520 }, /* DBcc */ -{ op_5fd0_0_comp_ff, 0x00000000, 24528 }, /* Scc */ -{ op_5fd8_0_comp_ff, 0x00000000, 24536 }, /* Scc */ -{ op_5fe0_0_comp_ff, 0x00000000, 24544 }, /* Scc */ -{ op_5fe8_0_comp_ff, 0x00000002, 24552 }, /* Scc */ -{ op_5ff0_0_comp_ff, 0x00000002, 24560 }, /* Scc */ -{ op_5ff8_0_comp_ff, 0x00000002, 24568 }, /* Scc */ -{ op_5ff9_0_comp_ff, 0x00000002, 24569 }, /* Scc */ -{ NULL, 0x00000001, 24570 }, /* TRAPcc */ -{ NULL, 0x00000001, 24571 }, /* TRAPcc */ -{ NULL, 0x00000001, 24572 }, /* TRAPcc */ -{ op_6000_0_comp_ff, 0x00000012, 24576 }, /* Bcc */ -{ op_6001_0_comp_ff, 0x00000010, 24577 }, /* Bcc */ -{ op_60ff_0_comp_ff, 0x00000012, 24831 }, /* Bcc */ -{ op_6100_0_comp_ff, 0x00000012, 24832 }, /* BSR */ -{ op_6101_0_comp_ff, 0x00000010, 24833 }, /* BSR */ -{ op_61ff_0_comp_ff, 0x00000012, 25087 }, /* BSR */ -{ op_6200_0_comp_ff, 0x00000003, 25088 }, /* Bcc */ -{ op_6201_0_comp_ff, 0x00000001, 25089 }, /* Bcc */ -{ op_62ff_0_comp_ff, 0x00000003, 25343 }, /* Bcc */ -{ op_6300_0_comp_ff, 0x00000003, 25344 }, /* Bcc */ -{ op_6301_0_comp_ff, 0x00000001, 25345 }, /* Bcc */ -{ op_63ff_0_comp_ff, 0x00000003, 25599 }, /* Bcc */ -{ op_6400_0_comp_ff, 0x00000003, 25600 }, /* Bcc */ -{ op_6401_0_comp_ff, 0x00000001, 25601 }, /* Bcc */ -{ op_64ff_0_comp_ff, 0x00000003, 25855 }, /* Bcc */ -{ op_6500_0_comp_ff, 0x00000003, 25856 }, /* Bcc */ -{ op_6501_0_comp_ff, 0x00000001, 25857 }, /* Bcc */ -{ op_65ff_0_comp_ff, 0x00000003, 26111 }, /* Bcc */ -{ op_6600_0_comp_ff, 0x00000003, 26112 }, /* Bcc */ -{ op_6601_0_comp_ff, 0x00000001, 26113 }, /* Bcc */ -{ op_66ff_0_comp_ff, 0x00000003, 26367 }, /* Bcc */ -{ op_6700_0_comp_ff, 0x00000003, 26368 }, /* Bcc */ -{ op_6701_0_comp_ff, 0x00000001, 26369 }, /* Bcc */ -{ op_67ff_0_comp_ff, 0x00000003, 26623 }, /* Bcc */ -{ op_6800_0_comp_ff, 0x00000003, 26624 }, /* Bcc */ -{ op_6801_0_comp_ff, 0x00000001, 26625 }, /* Bcc */ -{ op_68ff_0_comp_ff, 0x00000003, 26879 }, /* Bcc */ -{ op_6900_0_comp_ff, 0x00000003, 26880 }, /* Bcc */ -{ op_6901_0_comp_ff, 0x00000001, 26881 }, /* Bcc */ -{ op_69ff_0_comp_ff, 0x00000003, 27135 }, /* Bcc */ -{ op_6a00_0_comp_ff, 0x00000003, 27136 }, /* Bcc */ -{ op_6a01_0_comp_ff, 0x00000001, 27137 }, /* Bcc */ -{ op_6aff_0_comp_ff, 0x00000003, 27391 }, /* Bcc */ -{ op_6b00_0_comp_ff, 0x00000003, 27392 }, /* Bcc */ -{ op_6b01_0_comp_ff, 0x00000001, 27393 }, /* Bcc */ -{ op_6bff_0_comp_ff, 0x00000003, 27647 }, /* Bcc */ -{ op_6c00_0_comp_ff, 0x00000003, 27648 }, /* Bcc */ -{ op_6c01_0_comp_ff, 0x00000001, 27649 }, /* Bcc */ -{ op_6cff_0_comp_ff, 0x00000003, 27903 }, /* Bcc */ -{ op_6d00_0_comp_ff, 0x00000003, 27904 }, /* Bcc */ -{ op_6d01_0_comp_ff, 0x00000001, 27905 }, /* Bcc */ -{ op_6dff_0_comp_ff, 0x00000003, 28159 }, /* Bcc */ -{ op_6e00_0_comp_ff, 0x00000003, 28160 }, /* Bcc */ -{ op_6e01_0_comp_ff, 0x00000001, 28161 }, /* Bcc */ -{ op_6eff_0_comp_ff, 0x00000003, 28415 }, /* Bcc */ -{ op_6f00_0_comp_ff, 0x00000003, 28416 }, /* Bcc */ -{ op_6f01_0_comp_ff, 0x00000001, 28417 }, /* Bcc */ -{ op_6fff_0_comp_ff, 0x00000003, 28671 }, /* Bcc */ -{ op_7000_0_comp_ff, 0x00000000, 28672 }, /* MOVE */ -{ op_8000_0_comp_ff, 0x00000000, 32768 }, /* OR */ -{ op_8010_0_comp_ff, 0x00000000, 32784 }, /* OR */ -{ op_8018_0_comp_ff, 0x00000000, 32792 }, /* OR */ -{ op_8020_0_comp_ff, 0x00000000, 32800 }, /* OR */ -{ op_8028_0_comp_ff, 0x00000002, 32808 }, /* OR */ -{ op_8030_0_comp_ff, 0x00000002, 32816 }, /* OR */ -{ op_8038_0_comp_ff, 0x00000002, 32824 }, /* OR */ -{ op_8039_0_comp_ff, 0x00000002, 32825 }, /* OR */ -{ op_803a_0_comp_ff, 0x00000002, 32826 }, /* OR */ -{ op_803b_0_comp_ff, 0x00000002, 32827 }, /* OR */ -{ op_803c_0_comp_ff, 0x00000002, 32828 }, /* OR */ -{ op_8040_0_comp_ff, 0x00000000, 32832 }, /* OR */ -{ op_8050_0_comp_ff, 0x00000000, 32848 }, /* OR */ -{ op_8058_0_comp_ff, 0x00000000, 32856 }, /* OR */ -{ op_8060_0_comp_ff, 0x00000000, 32864 }, /* OR */ -{ op_8068_0_comp_ff, 0x00000002, 32872 }, /* OR */ -{ op_8070_0_comp_ff, 0x00000002, 32880 }, /* OR */ -{ op_8078_0_comp_ff, 0x00000002, 32888 }, /* OR */ -{ op_8079_0_comp_ff, 0x00000002, 32889 }, /* OR */ -{ op_807a_0_comp_ff, 0x00000002, 32890 }, /* OR */ -{ op_807b_0_comp_ff, 0x00000002, 32891 }, /* OR */ -{ op_807c_0_comp_ff, 0x00000002, 32892 }, /* OR */ -{ op_8080_0_comp_ff, 0x00000000, 32896 }, /* OR */ -{ op_8090_0_comp_ff, 0x00000000, 32912 }, /* OR */ -{ op_8098_0_comp_ff, 0x00000000, 32920 }, /* OR */ -{ op_80a0_0_comp_ff, 0x00000000, 32928 }, /* OR */ -{ op_80a8_0_comp_ff, 0x00000002, 32936 }, /* OR */ -{ op_80b0_0_comp_ff, 0x00000002, 32944 }, /* OR */ -{ op_80b8_0_comp_ff, 0x00000002, 32952 }, /* OR */ -{ op_80b9_0_comp_ff, 0x00000002, 32953 }, /* OR */ -{ op_80ba_0_comp_ff, 0x00000002, 32954 }, /* OR */ -{ op_80bb_0_comp_ff, 0x00000002, 32955 }, /* OR */ -{ op_80bc_0_comp_ff, 0x00000002, 32956 }, /* OR */ -{ op_80c0_0_comp_ff, 0x00000000, 32960 }, /* DIVU */ -{ op_80d0_0_comp_ff, 0x00000000, 32976 }, /* DIVU */ -{ op_80d8_0_comp_ff, 0x00000000, 32984 }, /* DIVU */ -{ op_80e0_0_comp_ff, 0x00000000, 32992 }, /* DIVU */ -{ op_80e8_0_comp_ff, 0x00000002, 33000 }, /* DIVU */ -{ op_80f0_0_comp_ff, 0x00000002, 33008 }, /* DIVU */ -{ op_80f8_0_comp_ff, 0x00000002, 33016 }, /* DIVU */ -{ op_80f9_0_comp_ff, 0x00000002, 33017 }, /* DIVU */ -{ op_80fa_0_comp_ff, 0x00000002, 33018 }, /* DIVU */ -{ op_80fb_0_comp_ff, 0x00000002, 33019 }, /* DIVU */ -{ op_80fc_0_comp_ff, 0x00000002, 33020 }, /* DIVU */ -{ NULL, 0x00000000, 33024 }, /* SBCD */ -{ NULL, 0x00000000, 33032 }, /* SBCD */ -{ op_8110_0_comp_ff, 0x00000000, 33040 }, /* OR */ -{ op_8118_0_comp_ff, 0x00000000, 33048 }, /* OR */ -{ op_8120_0_comp_ff, 0x00000000, 33056 }, /* OR */ -{ op_8128_0_comp_ff, 0x00000002, 33064 }, /* OR */ -{ op_8130_0_comp_ff, 0x00000002, 33072 }, /* OR */ -{ op_8138_0_comp_ff, 0x00000002, 33080 }, /* OR */ -{ op_8139_0_comp_ff, 0x00000002, 33081 }, /* OR */ -{ NULL, 0x00000000, 33088 }, /* PACK */ -{ NULL, 0x00000000, 33096 }, /* PACK */ -{ op_8150_0_comp_ff, 0x00000000, 33104 }, /* OR */ -{ op_8158_0_comp_ff, 0x00000000, 33112 }, /* OR */ -{ op_8160_0_comp_ff, 0x00000000, 33120 }, /* OR */ -{ op_8168_0_comp_ff, 0x00000002, 33128 }, /* OR */ -{ op_8170_0_comp_ff, 0x00000002, 33136 }, /* OR */ -{ op_8178_0_comp_ff, 0x00000002, 33144 }, /* OR */ -{ op_8179_0_comp_ff, 0x00000002, 33145 }, /* OR */ -{ NULL, 0x00000000, 33152 }, /* UNPK */ -{ NULL, 0x00000000, 33160 }, /* UNPK */ -{ op_8190_0_comp_ff, 0x00000000, 33168 }, /* OR */ -{ op_8198_0_comp_ff, 0x00000000, 33176 }, /* OR */ -{ op_81a0_0_comp_ff, 0x00000000, 33184 }, /* OR */ -{ op_81a8_0_comp_ff, 0x00000002, 33192 }, /* OR */ -{ op_81b0_0_comp_ff, 0x00000002, 33200 }, /* OR */ -{ op_81b8_0_comp_ff, 0x00000002, 33208 }, /* OR */ -{ op_81b9_0_comp_ff, 0x00000002, 33209 }, /* OR */ -{ op_81c0_0_comp_ff, 0x00000000, 33216 }, /* DIVS */ -{ op_81d0_0_comp_ff, 0x00000000, 33232 }, /* DIVS */ -{ op_81d8_0_comp_ff, 0x00000000, 33240 }, /* DIVS */ -{ op_81e0_0_comp_ff, 0x00000000, 33248 }, /* DIVS */ -{ op_81e8_0_comp_ff, 0x00000002, 33256 }, /* DIVS */ -{ op_81f0_0_comp_ff, 0x00000002, 33264 }, /* DIVS */ -{ op_81f8_0_comp_ff, 0x00000002, 33272 }, /* DIVS */ -{ op_81f9_0_comp_ff, 0x00000002, 33273 }, /* DIVS */ -{ op_81fa_0_comp_ff, 0x00000002, 33274 }, /* DIVS */ -{ op_81fb_0_comp_ff, 0x00000002, 33275 }, /* DIVS */ -{ op_81fc_0_comp_ff, 0x00000002, 33276 }, /* DIVS */ -{ op_9000_0_comp_ff, 0x00000000, 36864 }, /* SUB */ -{ op_9010_0_comp_ff, 0x00000000, 36880 }, /* SUB */ -{ op_9018_0_comp_ff, 0x00000000, 36888 }, /* SUB */ -{ op_9020_0_comp_ff, 0x00000000, 36896 }, /* SUB */ -{ op_9028_0_comp_ff, 0x00000002, 36904 }, /* SUB */ -{ op_9030_0_comp_ff, 0x00000002, 36912 }, /* SUB */ -{ op_9038_0_comp_ff, 0x00000002, 36920 }, /* SUB */ -{ op_9039_0_comp_ff, 0x00000002, 36921 }, /* SUB */ -{ op_903a_0_comp_ff, 0x00000002, 36922 }, /* SUB */ -{ op_903b_0_comp_ff, 0x00000002, 36923 }, /* SUB */ -{ op_903c_0_comp_ff, 0x00000002, 36924 }, /* SUB */ -{ op_9040_0_comp_ff, 0x00000000, 36928 }, /* SUB */ -{ op_9048_0_comp_ff, 0x00000000, 36936 }, /* SUB */ -{ op_9050_0_comp_ff, 0x00000000, 36944 }, /* SUB */ -{ op_9058_0_comp_ff, 0x00000000, 36952 }, /* SUB */ -{ op_9060_0_comp_ff, 0x00000000, 36960 }, /* SUB */ -{ op_9068_0_comp_ff, 0x00000002, 36968 }, /* SUB */ -{ op_9070_0_comp_ff, 0x00000002, 36976 }, /* SUB */ -{ op_9078_0_comp_ff, 0x00000002, 36984 }, /* SUB */ -{ op_9079_0_comp_ff, 0x00000002, 36985 }, /* SUB */ -{ op_907a_0_comp_ff, 0x00000002, 36986 }, /* SUB */ -{ op_907b_0_comp_ff, 0x00000002, 36987 }, /* SUB */ -{ op_907c_0_comp_ff, 0x00000002, 36988 }, /* SUB */ -{ op_9080_0_comp_ff, 0x00000000, 36992 }, /* SUB */ -{ op_9088_0_comp_ff, 0x00000000, 37000 }, /* SUB */ -{ op_9090_0_comp_ff, 0x00000000, 37008 }, /* SUB */ -{ op_9098_0_comp_ff, 0x00000000, 37016 }, /* SUB */ -{ op_90a0_0_comp_ff, 0x00000000, 37024 }, /* SUB */ -{ op_90a8_0_comp_ff, 0x00000002, 37032 }, /* SUB */ -{ op_90b0_0_comp_ff, 0x00000002, 37040 }, /* SUB */ -{ op_90b8_0_comp_ff, 0x00000002, 37048 }, /* SUB */ -{ op_90b9_0_comp_ff, 0x00000002, 37049 }, /* SUB */ -{ op_90ba_0_comp_ff, 0x00000002, 37050 }, /* SUB */ -{ op_90bb_0_comp_ff, 0x00000002, 37051 }, /* SUB */ -{ op_90bc_0_comp_ff, 0x00000002, 37052 }, /* SUB */ -{ op_90c0_0_comp_ff, 0x00000000, 37056 }, /* SUBA */ -{ op_90c8_0_comp_ff, 0x00000000, 37064 }, /* SUBA */ -{ op_90d0_0_comp_ff, 0x00000000, 37072 }, /* SUBA */ -{ op_90d8_0_comp_ff, 0x00000000, 37080 }, /* SUBA */ -{ op_90e0_0_comp_ff, 0x00000000, 37088 }, /* SUBA */ -{ op_90e8_0_comp_ff, 0x00000002, 37096 }, /* SUBA */ -{ op_90f0_0_comp_ff, 0x00000002, 37104 }, /* SUBA */ -{ op_90f8_0_comp_ff, 0x00000002, 37112 }, /* SUBA */ -{ op_90f9_0_comp_ff, 0x00000002, 37113 }, /* SUBA */ -{ op_90fa_0_comp_ff, 0x00000002, 37114 }, /* SUBA */ -{ op_90fb_0_comp_ff, 0x00000002, 37115 }, /* SUBA */ -{ op_90fc_0_comp_ff, 0x00000002, 37116 }, /* SUBA */ -{ op_9100_0_comp_ff, 0x00000008, 37120 }, /* SUBX */ -{ op_9108_0_comp_ff, 0x00000008, 37128 }, /* SUBX */ -{ op_9110_0_comp_ff, 0x00000000, 37136 }, /* SUB */ -{ op_9118_0_comp_ff, 0x00000000, 37144 }, /* SUB */ -{ op_9120_0_comp_ff, 0x00000000, 37152 }, /* SUB */ -{ op_9128_0_comp_ff, 0x00000002, 37160 }, /* SUB */ -{ op_9130_0_comp_ff, 0x00000002, 37168 }, /* SUB */ -{ op_9138_0_comp_ff, 0x00000002, 37176 }, /* SUB */ -{ op_9139_0_comp_ff, 0x00000002, 37177 }, /* SUB */ -{ op_9140_0_comp_ff, 0x00000008, 37184 }, /* SUBX */ -{ op_9148_0_comp_ff, 0x00000008, 37192 }, /* SUBX */ -{ op_9150_0_comp_ff, 0x00000000, 37200 }, /* SUB */ -{ op_9158_0_comp_ff, 0x00000000, 37208 }, /* SUB */ -{ op_9160_0_comp_ff, 0x00000000, 37216 }, /* SUB */ -{ op_9168_0_comp_ff, 0x00000002, 37224 }, /* SUB */ -{ op_9170_0_comp_ff, 0x00000002, 37232 }, /* SUB */ -{ op_9178_0_comp_ff, 0x00000002, 37240 }, /* SUB */ -{ op_9179_0_comp_ff, 0x00000002, 37241 }, /* SUB */ -{ op_9180_0_comp_ff, 0x00000008, 37248 }, /* SUBX */ -{ op_9188_0_comp_ff, 0x00000008, 37256 }, /* SUBX */ -{ op_9190_0_comp_ff, 0x00000000, 37264 }, /* SUB */ -{ op_9198_0_comp_ff, 0x00000000, 37272 }, /* SUB */ -{ op_91a0_0_comp_ff, 0x00000000, 37280 }, /* SUB */ -{ op_91a8_0_comp_ff, 0x00000002, 37288 }, /* SUB */ -{ op_91b0_0_comp_ff, 0x00000002, 37296 }, /* SUB */ -{ op_91b8_0_comp_ff, 0x00000002, 37304 }, /* SUB */ -{ op_91b9_0_comp_ff, 0x00000002, 37305 }, /* SUB */ -{ op_91c0_0_comp_ff, 0x00000000, 37312 }, /* SUBA */ -{ op_91c8_0_comp_ff, 0x00000000, 37320 }, /* SUBA */ -{ op_91d0_0_comp_ff, 0x00000000, 37328 }, /* SUBA */ -{ op_91d8_0_comp_ff, 0x00000000, 37336 }, /* SUBA */ -{ op_91e0_0_comp_ff, 0x00000000, 37344 }, /* SUBA */ -{ op_91e8_0_comp_ff, 0x00000002, 37352 }, /* SUBA */ -{ op_91f0_0_comp_ff, 0x00000002, 37360 }, /* SUBA */ -{ op_91f8_0_comp_ff, 0x00000002, 37368 }, /* SUBA */ -{ op_91f9_0_comp_ff, 0x00000002, 37369 }, /* SUBA */ -{ op_91fa_0_comp_ff, 0x00000002, 37370 }, /* SUBA */ -{ op_91fb_0_comp_ff, 0x00000002, 37371 }, /* SUBA */ -{ op_91fc_0_comp_ff, 0x00000002, 37372 }, /* SUBA */ -{ op_b000_0_comp_ff, 0x00000000, 45056 }, /* CMP */ -{ op_b010_0_comp_ff, 0x00000000, 45072 }, /* CMP */ -{ op_b018_0_comp_ff, 0x00000000, 45080 }, /* CMP */ -{ op_b020_0_comp_ff, 0x00000000, 45088 }, /* CMP */ -{ op_b028_0_comp_ff, 0x00000002, 45096 }, /* CMP */ -{ op_b030_0_comp_ff, 0x00000002, 45104 }, /* CMP */ -{ op_b038_0_comp_ff, 0x00000002, 45112 }, /* CMP */ -{ op_b039_0_comp_ff, 0x00000002, 45113 }, /* CMP */ -{ op_b03a_0_comp_ff, 0x00000002, 45114 }, /* CMP */ -{ op_b03b_0_comp_ff, 0x00000002, 45115 }, /* CMP */ -{ op_b03c_0_comp_ff, 0x00000002, 45116 }, /* CMP */ -{ op_b040_0_comp_ff, 0x00000000, 45120 }, /* CMP */ -{ op_b048_0_comp_ff, 0x00000000, 45128 }, /* CMP */ -{ op_b050_0_comp_ff, 0x00000000, 45136 }, /* CMP */ -{ op_b058_0_comp_ff, 0x00000000, 45144 }, /* CMP */ -{ op_b060_0_comp_ff, 0x00000000, 45152 }, /* CMP */ -{ op_b068_0_comp_ff, 0x00000002, 45160 }, /* CMP */ -{ op_b070_0_comp_ff, 0x00000002, 45168 }, /* CMP */ -{ op_b078_0_comp_ff, 0x00000002, 45176 }, /* CMP */ -{ op_b079_0_comp_ff, 0x00000002, 45177 }, /* CMP */ -{ op_b07a_0_comp_ff, 0x00000002, 45178 }, /* CMP */ -{ op_b07b_0_comp_ff, 0x00000002, 45179 }, /* CMP */ -{ op_b07c_0_comp_ff, 0x00000002, 45180 }, /* CMP */ -{ op_b080_0_comp_ff, 0x00000000, 45184 }, /* CMP */ -{ op_b088_0_comp_ff, 0x00000000, 45192 }, /* CMP */ -{ op_b090_0_comp_ff, 0x00000000, 45200 }, /* CMP */ -{ op_b098_0_comp_ff, 0x00000000, 45208 }, /* CMP */ -{ op_b0a0_0_comp_ff, 0x00000000, 45216 }, /* CMP */ -{ op_b0a8_0_comp_ff, 0x00000002, 45224 }, /* CMP */ -{ op_b0b0_0_comp_ff, 0x00000002, 45232 }, /* CMP */ -{ op_b0b8_0_comp_ff, 0x00000002, 45240 }, /* CMP */ -{ op_b0b9_0_comp_ff, 0x00000002, 45241 }, /* CMP */ -{ op_b0ba_0_comp_ff, 0x00000002, 45242 }, /* CMP */ -{ op_b0bb_0_comp_ff, 0x00000002, 45243 }, /* CMP */ -{ op_b0bc_0_comp_ff, 0x00000002, 45244 }, /* CMP */ -{ op_b0c0_0_comp_ff, 0x00000000, 45248 }, /* CMPA */ -{ op_b0c8_0_comp_ff, 0x00000000, 45256 }, /* CMPA */ -{ op_b0d0_0_comp_ff, 0x00000000, 45264 }, /* CMPA */ -{ op_b0d8_0_comp_ff, 0x00000000, 45272 }, /* CMPA */ -{ op_b0e0_0_comp_ff, 0x00000000, 45280 }, /* CMPA */ -{ op_b0e8_0_comp_ff, 0x00000002, 45288 }, /* CMPA */ -{ op_b0f0_0_comp_ff, 0x00000002, 45296 }, /* CMPA */ -{ op_b0f8_0_comp_ff, 0x00000002, 45304 }, /* CMPA */ -{ op_b0f9_0_comp_ff, 0x00000002, 45305 }, /* CMPA */ -{ op_b0fa_0_comp_ff, 0x00000002, 45306 }, /* CMPA */ -{ op_b0fb_0_comp_ff, 0x00000002, 45307 }, /* CMPA */ -{ op_b0fc_0_comp_ff, 0x00000002, 45308 }, /* CMPA */ -{ op_b100_0_comp_ff, 0x00000000, 45312 }, /* EOR */ -{ op_b108_0_comp_ff, 0x00000000, 45320 }, /* CMPM */ -{ op_b110_0_comp_ff, 0x00000000, 45328 }, /* EOR */ -{ op_b118_0_comp_ff, 0x00000000, 45336 }, /* EOR */ -{ op_b120_0_comp_ff, 0x00000000, 45344 }, /* EOR */ -{ op_b128_0_comp_ff, 0x00000002, 45352 }, /* EOR */ -{ op_b130_0_comp_ff, 0x00000002, 45360 }, /* EOR */ -{ op_b138_0_comp_ff, 0x00000002, 45368 }, /* EOR */ -{ op_b139_0_comp_ff, 0x00000002, 45369 }, /* EOR */ -{ op_b140_0_comp_ff, 0x00000000, 45376 }, /* EOR */ -{ op_b148_0_comp_ff, 0x00000000, 45384 }, /* CMPM */ -{ op_b150_0_comp_ff, 0x00000000, 45392 }, /* EOR */ -{ op_b158_0_comp_ff, 0x00000000, 45400 }, /* EOR */ -{ op_b160_0_comp_ff, 0x00000000, 45408 }, /* EOR */ -{ op_b168_0_comp_ff, 0x00000002, 45416 }, /* EOR */ -{ op_b170_0_comp_ff, 0x00000002, 45424 }, /* EOR */ -{ op_b178_0_comp_ff, 0x00000002, 45432 }, /* EOR */ -{ op_b179_0_comp_ff, 0x00000002, 45433 }, /* EOR */ -{ op_b180_0_comp_ff, 0x00000000, 45440 }, /* EOR */ -{ op_b188_0_comp_ff, 0x00000000, 45448 }, /* CMPM */ -{ op_b190_0_comp_ff, 0x00000000, 45456 }, /* EOR */ -{ op_b198_0_comp_ff, 0x00000000, 45464 }, /* EOR */ -{ op_b1a0_0_comp_ff, 0x00000000, 45472 }, /* EOR */ -{ op_b1a8_0_comp_ff, 0x00000002, 45480 }, /* EOR */ -{ op_b1b0_0_comp_ff, 0x00000002, 45488 }, /* EOR */ -{ op_b1b8_0_comp_ff, 0x00000002, 45496 }, /* EOR */ -{ op_b1b9_0_comp_ff, 0x00000002, 45497 }, /* EOR */ -{ op_b1c0_0_comp_ff, 0x00000000, 45504 }, /* CMPA */ -{ op_b1c8_0_comp_ff, 0x00000000, 45512 }, /* CMPA */ -{ op_b1d0_0_comp_ff, 0x00000000, 45520 }, /* CMPA */ -{ op_b1d8_0_comp_ff, 0x00000000, 45528 }, /* CMPA */ -{ op_b1e0_0_comp_ff, 0x00000000, 45536 }, /* CMPA */ -{ op_b1e8_0_comp_ff, 0x00000002, 45544 }, /* CMPA */ -{ op_b1f0_0_comp_ff, 0x00000002, 45552 }, /* CMPA */ -{ op_b1f8_0_comp_ff, 0x00000002, 45560 }, /* CMPA */ -{ op_b1f9_0_comp_ff, 0x00000002, 45561 }, /* CMPA */ -{ op_b1fa_0_comp_ff, 0x00000002, 45562 }, /* CMPA */ -{ op_b1fb_0_comp_ff, 0x00000002, 45563 }, /* CMPA */ -{ op_b1fc_0_comp_ff, 0x00000002, 45564 }, /* CMPA */ -{ op_c000_0_comp_ff, 0x00000000, 49152 }, /* AND */ -{ op_c010_0_comp_ff, 0x00000000, 49168 }, /* AND */ -{ op_c018_0_comp_ff, 0x00000000, 49176 }, /* AND */ -{ op_c020_0_comp_ff, 0x00000000, 49184 }, /* AND */ -{ op_c028_0_comp_ff, 0x00000002, 49192 }, /* AND */ -{ op_c030_0_comp_ff, 0x00000002, 49200 }, /* AND */ -{ op_c038_0_comp_ff, 0x00000002, 49208 }, /* AND */ -{ op_c039_0_comp_ff, 0x00000002, 49209 }, /* AND */ -{ op_c03a_0_comp_ff, 0x00000002, 49210 }, /* AND */ -{ op_c03b_0_comp_ff, 0x00000002, 49211 }, /* AND */ -{ op_c03c_0_comp_ff, 0x00000002, 49212 }, /* AND */ -{ op_c040_0_comp_ff, 0x00000000, 49216 }, /* AND */ -{ op_c050_0_comp_ff, 0x00000000, 49232 }, /* AND */ -{ op_c058_0_comp_ff, 0x00000000, 49240 }, /* AND */ -{ op_c060_0_comp_ff, 0x00000000, 49248 }, /* AND */ -{ op_c068_0_comp_ff, 0x00000002, 49256 }, /* AND */ -{ op_c070_0_comp_ff, 0x00000002, 49264 }, /* AND */ -{ op_c078_0_comp_ff, 0x00000002, 49272 }, /* AND */ -{ op_c079_0_comp_ff, 0x00000002, 49273 }, /* AND */ -{ op_c07a_0_comp_ff, 0x00000002, 49274 }, /* AND */ -{ op_c07b_0_comp_ff, 0x00000002, 49275 }, /* AND */ -{ op_c07c_0_comp_ff, 0x00000002, 49276 }, /* AND */ -{ op_c080_0_comp_ff, 0x00000000, 49280 }, /* AND */ -{ op_c090_0_comp_ff, 0x00000000, 49296 }, /* AND */ -{ op_c098_0_comp_ff, 0x00000000, 49304 }, /* AND */ -{ op_c0a0_0_comp_ff, 0x00000000, 49312 }, /* AND */ -{ op_c0a8_0_comp_ff, 0x00000002, 49320 }, /* AND */ -{ op_c0b0_0_comp_ff, 0x00000002, 49328 }, /* AND */ -{ op_c0b8_0_comp_ff, 0x00000002, 49336 }, /* AND */ -{ op_c0b9_0_comp_ff, 0x00000002, 49337 }, /* AND */ -{ op_c0ba_0_comp_ff, 0x00000002, 49338 }, /* AND */ -{ op_c0bb_0_comp_ff, 0x00000002, 49339 }, /* AND */ -{ op_c0bc_0_comp_ff, 0x00000002, 49340 }, /* AND */ -{ op_c0c0_0_comp_ff, 0x00000000, 49344 }, /* MULU */ -{ op_c0d0_0_comp_ff, 0x00000000, 49360 }, /* MULU */ -{ op_c0d8_0_comp_ff, 0x00000000, 49368 }, /* MULU */ -{ op_c0e0_0_comp_ff, 0x00000000, 49376 }, /* MULU */ -{ op_c0e8_0_comp_ff, 0x00000002, 49384 }, /* MULU */ -{ op_c0f0_0_comp_ff, 0x00000002, 49392 }, /* MULU */ -{ op_c0f8_0_comp_ff, 0x00000002, 49400 }, /* MULU */ -{ op_c0f9_0_comp_ff, 0x00000002, 49401 }, /* MULU */ -{ op_c0fa_0_comp_ff, 0x00000002, 49402 }, /* MULU */ -{ op_c0fb_0_comp_ff, 0x00000002, 49403 }, /* MULU */ -{ op_c0fc_0_comp_ff, 0x00000002, 49404 }, /* MULU */ -{ NULL, 0x00000000, 49408 }, /* ABCD */ -{ NULL, 0x00000000, 49416 }, /* ABCD */ -{ op_c110_0_comp_ff, 0x00000000, 49424 }, /* AND */ -{ op_c118_0_comp_ff, 0x00000000, 49432 }, /* AND */ -{ op_c120_0_comp_ff, 0x00000000, 49440 }, /* AND */ -{ op_c128_0_comp_ff, 0x00000002, 49448 }, /* AND */ -{ op_c130_0_comp_ff, 0x00000002, 49456 }, /* AND */ -{ op_c138_0_comp_ff, 0x00000002, 49464 }, /* AND */ -{ op_c139_0_comp_ff, 0x00000002, 49465 }, /* AND */ -{ op_c140_0_comp_ff, 0x00000000, 49472 }, /* EXG */ -{ op_c148_0_comp_ff, 0x00000000, 49480 }, /* EXG */ -{ op_c150_0_comp_ff, 0x00000000, 49488 }, /* AND */ -{ op_c158_0_comp_ff, 0x00000000, 49496 }, /* AND */ -{ op_c160_0_comp_ff, 0x00000000, 49504 }, /* AND */ -{ op_c168_0_comp_ff, 0x00000002, 49512 }, /* AND */ -{ op_c170_0_comp_ff, 0x00000002, 49520 }, /* AND */ -{ op_c178_0_comp_ff, 0x00000002, 49528 }, /* AND */ -{ op_c179_0_comp_ff, 0x00000002, 49529 }, /* AND */ -{ op_c188_0_comp_ff, 0x00000000, 49544 }, /* EXG */ -{ op_c190_0_comp_ff, 0x00000000, 49552 }, /* AND */ -{ op_c198_0_comp_ff, 0x00000000, 49560 }, /* AND */ -{ op_c1a0_0_comp_ff, 0x00000000, 49568 }, /* AND */ -{ op_c1a8_0_comp_ff, 0x00000002, 49576 }, /* AND */ -{ op_c1b0_0_comp_ff, 0x00000002, 49584 }, /* AND */ -{ op_c1b8_0_comp_ff, 0x00000002, 49592 }, /* AND */ -{ op_c1b9_0_comp_ff, 0x00000002, 49593 }, /* AND */ -{ op_c1c0_0_comp_ff, 0x00000000, 49600 }, /* MULS */ -{ op_c1d0_0_comp_ff, 0x00000000, 49616 }, /* MULS */ -{ op_c1d8_0_comp_ff, 0x00000000, 49624 }, /* MULS */ -{ op_c1e0_0_comp_ff, 0x00000000, 49632 }, /* MULS */ -{ op_c1e8_0_comp_ff, 0x00000002, 49640 }, /* MULS */ -{ op_c1f0_0_comp_ff, 0x00000002, 49648 }, /* MULS */ -{ op_c1f8_0_comp_ff, 0x00000002, 49656 }, /* MULS */ -{ op_c1f9_0_comp_ff, 0x00000002, 49657 }, /* MULS */ -{ op_c1fa_0_comp_ff, 0x00000002, 49658 }, /* MULS */ -{ op_c1fb_0_comp_ff, 0x00000002, 49659 }, /* MULS */ -{ op_c1fc_0_comp_ff, 0x00000002, 49660 }, /* MULS */ -{ op_d000_0_comp_ff, 0x00000000, 53248 }, /* ADD */ -{ op_d010_0_comp_ff, 0x00000000, 53264 }, /* ADD */ -{ op_d018_0_comp_ff, 0x00000000, 53272 }, /* ADD */ -{ op_d020_0_comp_ff, 0x00000000, 53280 }, /* ADD */ -{ op_d028_0_comp_ff, 0x00000002, 53288 }, /* ADD */ -{ op_d030_0_comp_ff, 0x00000002, 53296 }, /* ADD */ -{ op_d038_0_comp_ff, 0x00000002, 53304 }, /* ADD */ -{ op_d039_0_comp_ff, 0x00000002, 53305 }, /* ADD */ -{ op_d03a_0_comp_ff, 0x00000002, 53306 }, /* ADD */ -{ op_d03b_0_comp_ff, 0x00000002, 53307 }, /* ADD */ -{ op_d03c_0_comp_ff, 0x00000002, 53308 }, /* ADD */ -{ op_d040_0_comp_ff, 0x00000000, 53312 }, /* ADD */ -{ op_d048_0_comp_ff, 0x00000000, 53320 }, /* ADD */ -{ op_d050_0_comp_ff, 0x00000000, 53328 }, /* ADD */ -{ op_d058_0_comp_ff, 0x00000000, 53336 }, /* ADD */ -{ op_d060_0_comp_ff, 0x00000000, 53344 }, /* ADD */ -{ op_d068_0_comp_ff, 0x00000002, 53352 }, /* ADD */ -{ op_d070_0_comp_ff, 0x00000002, 53360 }, /* ADD */ -{ op_d078_0_comp_ff, 0x00000002, 53368 }, /* ADD */ -{ op_d079_0_comp_ff, 0x00000002, 53369 }, /* ADD */ -{ op_d07a_0_comp_ff, 0x00000002, 53370 }, /* ADD */ -{ op_d07b_0_comp_ff, 0x00000002, 53371 }, /* ADD */ -{ op_d07c_0_comp_ff, 0x00000002, 53372 }, /* ADD */ -{ op_d080_0_comp_ff, 0x00000000, 53376 }, /* ADD */ -{ op_d088_0_comp_ff, 0x00000000, 53384 }, /* ADD */ -{ op_d090_0_comp_ff, 0x00000000, 53392 }, /* ADD */ -{ op_d098_0_comp_ff, 0x00000000, 53400 }, /* ADD */ -{ op_d0a0_0_comp_ff, 0x00000000, 53408 }, /* ADD */ -{ op_d0a8_0_comp_ff, 0x00000002, 53416 }, /* ADD */ -{ op_d0b0_0_comp_ff, 0x00000002, 53424 }, /* ADD */ -{ op_d0b8_0_comp_ff, 0x00000002, 53432 }, /* ADD */ -{ op_d0b9_0_comp_ff, 0x00000002, 53433 }, /* ADD */ -{ op_d0ba_0_comp_ff, 0x00000002, 53434 }, /* ADD */ -{ op_d0bb_0_comp_ff, 0x00000002, 53435 }, /* ADD */ -{ op_d0bc_0_comp_ff, 0x00000002, 53436 }, /* ADD */ -{ op_d0c0_0_comp_ff, 0x00000000, 53440 }, /* ADDA */ -{ op_d0c8_0_comp_ff, 0x00000000, 53448 }, /* ADDA */ -{ op_d0d0_0_comp_ff, 0x00000000, 53456 }, /* ADDA */ -{ op_d0d8_0_comp_ff, 0x00000000, 53464 }, /* ADDA */ -{ op_d0e0_0_comp_ff, 0x00000000, 53472 }, /* ADDA */ -{ op_d0e8_0_comp_ff, 0x00000002, 53480 }, /* ADDA */ -{ op_d0f0_0_comp_ff, 0x00000002, 53488 }, /* ADDA */ -{ op_d0f8_0_comp_ff, 0x00000002, 53496 }, /* ADDA */ -{ op_d0f9_0_comp_ff, 0x00000002, 53497 }, /* ADDA */ -{ op_d0fa_0_comp_ff, 0x00000002, 53498 }, /* ADDA */ -{ op_d0fb_0_comp_ff, 0x00000002, 53499 }, /* ADDA */ -{ op_d0fc_0_comp_ff, 0x00000002, 53500 }, /* ADDA */ -{ op_d100_0_comp_ff, 0x00000008, 53504 }, /* ADDX */ -{ op_d108_0_comp_ff, 0x00000008, 53512 }, /* ADDX */ -{ op_d110_0_comp_ff, 0x00000000, 53520 }, /* ADD */ -{ op_d118_0_comp_ff, 0x00000000, 53528 }, /* ADD */ -{ op_d120_0_comp_ff, 0x00000000, 53536 }, /* ADD */ -{ op_d128_0_comp_ff, 0x00000002, 53544 }, /* ADD */ -{ op_d130_0_comp_ff, 0x00000002, 53552 }, /* ADD */ -{ op_d138_0_comp_ff, 0x00000002, 53560 }, /* ADD */ -{ op_d139_0_comp_ff, 0x00000002, 53561 }, /* ADD */ -{ op_d140_0_comp_ff, 0x00000008, 53568 }, /* ADDX */ -{ op_d148_0_comp_ff, 0x00000008, 53576 }, /* ADDX */ -{ op_d150_0_comp_ff, 0x00000000, 53584 }, /* ADD */ -{ op_d158_0_comp_ff, 0x00000000, 53592 }, /* ADD */ -{ op_d160_0_comp_ff, 0x00000000, 53600 }, /* ADD */ -{ op_d168_0_comp_ff, 0x00000002, 53608 }, /* ADD */ -{ op_d170_0_comp_ff, 0x00000002, 53616 }, /* ADD */ -{ op_d178_0_comp_ff, 0x00000002, 53624 }, /* ADD */ -{ op_d179_0_comp_ff, 0x00000002, 53625 }, /* ADD */ -{ op_d180_0_comp_ff, 0x00000008, 53632 }, /* ADDX */ -{ op_d188_0_comp_ff, 0x00000008, 53640 }, /* ADDX */ -{ op_d190_0_comp_ff, 0x00000000, 53648 }, /* ADD */ -{ op_d198_0_comp_ff, 0x00000000, 53656 }, /* ADD */ -{ op_d1a0_0_comp_ff, 0x00000000, 53664 }, /* ADD */ -{ op_d1a8_0_comp_ff, 0x00000002, 53672 }, /* ADD */ -{ op_d1b0_0_comp_ff, 0x00000002, 53680 }, /* ADD */ -{ op_d1b8_0_comp_ff, 0x00000002, 53688 }, /* ADD */ -{ op_d1b9_0_comp_ff, 0x00000002, 53689 }, /* ADD */ -{ op_d1c0_0_comp_ff, 0x00000000, 53696 }, /* ADDA */ -{ op_d1c8_0_comp_ff, 0x00000000, 53704 }, /* ADDA */ -{ op_d1d0_0_comp_ff, 0x00000000, 53712 }, /* ADDA */ -{ op_d1d8_0_comp_ff, 0x00000000, 53720 }, /* ADDA */ -{ op_d1e0_0_comp_ff, 0x00000000, 53728 }, /* ADDA */ -{ op_d1e8_0_comp_ff, 0x00000002, 53736 }, /* ADDA */ -{ op_d1f0_0_comp_ff, 0x00000002, 53744 }, /* ADDA */ -{ op_d1f8_0_comp_ff, 0x00000002, 53752 }, /* ADDA */ -{ op_d1f9_0_comp_ff, 0x00000002, 53753 }, /* ADDA */ -{ op_d1fa_0_comp_ff, 0x00000002, 53754 }, /* ADDA */ -{ op_d1fb_0_comp_ff, 0x00000002, 53755 }, /* ADDA */ -{ op_d1fc_0_comp_ff, 0x00000002, 53756 }, /* ADDA */ -{ op_e000_0_comp_ff, 0x00000000, 57344 }, /* ASR */ -{ op_e008_0_comp_ff, 0x00000000, 57352 }, /* LSR */ -{ op_e010_0_comp_ff, 0x00000008, 57360 }, /* ROXR */ -{ op_e018_0_comp_ff, 0x00000000, 57368 }, /* ROR */ -{ op_e020_0_comp_ff, 0x00000000, 57376 }, /* ASR */ -{ op_e028_0_comp_ff, 0x00000000, 57384 }, /* LSR */ -{ op_e030_0_comp_ff, 0x00000008, 57392 }, /* ROXR */ -{ op_e038_0_comp_ff, 0x00000000, 57400 }, /* ROR */ -{ op_e040_0_comp_ff, 0x00000000, 57408 }, /* ASR */ -{ op_e048_0_comp_ff, 0x00000000, 57416 }, /* LSR */ -{ op_e050_0_comp_ff, 0x00000008, 57424 }, /* ROXR */ -{ op_e058_0_comp_ff, 0x00000000, 57432 }, /* ROR */ -{ op_e060_0_comp_ff, 0x00000000, 57440 }, /* ASR */ -{ op_e068_0_comp_ff, 0x00000000, 57448 }, /* LSR */ -{ op_e070_0_comp_ff, 0x00000008, 57456 }, /* ROXR */ -{ op_e078_0_comp_ff, 0x00000000, 57464 }, /* ROR */ -{ op_e080_0_comp_ff, 0x00000000, 57472 }, /* ASR */ -{ op_e088_0_comp_ff, 0x00000000, 57480 }, /* LSR */ -{ op_e090_0_comp_ff, 0x00000008, 57488 }, /* ROXR */ -{ op_e098_0_comp_ff, 0x00000000, 57496 }, /* ROR */ -{ op_e0a0_0_comp_ff, 0x00000000, 57504 }, /* ASR */ -{ op_e0a8_0_comp_ff, 0x00000000, 57512 }, /* LSR */ -{ op_e0b0_0_comp_ff, 0x00000008, 57520 }, /* ROXR */ -{ op_e0b8_0_comp_ff, 0x00000000, 57528 }, /* ROR */ -{ op_e0d0_0_comp_ff, 0x00000000, 57552 }, /* ASRW */ -{ op_e0d8_0_comp_ff, 0x00000000, 57560 }, /* ASRW */ -{ op_e0e0_0_comp_ff, 0x00000000, 57568 }, /* ASRW */ -{ op_e0e8_0_comp_ff, 0x00000002, 57576 }, /* ASRW */ -{ op_e0f0_0_comp_ff, 0x00000002, 57584 }, /* ASRW */ -{ op_e0f8_0_comp_ff, 0x00000002, 57592 }, /* ASRW */ -{ op_e0f9_0_comp_ff, 0x00000002, 57593 }, /* ASRW */ -{ op_e100_0_comp_ff, 0x00000000, 57600 }, /* ASL */ -{ op_e108_0_comp_ff, 0x00000000, 57608 }, /* LSL */ -{ op_e110_0_comp_ff, 0x00000008, 57616 }, /* ROXL */ -{ op_e118_0_comp_ff, 0x00000000, 57624 }, /* ROL */ -{ op_e120_0_comp_ff, 0x00000000, 57632 }, /* ASL */ -{ op_e128_0_comp_ff, 0x00000000, 57640 }, /* LSL */ -{ op_e130_0_comp_ff, 0x00000008, 57648 }, /* ROXL */ -{ op_e138_0_comp_ff, 0x00000000, 57656 }, /* ROL */ -{ op_e140_0_comp_ff, 0x00000000, 57664 }, /* ASL */ -{ op_e148_0_comp_ff, 0x00000000, 57672 }, /* LSL */ -{ op_e150_0_comp_ff, 0x00000008, 57680 }, /* ROXL */ -{ op_e158_0_comp_ff, 0x00000000, 57688 }, /* ROL */ -{ op_e160_0_comp_ff, 0x00000000, 57696 }, /* ASL */ -{ op_e168_0_comp_ff, 0x00000000, 57704 }, /* LSL */ -{ op_e170_0_comp_ff, 0x00000008, 57712 }, /* ROXL */ -{ op_e178_0_comp_ff, 0x00000000, 57720 }, /* ROL */ -{ op_e180_0_comp_ff, 0x00000000, 57728 }, /* ASL */ -{ op_e188_0_comp_ff, 0x00000000, 57736 }, /* LSL */ -{ op_e190_0_comp_ff, 0x00000008, 57744 }, /* ROXL */ -{ op_e198_0_comp_ff, 0x00000000, 57752 }, /* ROL */ -{ op_e1a0_0_comp_ff, 0x00000000, 57760 }, /* ASL */ -{ op_e1a8_0_comp_ff, 0x00000000, 57768 }, /* LSL */ -{ op_e1b0_0_comp_ff, 0x00000008, 57776 }, /* ROXL */ -{ op_e1b8_0_comp_ff, 0x00000000, 57784 }, /* ROL */ -{ op_e1d0_0_comp_ff, 0x00000000, 57808 }, /* ASLW */ -{ op_e1d8_0_comp_ff, 0x00000000, 57816 }, /* ASLW */ -{ op_e1e0_0_comp_ff, 0x00000000, 57824 }, /* ASLW */ -{ op_e1e8_0_comp_ff, 0x00000002, 57832 }, /* ASLW */ -{ op_e1f0_0_comp_ff, 0x00000002, 57840 }, /* ASLW */ -{ op_e1f8_0_comp_ff, 0x00000002, 57848 }, /* ASLW */ -{ op_e1f9_0_comp_ff, 0x00000002, 57849 }, /* ASLW */ -{ op_e2d0_0_comp_ff, 0x00000000, 58064 }, /* LSRW */ -{ op_e2d8_0_comp_ff, 0x00000000, 58072 }, /* LSRW */ -{ op_e2e0_0_comp_ff, 0x00000000, 58080 }, /* LSRW */ -{ op_e2e8_0_comp_ff, 0x00000002, 58088 }, /* LSRW */ -{ op_e2f0_0_comp_ff, 0x00000002, 58096 }, /* LSRW */ -{ op_e2f8_0_comp_ff, 0x00000002, 58104 }, /* LSRW */ -{ op_e2f9_0_comp_ff, 0x00000002, 58105 }, /* LSRW */ -{ op_e3d0_0_comp_ff, 0x00000000, 58320 }, /* LSLW */ -{ op_e3d8_0_comp_ff, 0x00000000, 58328 }, /* LSLW */ -{ op_e3e0_0_comp_ff, 0x00000000, 58336 }, /* LSLW */ -{ op_e3e8_0_comp_ff, 0x00000002, 58344 }, /* LSLW */ -{ op_e3f0_0_comp_ff, 0x00000002, 58352 }, /* LSLW */ -{ op_e3f8_0_comp_ff, 0x00000002, 58360 }, /* LSLW */ -{ op_e3f9_0_comp_ff, 0x00000002, 58361 }, /* LSLW */ -{ NULL, 0x00000008, 58576 }, /* ROXRW */ -{ NULL, 0x00000008, 58584 }, /* ROXRW */ -{ NULL, 0x00000008, 58592 }, /* ROXRW */ -{ NULL, 0x0000000a, 58600 }, /* ROXRW */ -{ NULL, 0x0000000a, 58608 }, /* ROXRW */ -{ NULL, 0x0000000a, 58616 }, /* ROXRW */ -{ NULL, 0x0000000a, 58617 }, /* ROXRW */ -{ NULL, 0x00000008, 58832 }, /* ROXLW */ -{ NULL, 0x00000008, 58840 }, /* ROXLW */ -{ NULL, 0x00000008, 58848 }, /* ROXLW */ -{ NULL, 0x0000000a, 58856 }, /* ROXLW */ -{ NULL, 0x0000000a, 58864 }, /* ROXLW */ -{ NULL, 0x0000000a, 58872 }, /* ROXLW */ -{ NULL, 0x0000000a, 58873 }, /* ROXLW */ -{ op_e6d0_0_comp_ff, 0x00000000, 59088 }, /* RORW */ -{ op_e6d8_0_comp_ff, 0x00000000, 59096 }, /* RORW */ -{ op_e6e0_0_comp_ff, 0x00000000, 59104 }, /* RORW */ -{ op_e6e8_0_comp_ff, 0x00000002, 59112 }, /* RORW */ -{ op_e6f0_0_comp_ff, 0x00000002, 59120 }, /* RORW */ -{ op_e6f8_0_comp_ff, 0x00000002, 59128 }, /* RORW */ -{ op_e6f9_0_comp_ff, 0x00000002, 59129 }, /* RORW */ -{ op_e7d0_0_comp_ff, 0x00000000, 59344 }, /* ROLW */ -{ op_e7d8_0_comp_ff, 0x00000000, 59352 }, /* ROLW */ -{ op_e7e0_0_comp_ff, 0x00000000, 59360 }, /* ROLW */ -{ op_e7e8_0_comp_ff, 0x00000002, 59368 }, /* ROLW */ -{ op_e7f0_0_comp_ff, 0x00000002, 59376 }, /* ROLW */ -{ op_e7f8_0_comp_ff, 0x00000002, 59384 }, /* ROLW */ -{ op_e7f9_0_comp_ff, 0x00000002, 59385 }, /* ROLW */ -{ NULL, 0x00000000, 59584 }, /* BFTST */ -{ NULL, 0x00000000, 59600 }, /* BFTST */ -{ NULL, 0x00000000, 59624 }, /* BFTST */ -{ NULL, 0x00000000, 59632 }, /* BFTST */ -{ NULL, 0x00000000, 59640 }, /* BFTST */ -{ NULL, 0x00000000, 59641 }, /* BFTST */ -{ NULL, 0x00000000, 59642 }, /* BFTST */ -{ NULL, 0x00000000, 59643 }, /* BFTST */ -{ NULL, 0x00000000, 59840 }, /* BFEXTU */ -{ NULL, 0x00000000, 59856 }, /* BFEXTU */ -{ NULL, 0x00000000, 59880 }, /* BFEXTU */ -{ NULL, 0x00000000, 59888 }, /* BFEXTU */ -{ NULL, 0x00000000, 59896 }, /* BFEXTU */ -{ NULL, 0x00000000, 59897 }, /* BFEXTU */ -{ NULL, 0x00000000, 59898 }, /* BFEXTU */ -{ NULL, 0x00000000, 59899 }, /* BFEXTU */ -{ NULL, 0x00000000, 60096 }, /* BFCHG */ -{ NULL, 0x00000000, 60112 }, /* BFCHG */ -{ NULL, 0x00000000, 60136 }, /* BFCHG */ -{ NULL, 0x00000000, 60144 }, /* BFCHG */ -{ NULL, 0x00000000, 60152 }, /* BFCHG */ -{ NULL, 0x00000000, 60153 }, /* BFCHG */ -{ NULL, 0x00000000, 60352 }, /* BFEXTS */ -{ NULL, 0x00000000, 60368 }, /* BFEXTS */ -{ NULL, 0x00000000, 60392 }, /* BFEXTS */ -{ NULL, 0x00000000, 60400 }, /* BFEXTS */ -{ NULL, 0x00000000, 60408 }, /* BFEXTS */ -{ NULL, 0x00000000, 60409 }, /* BFEXTS */ -{ NULL, 0x00000000, 60410 }, /* BFEXTS */ -{ NULL, 0x00000000, 60411 }, /* BFEXTS */ -{ NULL, 0x00000000, 60608 }, /* BFCLR */ -{ NULL, 0x00000000, 60624 }, /* BFCLR */ -{ NULL, 0x00000000, 60648 }, /* BFCLR */ -{ NULL, 0x00000000, 60656 }, /* BFCLR */ -{ NULL, 0x00000000, 60664 }, /* BFCLR */ -{ NULL, 0x00000000, 60665 }, /* BFCLR */ -{ NULL, 0x00000000, 60864 }, /* BFFFO */ -{ NULL, 0x00000000, 60880 }, /* BFFFO */ -{ NULL, 0x00000000, 60904 }, /* BFFFO */ -{ NULL, 0x00000000, 60912 }, /* BFFFO */ -{ NULL, 0x00000000, 60920 }, /* BFFFO */ -{ NULL, 0x00000000, 60921 }, /* BFFFO */ -{ NULL, 0x00000000, 60922 }, /* BFFFO */ -{ NULL, 0x00000000, 60923 }, /* BFFFO */ -{ NULL, 0x00000000, 61120 }, /* BFSET */ -{ NULL, 0x00000000, 61136 }, /* BFSET */ -{ NULL, 0x00000000, 61160 }, /* BFSET */ -{ NULL, 0x00000000, 61168 }, /* BFSET */ -{ NULL, 0x00000000, 61176 }, /* BFSET */ -{ NULL, 0x00000000, 61177 }, /* BFSET */ -{ op_efc0_0_comp_ff, 0x00000002, 61376 }, /* BFINS */ -{ op_efd0_0_comp_ff, 0x00000002, 61392 }, /* BFINS */ -{ op_efe8_0_comp_ff, 0x00000002, 61416 }, /* BFINS */ -{ op_eff0_0_comp_ff, 0x00000002, 61424 }, /* BFINS */ -{ op_eff8_0_comp_ff, 0x00000002, 61432 }, /* BFINS */ -{ op_eff9_0_comp_ff, 0x00000002, 61433 }, /* BFINS */ -{ NULL, 0x00000001, 61440 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61448 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61456 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61464 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61472 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61480 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61488 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61496 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61497 }, /* MMUOP030 */ -{ op_f200_0_comp_ff, 0x00000022, 61952 }, /* FPP */ -{ op_f208_0_comp_ff, 0x00000022, 61960 }, /* FPP */ -{ op_f210_0_comp_ff, 0x00000022, 61968 }, /* FPP */ -{ op_f218_0_comp_ff, 0x00000022, 61976 }, /* FPP */ -{ op_f220_0_comp_ff, 0x00000022, 61984 }, /* FPP */ -{ op_f228_0_comp_ff, 0x00000022, 61992 }, /* FPP */ -{ op_f230_0_comp_ff, 0x00000022, 62000 }, /* FPP */ -{ op_f238_0_comp_ff, 0x00000022, 62008 }, /* FPP */ -{ op_f239_0_comp_ff, 0x00000022, 62009 }, /* FPP */ -{ op_f23a_0_comp_ff, 0x00000022, 62010 }, /* FPP */ -{ op_f23b_0_comp_ff, 0x00000022, 62011 }, /* FPP */ -{ op_f23c_0_comp_ff, 0x00000022, 62012 }, /* FPP */ -{ op_f240_0_comp_ff, 0x00000006, 62016 }, /* FScc */ -{ NULL, 0x00000021, 62024 }, /* FDBcc */ -{ op_f250_0_comp_ff, 0x00000006, 62032 }, /* FScc */ -{ op_f258_0_comp_ff, 0x00000006, 62040 }, /* FScc */ -{ op_f260_0_comp_ff, 0x00000006, 62048 }, /* FScc */ -{ op_f268_0_comp_ff, 0x00000006, 62056 }, /* FScc */ -{ op_f270_0_comp_ff, 0x00000006, 62064 }, /* FScc */ -{ op_f278_0_comp_ff, 0x00000006, 62072 }, /* FScc */ -{ op_f279_0_comp_ff, 0x00000006, 62073 }, /* FScc */ -{ NULL, 0x00000021, 62074 }, /* FTRAPcc */ -{ NULL, 0x00000021, 62075 }, /* FTRAPcc */ -{ NULL, 0x00000021, 62076 }, /* FTRAPcc */ -{ op_f280_0_comp_ff, 0x00000005, 62080 }, /* FBcc */ -{ op_f2c0_0_comp_ff, 0x00000005, 62144 }, /* FBcc */ -{ NULL, 0x00000020, 62224 }, /* FSAVE */ -{ NULL, 0x00000020, 62240 }, /* FSAVE */ -{ NULL, 0x00000020, 62248 }, /* FSAVE */ -{ NULL, 0x00000020, 62256 }, /* FSAVE */ -{ NULL, 0x00000020, 62264 }, /* FSAVE */ -{ NULL, 0x00000020, 62265 }, /* FSAVE */ -{ NULL, 0x00000020, 62288 }, /* FRESTORE */ -{ NULL, 0x00000020, 62296 }, /* FRESTORE */ -{ NULL, 0x00000020, 62312 }, /* FRESTORE */ -{ NULL, 0x00000020, 62320 }, /* FRESTORE */ -{ NULL, 0x00000020, 62328 }, /* FRESTORE */ -{ NULL, 0x00000020, 62329 }, /* FRESTORE */ -{ NULL, 0x00000020, 62330 }, /* FRESTORE */ -{ NULL, 0x00000020, 62331 }, /* FRESTORE */ -{ NULL, 0x00000001, 62472 }, /* CINVL */ -{ NULL, 0x00000001, 62480 }, /* CINVP */ -{ NULL, 0x00000001, 62488 }, /* CINVA */ -{ NULL, 0x00000001, 62489 }, /* CINVA */ -{ NULL, 0x00000001, 62490 }, /* CINVA */ -{ NULL, 0x00000001, 62491 }, /* CINVA */ -{ NULL, 0x00000001, 62492 }, /* CINVA */ -{ NULL, 0x00000001, 62493 }, /* CINVA */ -{ NULL, 0x00000001, 62494 }, /* CINVA */ -{ NULL, 0x00000001, 62495 }, /* CINVA */ -{ NULL, 0x00000001, 62504 }, /* CPUSHL */ -{ NULL, 0x00000001, 62512 }, /* CPUSHP */ -{ NULL, 0x00000001, 62520 }, /* CPUSHA */ -{ NULL, 0x00000001, 62521 }, /* CPUSHA */ -{ NULL, 0x00000001, 62522 }, /* CPUSHA */ -{ NULL, 0x00000001, 62523 }, /* CPUSHA */ -{ NULL, 0x00000001, 62524 }, /* CPUSHA */ -{ NULL, 0x00000001, 62525 }, /* CPUSHA */ -{ NULL, 0x00000001, 62526 }, /* CPUSHA */ -{ NULL, 0x00000001, 62527 }, /* CPUSHA */ -{ NULL, 0x00000001, 62720 }, /* PFLUSHN */ -{ NULL, 0x00000001, 62728 }, /* PFLUSH */ -{ NULL, 0x00000001, 62736 }, /* PFLUSHAN */ -{ NULL, 0x00000001, 62744 }, /* PFLUSHA */ -{ NULL, 0x00000001, 62792 }, /* PTESTW */ -{ NULL, 0x00000001, 62824 }, /* PTESTR */ -{ op_f600_0_comp_ff, 0x00000002, 62976 }, /* MOVE16 */ -{ op_f608_0_comp_ff, 0x00000002, 62984 }, /* MOVE16 */ -{ op_f610_0_comp_ff, 0x00000002, 62992 }, /* MOVE16 */ -{ op_f618_0_comp_ff, 0x00000002, 63000 }, /* MOVE16 */ -{ op_f620_0_comp_ff, 0x00000002, 63008 }, /* MOVE16 */ -{ 0, 0,65536 }}; -extern const struct comptbl op_smalltbl_0_comp_nf[] = { -{ op_0_0_comp_nf, 0x00000002, 0 }, /* OR */ -{ op_10_0_comp_nf, 0x00000002, 16 }, /* OR */ -{ op_18_0_comp_nf, 0x00000002, 24 }, /* OR */ -{ op_20_0_comp_nf, 0x00000002, 32 }, /* OR */ -{ op_28_0_comp_nf, 0x00000002, 40 }, /* OR */ -{ op_30_0_comp_nf, 0x00000002, 48 }, /* OR */ -{ op_38_0_comp_nf, 0x00000002, 56 }, /* OR */ -{ op_39_0_comp_nf, 0x00000002, 57 }, /* OR */ -{ op_3c_0_comp_nf, 0x00000002, 60 }, /* ORSR */ -{ op_40_0_comp_nf, 0x00000002, 64 }, /* OR */ -{ op_50_0_comp_nf, 0x00000002, 80 }, /* OR */ -{ op_58_0_comp_nf, 0x00000002, 88 }, /* OR */ -{ op_60_0_comp_nf, 0x00000002, 96 }, /* OR */ -{ op_68_0_comp_nf, 0x00000002, 104 }, /* OR */ -{ op_70_0_comp_nf, 0x00000002, 112 }, /* OR */ -{ op_78_0_comp_nf, 0x00000002, 120 }, /* OR */ -{ op_79_0_comp_nf, 0x00000002, 121 }, /* OR */ -{ NULL, 0x00000002, 124 }, /* ORSR */ -{ op_80_0_comp_nf, 0x00000002, 128 }, /* OR */ -{ op_90_0_comp_nf, 0x00000002, 144 }, /* OR */ -{ op_98_0_comp_nf, 0x00000002, 152 }, /* OR */ -{ op_a0_0_comp_nf, 0x00000002, 160 }, /* OR */ -{ op_a8_0_comp_nf, 0x00000002, 168 }, /* OR */ -{ op_b0_0_comp_nf, 0x00000002, 176 }, /* OR */ -{ op_b8_0_comp_nf, 0x00000002, 184 }, /* OR */ -{ op_b9_0_comp_nf, 0x00000002, 185 }, /* OR */ -{ NULL, 0x00000001, 208 }, /* CHK2 */ -{ NULL, 0x00000001, 232 }, /* CHK2 */ -{ NULL, 0x00000001, 240 }, /* CHK2 */ -{ NULL, 0x00000001, 248 }, /* CHK2 */ -{ NULL, 0x00000001, 249 }, /* CHK2 */ -{ NULL, 0x00000001, 250 }, /* CHK2 */ -{ NULL, 0x00000001, 251 }, /* CHK2 */ -{ op_100_0_comp_nf, 0x00000000, 256 }, /* BTST */ -{ NULL, 0x00000001, 264 }, /* MVPMR */ -{ op_110_0_comp_nf, 0x00000000, 272 }, /* BTST */ -{ op_118_0_comp_nf, 0x00000000, 280 }, /* BTST */ -{ op_120_0_comp_nf, 0x00000000, 288 }, /* BTST */ -{ op_128_0_comp_nf, 0x00000002, 296 }, /* BTST */ -{ op_130_0_comp_nf, 0x00000002, 304 }, /* BTST */ -{ op_138_0_comp_nf, 0x00000002, 312 }, /* BTST */ -{ op_139_0_comp_nf, 0x00000002, 313 }, /* BTST */ -{ op_13a_0_comp_nf, 0x00000002, 314 }, /* BTST */ -{ op_13b_0_comp_nf, 0x00000002, 315 }, /* BTST */ -{ op_13c_0_comp_nf, 0x00000002, 316 }, /* BTST */ -{ op_140_0_comp_nf, 0x00000000, 320 }, /* BCHG */ -{ NULL, 0x00000001, 328 }, /* MVPMR */ -{ op_150_0_comp_nf, 0x00000000, 336 }, /* BCHG */ -{ op_158_0_comp_nf, 0x00000000, 344 }, /* BCHG */ -{ op_160_0_comp_nf, 0x00000000, 352 }, /* BCHG */ -{ op_168_0_comp_nf, 0x00000002, 360 }, /* BCHG */ -{ op_170_0_comp_nf, 0x00000002, 368 }, /* BCHG */ -{ op_178_0_comp_nf, 0x00000002, 376 }, /* BCHG */ -{ op_179_0_comp_nf, 0x00000002, 377 }, /* BCHG */ -{ op_180_0_comp_nf, 0x00000000, 384 }, /* BCLR */ -{ NULL, 0x00000001, 392 }, /* MVPRM */ -{ op_190_0_comp_nf, 0x00000000, 400 }, /* BCLR */ -{ op_198_0_comp_nf, 0x00000000, 408 }, /* BCLR */ -{ op_1a0_0_comp_nf, 0x00000000, 416 }, /* BCLR */ -{ op_1a8_0_comp_nf, 0x00000002, 424 }, /* BCLR */ -{ op_1b0_0_comp_nf, 0x00000002, 432 }, /* BCLR */ -{ op_1b8_0_comp_nf, 0x00000002, 440 }, /* BCLR */ -{ op_1b9_0_comp_nf, 0x00000002, 441 }, /* BCLR */ -{ op_1c0_0_comp_nf, 0x00000000, 448 }, /* BSET */ -{ NULL, 0x00000001, 456 }, /* MVPRM */ -{ op_1d0_0_comp_nf, 0x00000000, 464 }, /* BSET */ -{ op_1d8_0_comp_nf, 0x00000000, 472 }, /* BSET */ -{ op_1e0_0_comp_nf, 0x00000000, 480 }, /* BSET */ -{ op_1e8_0_comp_nf, 0x00000002, 488 }, /* BSET */ -{ op_1f0_0_comp_nf, 0x00000002, 496 }, /* BSET */ -{ op_1f8_0_comp_nf, 0x00000002, 504 }, /* BSET */ -{ op_1f9_0_comp_nf, 0x00000002, 505 }, /* BSET */ -{ op_200_0_comp_nf, 0x00000002, 512 }, /* AND */ -{ op_210_0_comp_nf, 0x00000002, 528 }, /* AND */ -{ op_218_0_comp_nf, 0x00000002, 536 }, /* AND */ -{ op_220_0_comp_nf, 0x00000002, 544 }, /* AND */ -{ op_228_0_comp_nf, 0x00000002, 552 }, /* AND */ -{ op_230_0_comp_nf, 0x00000002, 560 }, /* AND */ -{ op_238_0_comp_nf, 0x00000002, 568 }, /* AND */ -{ op_239_0_comp_nf, 0x00000002, 569 }, /* AND */ -{ op_23c_0_comp_nf, 0x00000002, 572 }, /* ANDSR */ -{ op_240_0_comp_nf, 0x00000002, 576 }, /* AND */ -{ op_250_0_comp_nf, 0x00000002, 592 }, /* AND */ -{ op_258_0_comp_nf, 0x00000002, 600 }, /* AND */ -{ op_260_0_comp_nf, 0x00000002, 608 }, /* AND */ -{ op_268_0_comp_nf, 0x00000002, 616 }, /* AND */ -{ op_270_0_comp_nf, 0x00000002, 624 }, /* AND */ -{ op_278_0_comp_nf, 0x00000002, 632 }, /* AND */ -{ op_279_0_comp_nf, 0x00000002, 633 }, /* AND */ -{ NULL, 0x00000002, 636 }, /* ANDSR */ -{ op_280_0_comp_nf, 0x00000002, 640 }, /* AND */ -{ op_290_0_comp_nf, 0x00000002, 656 }, /* AND */ -{ op_298_0_comp_nf, 0x00000002, 664 }, /* AND */ -{ op_2a0_0_comp_nf, 0x00000002, 672 }, /* AND */ -{ op_2a8_0_comp_nf, 0x00000002, 680 }, /* AND */ -{ op_2b0_0_comp_nf, 0x00000002, 688 }, /* AND */ -{ op_2b8_0_comp_nf, 0x00000002, 696 }, /* AND */ -{ op_2b9_0_comp_nf, 0x00000002, 697 }, /* AND */ -{ NULL, 0x00000001, 720 }, /* CHK2 */ -{ NULL, 0x00000001, 744 }, /* CHK2 */ -{ NULL, 0x00000001, 752 }, /* CHK2 */ -{ NULL, 0x00000001, 760 }, /* CHK2 */ -{ NULL, 0x00000001, 761 }, /* CHK2 */ -{ NULL, 0x00000001, 762 }, /* CHK2 */ -{ NULL, 0x00000001, 763 }, /* CHK2 */ -{ op_400_0_comp_nf, 0x00000002, 1024 }, /* SUB */ -{ op_410_0_comp_nf, 0x00000002, 1040 }, /* SUB */ -{ op_418_0_comp_nf, 0x00000002, 1048 }, /* SUB */ -{ op_420_0_comp_nf, 0x00000002, 1056 }, /* SUB */ -{ op_428_0_comp_nf, 0x00000002, 1064 }, /* SUB */ -{ op_430_0_comp_nf, 0x00000002, 1072 }, /* SUB */ -{ op_438_0_comp_nf, 0x00000002, 1080 }, /* SUB */ -{ op_439_0_comp_nf, 0x00000002, 1081 }, /* SUB */ -{ op_440_0_comp_nf, 0x00000002, 1088 }, /* SUB */ -{ op_450_0_comp_nf, 0x00000002, 1104 }, /* SUB */ -{ op_458_0_comp_nf, 0x00000002, 1112 }, /* SUB */ -{ op_460_0_comp_nf, 0x00000002, 1120 }, /* SUB */ -{ op_468_0_comp_nf, 0x00000002, 1128 }, /* SUB */ -{ op_470_0_comp_nf, 0x00000002, 1136 }, /* SUB */ -{ op_478_0_comp_nf, 0x00000002, 1144 }, /* SUB */ -{ op_479_0_comp_nf, 0x00000002, 1145 }, /* SUB */ -{ op_480_0_comp_nf, 0x00000002, 1152 }, /* SUB */ -{ op_490_0_comp_nf, 0x00000002, 1168 }, /* SUB */ -{ op_498_0_comp_nf, 0x00000002, 1176 }, /* SUB */ -{ op_4a0_0_comp_nf, 0x00000002, 1184 }, /* SUB */ -{ op_4a8_0_comp_nf, 0x00000002, 1192 }, /* SUB */ -{ op_4b0_0_comp_nf, 0x00000002, 1200 }, /* SUB */ -{ op_4b8_0_comp_nf, 0x00000002, 1208 }, /* SUB */ -{ op_4b9_0_comp_nf, 0x00000002, 1209 }, /* SUB */ -{ NULL, 0x00000001, 1232 }, /* CHK2 */ -{ NULL, 0x00000001, 1256 }, /* CHK2 */ -{ NULL, 0x00000001, 1264 }, /* CHK2 */ -{ NULL, 0x00000001, 1272 }, /* CHK2 */ -{ NULL, 0x00000001, 1273 }, /* CHK2 */ -{ NULL, 0x00000001, 1274 }, /* CHK2 */ -{ NULL, 0x00000001, 1275 }, /* CHK2 */ -{ op_600_0_comp_nf, 0x00000002, 1536 }, /* ADD */ -{ op_610_0_comp_nf, 0x00000002, 1552 }, /* ADD */ -{ op_618_0_comp_nf, 0x00000002, 1560 }, /* ADD */ -{ op_620_0_comp_nf, 0x00000002, 1568 }, /* ADD */ -{ op_628_0_comp_nf, 0x00000002, 1576 }, /* ADD */ -{ op_630_0_comp_nf, 0x00000002, 1584 }, /* ADD */ -{ op_638_0_comp_nf, 0x00000002, 1592 }, /* ADD */ -{ op_639_0_comp_nf, 0x00000002, 1593 }, /* ADD */ -{ op_640_0_comp_nf, 0x00000002, 1600 }, /* ADD */ -{ op_650_0_comp_nf, 0x00000002, 1616 }, /* ADD */ -{ op_658_0_comp_nf, 0x00000002, 1624 }, /* ADD */ -{ op_660_0_comp_nf, 0x00000002, 1632 }, /* ADD */ -{ op_668_0_comp_nf, 0x00000002, 1640 }, /* ADD */ -{ op_670_0_comp_nf, 0x00000002, 1648 }, /* ADD */ -{ op_678_0_comp_nf, 0x00000002, 1656 }, /* ADD */ -{ op_679_0_comp_nf, 0x00000002, 1657 }, /* ADD */ -{ op_680_0_comp_nf, 0x00000002, 1664 }, /* ADD */ -{ op_690_0_comp_nf, 0x00000002, 1680 }, /* ADD */ -{ op_698_0_comp_nf, 0x00000002, 1688 }, /* ADD */ -{ op_6a0_0_comp_nf, 0x00000002, 1696 }, /* ADD */ -{ op_6a8_0_comp_nf, 0x00000002, 1704 }, /* ADD */ -{ op_6b0_0_comp_nf, 0x00000002, 1712 }, /* ADD */ -{ op_6b8_0_comp_nf, 0x00000002, 1720 }, /* ADD */ -{ op_6b9_0_comp_nf, 0x00000002, 1721 }, /* ADD */ -{ NULL, 0x00000001, 1728 }, /* RTM */ -{ NULL, 0x00000001, 1736 }, /* RTM */ -{ NULL, 0x00000001, 1744 }, /* CALLM */ -{ NULL, 0x00000001, 1768 }, /* CALLM */ -{ NULL, 0x00000001, 1776 }, /* CALLM */ -{ NULL, 0x00000001, 1784 }, /* CALLM */ -{ NULL, 0x00000001, 1785 }, /* CALLM */ -{ NULL, 0x00000001, 1786 }, /* CALLM */ -{ NULL, 0x00000001, 1787 }, /* CALLM */ -{ op_800_0_comp_nf, 0x00000002, 2048 }, /* BTST */ -{ op_810_0_comp_nf, 0x00000002, 2064 }, /* BTST */ -{ op_818_0_comp_nf, 0x00000002, 2072 }, /* BTST */ -{ op_820_0_comp_nf, 0x00000002, 2080 }, /* BTST */ -{ op_828_0_comp_nf, 0x00000002, 2088 }, /* BTST */ -{ op_830_0_comp_nf, 0x00000002, 2096 }, /* BTST */ -{ op_838_0_comp_nf, 0x00000002, 2104 }, /* BTST */ -{ op_839_0_comp_nf, 0x00000002, 2105 }, /* BTST */ -{ op_83a_0_comp_nf, 0x00000002, 2106 }, /* BTST */ -{ op_83b_0_comp_nf, 0x00000002, 2107 }, /* BTST */ -{ op_840_0_comp_nf, 0x00000002, 2112 }, /* BCHG */ -{ op_850_0_comp_nf, 0x00000002, 2128 }, /* BCHG */ -{ op_858_0_comp_nf, 0x00000002, 2136 }, /* BCHG */ -{ op_860_0_comp_nf, 0x00000002, 2144 }, /* BCHG */ -{ op_868_0_comp_nf, 0x00000002, 2152 }, /* BCHG */ -{ op_870_0_comp_nf, 0x00000002, 2160 }, /* BCHG */ -{ op_878_0_comp_nf, 0x00000002, 2168 }, /* BCHG */ -{ op_879_0_comp_nf, 0x00000002, 2169 }, /* BCHG */ -{ op_880_0_comp_nf, 0x00000002, 2176 }, /* BCLR */ -{ op_890_0_comp_nf, 0x00000002, 2192 }, /* BCLR */ -{ op_898_0_comp_nf, 0x00000002, 2200 }, /* BCLR */ -{ op_8a0_0_comp_nf, 0x00000002, 2208 }, /* BCLR */ -{ op_8a8_0_comp_nf, 0x00000002, 2216 }, /* BCLR */ -{ op_8b0_0_comp_nf, 0x00000002, 2224 }, /* BCLR */ -{ op_8b8_0_comp_nf, 0x00000002, 2232 }, /* BCLR */ -{ op_8b9_0_comp_nf, 0x00000002, 2233 }, /* BCLR */ -{ op_8c0_0_comp_nf, 0x00000002, 2240 }, /* BSET */ -{ op_8d0_0_comp_nf, 0x00000002, 2256 }, /* BSET */ -{ op_8d8_0_comp_nf, 0x00000002, 2264 }, /* BSET */ -{ op_8e0_0_comp_nf, 0x00000002, 2272 }, /* BSET */ -{ op_8e8_0_comp_nf, 0x00000002, 2280 }, /* BSET */ -{ op_8f0_0_comp_nf, 0x00000002, 2288 }, /* BSET */ -{ op_8f8_0_comp_nf, 0x00000002, 2296 }, /* BSET */ -{ op_8f9_0_comp_nf, 0x00000002, 2297 }, /* BSET */ -{ op_a00_0_comp_nf, 0x00000002, 2560 }, /* EOR */ -{ op_a10_0_comp_nf, 0x00000002, 2576 }, /* EOR */ -{ op_a18_0_comp_nf, 0x00000002, 2584 }, /* EOR */ -{ op_a20_0_comp_nf, 0x00000002, 2592 }, /* EOR */ -{ op_a28_0_comp_nf, 0x00000002, 2600 }, /* EOR */ -{ op_a30_0_comp_nf, 0x00000002, 2608 }, /* EOR */ -{ op_a38_0_comp_nf, 0x00000002, 2616 }, /* EOR */ -{ op_a39_0_comp_nf, 0x00000002, 2617 }, /* EOR */ -{ op_a3c_0_comp_nf, 0x00000002, 2620 }, /* EORSR */ -{ op_a40_0_comp_nf, 0x00000002, 2624 }, /* EOR */ -{ op_a50_0_comp_nf, 0x00000002, 2640 }, /* EOR */ -{ op_a58_0_comp_nf, 0x00000002, 2648 }, /* EOR */ -{ op_a60_0_comp_nf, 0x00000002, 2656 }, /* EOR */ -{ op_a68_0_comp_nf, 0x00000002, 2664 }, /* EOR */ -{ op_a70_0_comp_nf, 0x00000002, 2672 }, /* EOR */ -{ op_a78_0_comp_nf, 0x00000002, 2680 }, /* EOR */ -{ op_a79_0_comp_nf, 0x00000002, 2681 }, /* EOR */ -{ NULL, 0x00000002, 2684 }, /* EORSR */ -{ op_a80_0_comp_nf, 0x00000002, 2688 }, /* EOR */ -{ op_a90_0_comp_nf, 0x00000002, 2704 }, /* EOR */ -{ op_a98_0_comp_nf, 0x00000002, 2712 }, /* EOR */ -{ op_aa0_0_comp_nf, 0x00000002, 2720 }, /* EOR */ -{ op_aa8_0_comp_nf, 0x00000002, 2728 }, /* EOR */ -{ op_ab0_0_comp_nf, 0x00000002, 2736 }, /* EOR */ -{ op_ab8_0_comp_nf, 0x00000002, 2744 }, /* EOR */ -{ op_ab9_0_comp_nf, 0x00000002, 2745 }, /* EOR */ -{ NULL, 0x00000000, 2768 }, /* CAS */ -{ NULL, 0x00000000, 2776 }, /* CAS */ -{ NULL, 0x00000000, 2784 }, /* CAS */ -{ NULL, 0x00000000, 2792 }, /* CAS */ -{ NULL, 0x00000000, 2800 }, /* CAS */ -{ NULL, 0x00000000, 2808 }, /* CAS */ -{ NULL, 0x00000000, 2809 }, /* CAS */ -{ op_c00_0_comp_nf, 0x00000002, 3072 }, /* CMP */ -{ op_c10_0_comp_nf, 0x00000002, 3088 }, /* CMP */ -{ op_c18_0_comp_nf, 0x00000002, 3096 }, /* CMP */ -{ op_c20_0_comp_nf, 0x00000002, 3104 }, /* CMP */ -{ op_c28_0_comp_nf, 0x00000002, 3112 }, /* CMP */ -{ op_c30_0_comp_nf, 0x00000002, 3120 }, /* CMP */ -{ op_c38_0_comp_nf, 0x00000002, 3128 }, /* CMP */ -{ op_c39_0_comp_nf, 0x00000002, 3129 }, /* CMP */ -{ op_c3a_0_comp_nf, 0x00000002, 3130 }, /* CMP */ -{ op_c3b_0_comp_nf, 0x00000002, 3131 }, /* CMP */ -{ op_c40_0_comp_nf, 0x00000002, 3136 }, /* CMP */ -{ op_c50_0_comp_nf, 0x00000002, 3152 }, /* CMP */ -{ op_c58_0_comp_nf, 0x00000002, 3160 }, /* CMP */ -{ op_c60_0_comp_nf, 0x00000002, 3168 }, /* CMP */ -{ op_c68_0_comp_nf, 0x00000002, 3176 }, /* CMP */ -{ op_c70_0_comp_nf, 0x00000002, 3184 }, /* CMP */ -{ op_c78_0_comp_nf, 0x00000002, 3192 }, /* CMP */ -{ op_c79_0_comp_nf, 0x00000002, 3193 }, /* CMP */ -{ op_c7a_0_comp_nf, 0x00000002, 3194 }, /* CMP */ -{ op_c7b_0_comp_nf, 0x00000002, 3195 }, /* CMP */ -{ op_c80_0_comp_nf, 0x00000002, 3200 }, /* CMP */ -{ op_c90_0_comp_nf, 0x00000002, 3216 }, /* CMP */ -{ op_c98_0_comp_nf, 0x00000002, 3224 }, /* CMP */ -{ op_ca0_0_comp_nf, 0x00000002, 3232 }, /* CMP */ -{ op_ca8_0_comp_nf, 0x00000002, 3240 }, /* CMP */ -{ op_cb0_0_comp_nf, 0x00000002, 3248 }, /* CMP */ -{ op_cb8_0_comp_nf, 0x00000002, 3256 }, /* CMP */ -{ op_cb9_0_comp_nf, 0x00000002, 3257 }, /* CMP */ -{ op_cba_0_comp_nf, 0x00000002, 3258 }, /* CMP */ -{ op_cbb_0_comp_nf, 0x00000002, 3259 }, /* CMP */ -{ NULL, 0x00000000, 3280 }, /* CAS */ -{ NULL, 0x00000000, 3288 }, /* CAS */ -{ NULL, 0x00000000, 3296 }, /* CAS */ -{ NULL, 0x00000000, 3304 }, /* CAS */ -{ NULL, 0x00000000, 3312 }, /* CAS */ -{ NULL, 0x00000000, 3320 }, /* CAS */ -{ NULL, 0x00000000, 3321 }, /* CAS */ -{ NULL, 0x00000000, 3324 }, /* CAS2 */ -{ NULL, 0x00000001, 3600 }, /* MOVES */ -{ NULL, 0x00000001, 3608 }, /* MOVES */ -{ NULL, 0x00000001, 3616 }, /* MOVES */ -{ NULL, 0x00000001, 3624 }, /* MOVES */ -{ NULL, 0x00000001, 3632 }, /* MOVES */ -{ NULL, 0x00000001, 3640 }, /* MOVES */ -{ NULL, 0x00000001, 3641 }, /* MOVES */ -{ NULL, 0x00000001, 3664 }, /* MOVES */ -{ NULL, 0x00000001, 3672 }, /* MOVES */ -{ NULL, 0x00000001, 3680 }, /* MOVES */ -{ NULL, 0x00000001, 3688 }, /* MOVES */ -{ NULL, 0x00000001, 3696 }, /* MOVES */ -{ NULL, 0x00000001, 3704 }, /* MOVES */ -{ NULL, 0x00000001, 3705 }, /* MOVES */ -{ NULL, 0x00000001, 3728 }, /* MOVES */ -{ NULL, 0x00000001, 3736 }, /* MOVES */ -{ NULL, 0x00000001, 3744 }, /* MOVES */ -{ NULL, 0x00000001, 3752 }, /* MOVES */ -{ NULL, 0x00000001, 3760 }, /* MOVES */ -{ NULL, 0x00000001, 3768 }, /* MOVES */ -{ NULL, 0x00000001, 3769 }, /* MOVES */ -{ NULL, 0x00000000, 3792 }, /* CAS */ -{ NULL, 0x00000000, 3800 }, /* CAS */ -{ NULL, 0x00000000, 3808 }, /* CAS */ -{ NULL, 0x00000000, 3816 }, /* CAS */ -{ NULL, 0x00000000, 3824 }, /* CAS */ -{ NULL, 0x00000000, 3832 }, /* CAS */ -{ NULL, 0x00000000, 3833 }, /* CAS */ -{ NULL, 0x00000000, 3836 }, /* CAS2 */ -{ op_1000_0_comp_nf, 0x00000000, 4096 }, /* MOVE */ -{ op_1010_0_comp_nf, 0x00000000, 4112 }, /* MOVE */ -{ op_1018_0_comp_nf, 0x00000000, 4120 }, /* MOVE */ -{ op_1020_0_comp_nf, 0x00000000, 4128 }, /* MOVE */ -{ op_1028_0_comp_nf, 0x00000002, 4136 }, /* MOVE */ -{ op_1030_0_comp_nf, 0x00000002, 4144 }, /* MOVE */ -{ op_1038_0_comp_nf, 0x00000002, 4152 }, /* MOVE */ -{ op_1039_0_comp_nf, 0x00000002, 4153 }, /* MOVE */ -{ op_103a_0_comp_nf, 0x00000002, 4154 }, /* MOVE */ -{ op_103b_0_comp_nf, 0x00000002, 4155 }, /* MOVE */ -{ op_103c_0_comp_nf, 0x00000002, 4156 }, /* MOVE */ -{ op_1080_0_comp_nf, 0x00000000, 4224 }, /* MOVE */ -{ op_1090_0_comp_nf, 0x00000000, 4240 }, /* MOVE */ -{ op_1098_0_comp_nf, 0x00000000, 4248 }, /* MOVE */ -{ op_10a0_0_comp_nf, 0x00000000, 4256 }, /* MOVE */ -{ op_10a8_0_comp_nf, 0x00000002, 4264 }, /* MOVE */ -{ op_10b0_0_comp_nf, 0x00000002, 4272 }, /* MOVE */ -{ op_10b8_0_comp_nf, 0x00000002, 4280 }, /* MOVE */ -{ op_10b9_0_comp_nf, 0x00000002, 4281 }, /* MOVE */ -{ op_10ba_0_comp_nf, 0x00000002, 4282 }, /* MOVE */ -{ op_10bb_0_comp_nf, 0x00000002, 4283 }, /* MOVE */ -{ op_10bc_0_comp_nf, 0x00000002, 4284 }, /* MOVE */ -{ op_10c0_0_comp_nf, 0x00000000, 4288 }, /* MOVE */ -{ op_10d0_0_comp_nf, 0x00000000, 4304 }, /* MOVE */ -{ op_10d8_0_comp_nf, 0x00000000, 4312 }, /* MOVE */ -{ op_10e0_0_comp_nf, 0x00000000, 4320 }, /* MOVE */ -{ op_10e8_0_comp_nf, 0x00000002, 4328 }, /* MOVE */ -{ op_10f0_0_comp_nf, 0x00000002, 4336 }, /* MOVE */ -{ op_10f8_0_comp_nf, 0x00000002, 4344 }, /* MOVE */ -{ op_10f9_0_comp_nf, 0x00000002, 4345 }, /* MOVE */ -{ op_10fa_0_comp_nf, 0x00000002, 4346 }, /* MOVE */ -{ op_10fb_0_comp_nf, 0x00000002, 4347 }, /* MOVE */ -{ op_10fc_0_comp_nf, 0x00000002, 4348 }, /* MOVE */ -{ op_1100_0_comp_nf, 0x00000000, 4352 }, /* MOVE */ -{ op_1110_0_comp_nf, 0x00000000, 4368 }, /* MOVE */ -{ op_1118_0_comp_nf, 0x00000000, 4376 }, /* MOVE */ -{ op_1120_0_comp_nf, 0x00000000, 4384 }, /* MOVE */ -{ op_1128_0_comp_nf, 0x00000002, 4392 }, /* MOVE */ -{ op_1130_0_comp_nf, 0x00000002, 4400 }, /* MOVE */ -{ op_1138_0_comp_nf, 0x00000002, 4408 }, /* MOVE */ -{ op_1139_0_comp_nf, 0x00000002, 4409 }, /* MOVE */ -{ op_113a_0_comp_nf, 0x00000002, 4410 }, /* MOVE */ -{ op_113b_0_comp_nf, 0x00000002, 4411 }, /* MOVE */ -{ op_113c_0_comp_nf, 0x00000002, 4412 }, /* MOVE */ -{ op_1140_0_comp_nf, 0x00000002, 4416 }, /* MOVE */ -{ op_1150_0_comp_nf, 0x00000002, 4432 }, /* MOVE */ -{ op_1158_0_comp_nf, 0x00000002, 4440 }, /* MOVE */ -{ op_1160_0_comp_nf, 0x00000002, 4448 }, /* MOVE */ -{ op_1168_0_comp_nf, 0x00000002, 4456 }, /* MOVE */ -{ op_1170_0_comp_nf, 0x00000002, 4464 }, /* MOVE */ -{ op_1178_0_comp_nf, 0x00000002, 4472 }, /* MOVE */ -{ op_1179_0_comp_nf, 0x00000002, 4473 }, /* MOVE */ -{ op_117a_0_comp_nf, 0x00000002, 4474 }, /* MOVE */ -{ op_117b_0_comp_nf, 0x00000002, 4475 }, /* MOVE */ -{ op_117c_0_comp_nf, 0x00000002, 4476 }, /* MOVE */ -{ op_1180_0_comp_nf, 0x00000002, 4480 }, /* MOVE */ -{ op_1190_0_comp_nf, 0x00000002, 4496 }, /* MOVE */ -{ op_1198_0_comp_nf, 0x00000002, 4504 }, /* MOVE */ -{ op_11a0_0_comp_nf, 0x00000002, 4512 }, /* MOVE */ -{ op_11a8_0_comp_nf, 0x00000002, 4520 }, /* MOVE */ -{ op_11b0_0_comp_nf, 0x00000002, 4528 }, /* MOVE */ -{ op_11b8_0_comp_nf, 0x00000002, 4536 }, /* MOVE */ -{ op_11b9_0_comp_nf, 0x00000002, 4537 }, /* MOVE */ -{ op_11ba_0_comp_nf, 0x00000002, 4538 }, /* MOVE */ -{ op_11bb_0_comp_nf, 0x00000002, 4539 }, /* MOVE */ -{ op_11bc_0_comp_nf, 0x00000002, 4540 }, /* MOVE */ -{ op_11c0_0_comp_nf, 0x00000002, 4544 }, /* MOVE */ -{ op_11d0_0_comp_nf, 0x00000002, 4560 }, /* MOVE */ -{ op_11d8_0_comp_nf, 0x00000002, 4568 }, /* MOVE */ -{ op_11e0_0_comp_nf, 0x00000002, 4576 }, /* MOVE */ -{ op_11e8_0_comp_nf, 0x00000002, 4584 }, /* MOVE */ -{ op_11f0_0_comp_nf, 0x00000002, 4592 }, /* MOVE */ -{ op_11f8_0_comp_nf, 0x00000002, 4600 }, /* MOVE */ -{ op_11f9_0_comp_nf, 0x00000002, 4601 }, /* MOVE */ -{ op_11fa_0_comp_nf, 0x00000002, 4602 }, /* MOVE */ -{ op_11fb_0_comp_nf, 0x00000002, 4603 }, /* MOVE */ -{ op_11fc_0_comp_nf, 0x00000002, 4604 }, /* MOVE */ -{ op_13c0_0_comp_nf, 0x00000002, 5056 }, /* MOVE */ -{ op_13d0_0_comp_nf, 0x00000002, 5072 }, /* MOVE */ -{ op_13d8_0_comp_nf, 0x00000002, 5080 }, /* MOVE */ -{ op_13e0_0_comp_nf, 0x00000002, 5088 }, /* MOVE */ -{ op_13e8_0_comp_nf, 0x00000002, 5096 }, /* MOVE */ -{ op_13f0_0_comp_nf, 0x00000002, 5104 }, /* MOVE */ -{ op_13f8_0_comp_nf, 0x00000002, 5112 }, /* MOVE */ -{ op_13f9_0_comp_nf, 0x00000002, 5113 }, /* MOVE */ -{ op_13fa_0_comp_nf, 0x00000002, 5114 }, /* MOVE */ -{ op_13fb_0_comp_nf, 0x00000002, 5115 }, /* MOVE */ -{ op_13fc_0_comp_nf, 0x00000002, 5116 }, /* MOVE */ -{ op_2000_0_comp_nf, 0x00000000, 8192 }, /* MOVE */ -{ op_2008_0_comp_nf, 0x00000000, 8200 }, /* MOVE */ -{ op_2010_0_comp_nf, 0x00000000, 8208 }, /* MOVE */ -{ op_2018_0_comp_nf, 0x00000000, 8216 }, /* MOVE */ -{ op_2020_0_comp_nf, 0x00000000, 8224 }, /* MOVE */ -{ op_2028_0_comp_nf, 0x00000002, 8232 }, /* MOVE */ -{ op_2030_0_comp_nf, 0x00000002, 8240 }, /* MOVE */ -{ op_2038_0_comp_nf, 0x00000002, 8248 }, /* MOVE */ -{ op_2039_0_comp_nf, 0x00000002, 8249 }, /* MOVE */ -{ op_203a_0_comp_nf, 0x00000002, 8250 }, /* MOVE */ -{ op_203b_0_comp_nf, 0x00000002, 8251 }, /* MOVE */ -{ op_203c_0_comp_nf, 0x00000002, 8252 }, /* MOVE */ -{ op_2040_0_comp_nf, 0x00000000, 8256 }, /* MOVEA */ -{ op_2048_0_comp_nf, 0x00000000, 8264 }, /* MOVEA */ -{ op_2050_0_comp_nf, 0x00000000, 8272 }, /* MOVEA */ -{ op_2058_0_comp_nf, 0x00000000, 8280 }, /* MOVEA */ -{ op_2060_0_comp_nf, 0x00000000, 8288 }, /* MOVEA */ -{ op_2068_0_comp_nf, 0x00000002, 8296 }, /* MOVEA */ -{ op_2070_0_comp_nf, 0x00000002, 8304 }, /* MOVEA */ -{ op_2078_0_comp_nf, 0x00000002, 8312 }, /* MOVEA */ -{ op_2079_0_comp_nf, 0x00000002, 8313 }, /* MOVEA */ -{ op_207a_0_comp_nf, 0x00000002, 8314 }, /* MOVEA */ -{ op_207b_0_comp_nf, 0x00000002, 8315 }, /* MOVEA */ -{ op_207c_0_comp_nf, 0x00000002, 8316 }, /* MOVEA */ -{ op_2080_0_comp_nf, 0x00000000, 8320 }, /* MOVE */ -{ op_2088_0_comp_nf, 0x00000000, 8328 }, /* MOVE */ -{ op_2090_0_comp_nf, 0x00000000, 8336 }, /* MOVE */ -{ op_2098_0_comp_nf, 0x00000000, 8344 }, /* MOVE */ -{ op_20a0_0_comp_nf, 0x00000000, 8352 }, /* MOVE */ -{ op_20a8_0_comp_nf, 0x00000002, 8360 }, /* MOVE */ -{ op_20b0_0_comp_nf, 0x00000002, 8368 }, /* MOVE */ -{ op_20b8_0_comp_nf, 0x00000002, 8376 }, /* MOVE */ -{ op_20b9_0_comp_nf, 0x00000002, 8377 }, /* MOVE */ -{ op_20ba_0_comp_nf, 0x00000002, 8378 }, /* MOVE */ -{ op_20bb_0_comp_nf, 0x00000002, 8379 }, /* MOVE */ -{ op_20bc_0_comp_nf, 0x00000002, 8380 }, /* MOVE */ -{ op_20c0_0_comp_nf, 0x00000000, 8384 }, /* MOVE */ -{ op_20c8_0_comp_nf, 0x00000000, 8392 }, /* MOVE */ -{ op_20d0_0_comp_nf, 0x00000000, 8400 }, /* MOVE */ -{ op_20d8_0_comp_nf, 0x00000000, 8408 }, /* MOVE */ -{ op_20e0_0_comp_nf, 0x00000000, 8416 }, /* MOVE */ -{ op_20e8_0_comp_nf, 0x00000002, 8424 }, /* MOVE */ -{ op_20f0_0_comp_nf, 0x00000002, 8432 }, /* MOVE */ -{ op_20f8_0_comp_nf, 0x00000002, 8440 }, /* MOVE */ -{ op_20f9_0_comp_nf, 0x00000002, 8441 }, /* MOVE */ -{ op_20fa_0_comp_nf, 0x00000002, 8442 }, /* MOVE */ -{ op_20fb_0_comp_nf, 0x00000002, 8443 }, /* MOVE */ -{ op_20fc_0_comp_nf, 0x00000002, 8444 }, /* MOVE */ -{ op_2100_0_comp_nf, 0x00000000, 8448 }, /* MOVE */ -{ op_2108_0_comp_nf, 0x00000000, 8456 }, /* MOVE */ -{ op_2110_0_comp_nf, 0x00000000, 8464 }, /* MOVE */ -{ op_2118_0_comp_nf, 0x00000000, 8472 }, /* MOVE */ -{ op_2120_0_comp_nf, 0x00000000, 8480 }, /* MOVE */ -{ op_2128_0_comp_nf, 0x00000002, 8488 }, /* MOVE */ -{ op_2130_0_comp_nf, 0x00000002, 8496 }, /* MOVE */ -{ op_2138_0_comp_nf, 0x00000002, 8504 }, /* MOVE */ -{ op_2139_0_comp_nf, 0x00000002, 8505 }, /* MOVE */ -{ op_213a_0_comp_nf, 0x00000002, 8506 }, /* MOVE */ -{ op_213b_0_comp_nf, 0x00000002, 8507 }, /* MOVE */ -{ op_213c_0_comp_nf, 0x00000002, 8508 }, /* MOVE */ -{ op_2140_0_comp_nf, 0x00000002, 8512 }, /* MOVE */ -{ op_2148_0_comp_nf, 0x00000002, 8520 }, /* MOVE */ -{ op_2150_0_comp_nf, 0x00000002, 8528 }, /* MOVE */ -{ op_2158_0_comp_nf, 0x00000002, 8536 }, /* MOVE */ -{ op_2160_0_comp_nf, 0x00000002, 8544 }, /* MOVE */ -{ op_2168_0_comp_nf, 0x00000002, 8552 }, /* MOVE */ -{ op_2170_0_comp_nf, 0x00000002, 8560 }, /* MOVE */ -{ op_2178_0_comp_nf, 0x00000002, 8568 }, /* MOVE */ -{ op_2179_0_comp_nf, 0x00000002, 8569 }, /* MOVE */ -{ op_217a_0_comp_nf, 0x00000002, 8570 }, /* MOVE */ -{ op_217b_0_comp_nf, 0x00000002, 8571 }, /* MOVE */ -{ op_217c_0_comp_nf, 0x00000002, 8572 }, /* MOVE */ -{ op_2180_0_comp_nf, 0x00000002, 8576 }, /* MOVE */ -{ op_2188_0_comp_nf, 0x00000002, 8584 }, /* MOVE */ -{ op_2190_0_comp_nf, 0x00000002, 8592 }, /* MOVE */ -{ op_2198_0_comp_nf, 0x00000002, 8600 }, /* MOVE */ -{ op_21a0_0_comp_nf, 0x00000002, 8608 }, /* MOVE */ -{ op_21a8_0_comp_nf, 0x00000002, 8616 }, /* MOVE */ -{ op_21b0_0_comp_nf, 0x00000002, 8624 }, /* MOVE */ -{ op_21b8_0_comp_nf, 0x00000002, 8632 }, /* MOVE */ -{ op_21b9_0_comp_nf, 0x00000002, 8633 }, /* MOVE */ -{ op_21ba_0_comp_nf, 0x00000002, 8634 }, /* MOVE */ -{ op_21bb_0_comp_nf, 0x00000002, 8635 }, /* MOVE */ -{ op_21bc_0_comp_nf, 0x00000002, 8636 }, /* MOVE */ -{ op_21c0_0_comp_nf, 0x00000002, 8640 }, /* MOVE */ -{ op_21c8_0_comp_nf, 0x00000002, 8648 }, /* MOVE */ -{ op_21d0_0_comp_nf, 0x00000002, 8656 }, /* MOVE */ -{ op_21d8_0_comp_nf, 0x00000002, 8664 }, /* MOVE */ -{ op_21e0_0_comp_nf, 0x00000002, 8672 }, /* MOVE */ -{ op_21e8_0_comp_nf, 0x00000002, 8680 }, /* MOVE */ -{ op_21f0_0_comp_nf, 0x00000002, 8688 }, /* MOVE */ -{ op_21f8_0_comp_nf, 0x00000002, 8696 }, /* MOVE */ -{ op_21f9_0_comp_nf, 0x00000002, 8697 }, /* MOVE */ -{ op_21fa_0_comp_nf, 0x00000002, 8698 }, /* MOVE */ -{ op_21fb_0_comp_nf, 0x00000002, 8699 }, /* MOVE */ -{ op_21fc_0_comp_nf, 0x00000002, 8700 }, /* MOVE */ -{ op_23c0_0_comp_nf, 0x00000002, 9152 }, /* MOVE */ -{ op_23c8_0_comp_nf, 0x00000002, 9160 }, /* MOVE */ -{ op_23d0_0_comp_nf, 0x00000002, 9168 }, /* MOVE */ -{ op_23d8_0_comp_nf, 0x00000002, 9176 }, /* MOVE */ -{ op_23e0_0_comp_nf, 0x00000002, 9184 }, /* MOVE */ -{ op_23e8_0_comp_nf, 0x00000002, 9192 }, /* MOVE */ -{ op_23f0_0_comp_nf, 0x00000002, 9200 }, /* MOVE */ -{ op_23f8_0_comp_nf, 0x00000002, 9208 }, /* MOVE */ -{ op_23f9_0_comp_nf, 0x00000002, 9209 }, /* MOVE */ -{ op_23fa_0_comp_nf, 0x00000002, 9210 }, /* MOVE */ -{ op_23fb_0_comp_nf, 0x00000002, 9211 }, /* MOVE */ -{ op_23fc_0_comp_nf, 0x00000002, 9212 }, /* MOVE */ -{ op_3000_0_comp_nf, 0x00000000, 12288 }, /* MOVE */ -{ op_3008_0_comp_nf, 0x00000000, 12296 }, /* MOVE */ -{ op_3010_0_comp_nf, 0x00000000, 12304 }, /* MOVE */ -{ op_3018_0_comp_nf, 0x00000000, 12312 }, /* MOVE */ -{ op_3020_0_comp_nf, 0x00000000, 12320 }, /* MOVE */ -{ op_3028_0_comp_nf, 0x00000002, 12328 }, /* MOVE */ -{ op_3030_0_comp_nf, 0x00000002, 12336 }, /* MOVE */ -{ op_3038_0_comp_nf, 0x00000002, 12344 }, /* MOVE */ -{ op_3039_0_comp_nf, 0x00000002, 12345 }, /* MOVE */ -{ op_303a_0_comp_nf, 0x00000002, 12346 }, /* MOVE */ -{ op_303b_0_comp_nf, 0x00000002, 12347 }, /* MOVE */ -{ op_303c_0_comp_nf, 0x00000002, 12348 }, /* MOVE */ -{ op_3040_0_comp_nf, 0x00000000, 12352 }, /* MOVEA */ -{ op_3048_0_comp_nf, 0x00000000, 12360 }, /* MOVEA */ -{ op_3050_0_comp_nf, 0x00000000, 12368 }, /* MOVEA */ -{ op_3058_0_comp_nf, 0x00000000, 12376 }, /* MOVEA */ -{ op_3060_0_comp_nf, 0x00000000, 12384 }, /* MOVEA */ -{ op_3068_0_comp_nf, 0x00000002, 12392 }, /* MOVEA */ -{ op_3070_0_comp_nf, 0x00000002, 12400 }, /* MOVEA */ -{ op_3078_0_comp_nf, 0x00000002, 12408 }, /* MOVEA */ -{ op_3079_0_comp_nf, 0x00000002, 12409 }, /* MOVEA */ -{ op_307a_0_comp_nf, 0x00000002, 12410 }, /* MOVEA */ -{ op_307b_0_comp_nf, 0x00000002, 12411 }, /* MOVEA */ -{ op_307c_0_comp_nf, 0x00000002, 12412 }, /* MOVEA */ -{ op_3080_0_comp_nf, 0x00000000, 12416 }, /* MOVE */ -{ op_3088_0_comp_nf, 0x00000000, 12424 }, /* MOVE */ -{ op_3090_0_comp_nf, 0x00000000, 12432 }, /* MOVE */ -{ op_3098_0_comp_nf, 0x00000000, 12440 }, /* MOVE */ -{ op_30a0_0_comp_nf, 0x00000000, 12448 }, /* MOVE */ -{ op_30a8_0_comp_nf, 0x00000002, 12456 }, /* MOVE */ -{ op_30b0_0_comp_nf, 0x00000002, 12464 }, /* MOVE */ -{ op_30b8_0_comp_nf, 0x00000002, 12472 }, /* MOVE */ -{ op_30b9_0_comp_nf, 0x00000002, 12473 }, /* MOVE */ -{ op_30ba_0_comp_nf, 0x00000002, 12474 }, /* MOVE */ -{ op_30bb_0_comp_nf, 0x00000002, 12475 }, /* MOVE */ -{ op_30bc_0_comp_nf, 0x00000002, 12476 }, /* MOVE */ -{ op_30c0_0_comp_nf, 0x00000000, 12480 }, /* MOVE */ -{ op_30c8_0_comp_nf, 0x00000000, 12488 }, /* MOVE */ -{ op_30d0_0_comp_nf, 0x00000000, 12496 }, /* MOVE */ -{ op_30d8_0_comp_nf, 0x00000000, 12504 }, /* MOVE */ -{ op_30e0_0_comp_nf, 0x00000000, 12512 }, /* MOVE */ -{ op_30e8_0_comp_nf, 0x00000002, 12520 }, /* MOVE */ -{ op_30f0_0_comp_nf, 0x00000002, 12528 }, /* MOVE */ -{ op_30f8_0_comp_nf, 0x00000002, 12536 }, /* MOVE */ -{ op_30f9_0_comp_nf, 0x00000002, 12537 }, /* MOVE */ -{ op_30fa_0_comp_nf, 0x00000002, 12538 }, /* MOVE */ -{ op_30fb_0_comp_nf, 0x00000002, 12539 }, /* MOVE */ -{ op_30fc_0_comp_nf, 0x00000002, 12540 }, /* MOVE */ -{ op_3100_0_comp_nf, 0x00000000, 12544 }, /* MOVE */ -{ op_3108_0_comp_nf, 0x00000000, 12552 }, /* MOVE */ -{ op_3110_0_comp_nf, 0x00000000, 12560 }, /* MOVE */ -{ op_3118_0_comp_nf, 0x00000000, 12568 }, /* MOVE */ -{ op_3120_0_comp_nf, 0x00000000, 12576 }, /* MOVE */ -{ op_3128_0_comp_nf, 0x00000002, 12584 }, /* MOVE */ -{ op_3130_0_comp_nf, 0x00000002, 12592 }, /* MOVE */ -{ op_3138_0_comp_nf, 0x00000002, 12600 }, /* MOVE */ -{ op_3139_0_comp_nf, 0x00000002, 12601 }, /* MOVE */ -{ op_313a_0_comp_nf, 0x00000002, 12602 }, /* MOVE */ -{ op_313b_0_comp_nf, 0x00000002, 12603 }, /* MOVE */ -{ op_313c_0_comp_nf, 0x00000002, 12604 }, /* MOVE */ -{ op_3140_0_comp_nf, 0x00000002, 12608 }, /* MOVE */ -{ op_3148_0_comp_nf, 0x00000002, 12616 }, /* MOVE */ -{ op_3150_0_comp_nf, 0x00000002, 12624 }, /* MOVE */ -{ op_3158_0_comp_nf, 0x00000002, 12632 }, /* MOVE */ -{ op_3160_0_comp_nf, 0x00000002, 12640 }, /* MOVE */ -{ op_3168_0_comp_nf, 0x00000002, 12648 }, /* MOVE */ -{ op_3170_0_comp_nf, 0x00000002, 12656 }, /* MOVE */ -{ op_3178_0_comp_nf, 0x00000002, 12664 }, /* MOVE */ -{ op_3179_0_comp_nf, 0x00000002, 12665 }, /* MOVE */ -{ op_317a_0_comp_nf, 0x00000002, 12666 }, /* MOVE */ -{ op_317b_0_comp_nf, 0x00000002, 12667 }, /* MOVE */ -{ op_317c_0_comp_nf, 0x00000002, 12668 }, /* MOVE */ -{ op_3180_0_comp_nf, 0x00000002, 12672 }, /* MOVE */ -{ op_3188_0_comp_nf, 0x00000002, 12680 }, /* MOVE */ -{ op_3190_0_comp_nf, 0x00000002, 12688 }, /* MOVE */ -{ op_3198_0_comp_nf, 0x00000002, 12696 }, /* MOVE */ -{ op_31a0_0_comp_nf, 0x00000002, 12704 }, /* MOVE */ -{ op_31a8_0_comp_nf, 0x00000002, 12712 }, /* MOVE */ -{ op_31b0_0_comp_nf, 0x00000002, 12720 }, /* MOVE */ -{ op_31b8_0_comp_nf, 0x00000002, 12728 }, /* MOVE */ -{ op_31b9_0_comp_nf, 0x00000002, 12729 }, /* MOVE */ -{ op_31ba_0_comp_nf, 0x00000002, 12730 }, /* MOVE */ -{ op_31bb_0_comp_nf, 0x00000002, 12731 }, /* MOVE */ -{ op_31bc_0_comp_nf, 0x00000002, 12732 }, /* MOVE */ -{ op_31c0_0_comp_nf, 0x00000002, 12736 }, /* MOVE */ -{ op_31c8_0_comp_nf, 0x00000002, 12744 }, /* MOVE */ -{ op_31d0_0_comp_nf, 0x00000002, 12752 }, /* MOVE */ -{ op_31d8_0_comp_nf, 0x00000002, 12760 }, /* MOVE */ -{ op_31e0_0_comp_nf, 0x00000002, 12768 }, /* MOVE */ -{ op_31e8_0_comp_nf, 0x00000002, 12776 }, /* MOVE */ -{ op_31f0_0_comp_nf, 0x00000002, 12784 }, /* MOVE */ -{ op_31f8_0_comp_nf, 0x00000002, 12792 }, /* MOVE */ -{ op_31f9_0_comp_nf, 0x00000002, 12793 }, /* MOVE */ -{ op_31fa_0_comp_nf, 0x00000002, 12794 }, /* MOVE */ -{ op_31fb_0_comp_nf, 0x00000002, 12795 }, /* MOVE */ -{ op_31fc_0_comp_nf, 0x00000002, 12796 }, /* MOVE */ -{ op_33c0_0_comp_nf, 0x00000002, 13248 }, /* MOVE */ -{ op_33c8_0_comp_nf, 0x00000002, 13256 }, /* MOVE */ -{ op_33d0_0_comp_nf, 0x00000002, 13264 }, /* MOVE */ -{ op_33d8_0_comp_nf, 0x00000002, 13272 }, /* MOVE */ -{ op_33e0_0_comp_nf, 0x00000002, 13280 }, /* MOVE */ -{ op_33e8_0_comp_nf, 0x00000002, 13288 }, /* MOVE */ -{ op_33f0_0_comp_nf, 0x00000002, 13296 }, /* MOVE */ -{ op_33f8_0_comp_nf, 0x00000002, 13304 }, /* MOVE */ -{ op_33f9_0_comp_nf, 0x00000002, 13305 }, /* MOVE */ -{ op_33fa_0_comp_nf, 0x00000002, 13306 }, /* MOVE */ -{ op_33fb_0_comp_nf, 0x00000002, 13307 }, /* MOVE */ -{ op_33fc_0_comp_nf, 0x00000002, 13308 }, /* MOVE */ -{ op_4000_0_comp_nf, 0x00000008, 16384 }, /* NEGX */ -{ op_4010_0_comp_nf, 0x00000008, 16400 }, /* NEGX */ -{ op_4018_0_comp_nf, 0x00000008, 16408 }, /* NEGX */ -{ op_4020_0_comp_nf, 0x00000008, 16416 }, /* NEGX */ -{ op_4028_0_comp_nf, 0x0000000a, 16424 }, /* NEGX */ -{ op_4030_0_comp_nf, 0x0000000a, 16432 }, /* NEGX */ -{ op_4038_0_comp_nf, 0x0000000a, 16440 }, /* NEGX */ -{ op_4039_0_comp_nf, 0x0000000a, 16441 }, /* NEGX */ -{ op_4040_0_comp_nf, 0x00000008, 16448 }, /* NEGX */ -{ op_4050_0_comp_nf, 0x00000008, 16464 }, /* NEGX */ -{ op_4058_0_comp_nf, 0x00000008, 16472 }, /* NEGX */ -{ op_4060_0_comp_nf, 0x00000008, 16480 }, /* NEGX */ -{ op_4068_0_comp_nf, 0x0000000a, 16488 }, /* NEGX */ -{ op_4070_0_comp_nf, 0x0000000a, 16496 }, /* NEGX */ -{ op_4078_0_comp_nf, 0x0000000a, 16504 }, /* NEGX */ -{ op_4079_0_comp_nf, 0x0000000a, 16505 }, /* NEGX */ -{ op_4080_0_comp_nf, 0x00000008, 16512 }, /* NEGX */ -{ op_4090_0_comp_nf, 0x00000008, 16528 }, /* NEGX */ -{ op_4098_0_comp_nf, 0x00000008, 16536 }, /* NEGX */ -{ op_40a0_0_comp_nf, 0x00000008, 16544 }, /* NEGX */ -{ op_40a8_0_comp_nf, 0x0000000a, 16552 }, /* NEGX */ -{ op_40b0_0_comp_nf, 0x0000000a, 16560 }, /* NEGX */ -{ op_40b8_0_comp_nf, 0x0000000a, 16568 }, /* NEGX */ -{ op_40b9_0_comp_nf, 0x0000000a, 16569 }, /* NEGX */ -{ NULL, 0x00000001, 16576 }, /* MVSR2 */ -{ NULL, 0x00000001, 16592 }, /* MVSR2 */ -{ NULL, 0x00000001, 16600 }, /* MVSR2 */ -{ NULL, 0x00000001, 16608 }, /* MVSR2 */ -{ NULL, 0x00000001, 16616 }, /* MVSR2 */ -{ NULL, 0x00000001, 16624 }, /* MVSR2 */ -{ NULL, 0x00000001, 16632 }, /* MVSR2 */ -{ NULL, 0x00000001, 16633 }, /* MVSR2 */ -{ NULL, 0x00000001, 16640 }, /* CHK */ -{ NULL, 0x00000001, 16656 }, /* CHK */ -{ NULL, 0x00000001, 16664 }, /* CHK */ -{ NULL, 0x00000001, 16672 }, /* CHK */ -{ NULL, 0x00000001, 16680 }, /* CHK */ -{ NULL, 0x00000001, 16688 }, /* CHK */ -{ NULL, 0x00000001, 16696 }, /* CHK */ -{ NULL, 0x00000001, 16697 }, /* CHK */ -{ NULL, 0x00000001, 16698 }, /* CHK */ -{ NULL, 0x00000001, 16699 }, /* CHK */ -{ NULL, 0x00000001, 16700 }, /* CHK */ -{ NULL, 0x00000001, 16768 }, /* CHK */ -{ NULL, 0x00000001, 16784 }, /* CHK */ -{ NULL, 0x00000001, 16792 }, /* CHK */ -{ NULL, 0x00000001, 16800 }, /* CHK */ -{ NULL, 0x00000001, 16808 }, /* CHK */ -{ NULL, 0x00000001, 16816 }, /* CHK */ -{ NULL, 0x00000001, 16824 }, /* CHK */ -{ NULL, 0x00000001, 16825 }, /* CHK */ -{ NULL, 0x00000001, 16826 }, /* CHK */ -{ NULL, 0x00000001, 16827 }, /* CHK */ -{ NULL, 0x00000001, 16828 }, /* CHK */ -{ op_41d0_0_comp_nf, 0x00000000, 16848 }, /* LEA */ -{ op_41e8_0_comp_nf, 0x00000002, 16872 }, /* LEA */ -{ op_41f0_0_comp_nf, 0x00000002, 16880 }, /* LEA */ -{ op_41f8_0_comp_nf, 0x00000002, 16888 }, /* LEA */ -{ op_41f9_0_comp_nf, 0x00000002, 16889 }, /* LEA */ -{ op_41fa_0_comp_nf, 0x00000002, 16890 }, /* LEA */ -{ op_41fb_0_comp_nf, 0x00000002, 16891 }, /* LEA */ -{ op_4200_0_comp_nf, 0x00000000, 16896 }, /* CLR */ -{ op_4210_0_comp_nf, 0x00000000, 16912 }, /* CLR */ -{ op_4218_0_comp_nf, 0x00000000, 16920 }, /* CLR */ -{ op_4220_0_comp_nf, 0x00000000, 16928 }, /* CLR */ -{ op_4228_0_comp_nf, 0x00000002, 16936 }, /* CLR */ -{ op_4230_0_comp_nf, 0x00000002, 16944 }, /* CLR */ -{ op_4238_0_comp_nf, 0x00000002, 16952 }, /* CLR */ -{ op_4239_0_comp_nf, 0x00000002, 16953 }, /* CLR */ -{ op_4240_0_comp_nf, 0x00000000, 16960 }, /* CLR */ -{ op_4250_0_comp_nf, 0x00000000, 16976 }, /* CLR */ -{ op_4258_0_comp_nf, 0x00000000, 16984 }, /* CLR */ -{ op_4260_0_comp_nf, 0x00000000, 16992 }, /* CLR */ -{ op_4268_0_comp_nf, 0x00000002, 17000 }, /* CLR */ -{ op_4270_0_comp_nf, 0x00000002, 17008 }, /* CLR */ -{ op_4278_0_comp_nf, 0x00000002, 17016 }, /* CLR */ -{ op_4279_0_comp_nf, 0x00000002, 17017 }, /* CLR */ -{ op_4280_0_comp_nf, 0x00000000, 17024 }, /* CLR */ -{ op_4290_0_comp_nf, 0x00000000, 17040 }, /* CLR */ -{ op_4298_0_comp_nf, 0x00000000, 17048 }, /* CLR */ -{ op_42a0_0_comp_nf, 0x00000000, 17056 }, /* CLR */ -{ op_42a8_0_comp_nf, 0x00000002, 17064 }, /* CLR */ -{ op_42b0_0_comp_nf, 0x00000002, 17072 }, /* CLR */ -{ op_42b8_0_comp_nf, 0x00000002, 17080 }, /* CLR */ -{ op_42b9_0_comp_nf, 0x00000002, 17081 }, /* CLR */ -{ NULL, 0x00000001, 17088 }, /* MVSR2 */ -{ NULL, 0x00000001, 17104 }, /* MVSR2 */ -{ NULL, 0x00000001, 17112 }, /* MVSR2 */ -{ NULL, 0x00000001, 17120 }, /* MVSR2 */ -{ NULL, 0x00000001, 17128 }, /* MVSR2 */ -{ NULL, 0x00000001, 17136 }, /* MVSR2 */ -{ NULL, 0x00000001, 17144 }, /* MVSR2 */ -{ NULL, 0x00000001, 17145 }, /* MVSR2 */ -{ op_4400_0_comp_nf, 0x00000000, 17408 }, /* NEG */ -{ op_4410_0_comp_nf, 0x00000000, 17424 }, /* NEG */ -{ op_4418_0_comp_nf, 0x00000000, 17432 }, /* NEG */ -{ op_4420_0_comp_nf, 0x00000000, 17440 }, /* NEG */ -{ op_4428_0_comp_nf, 0x00000002, 17448 }, /* NEG */ -{ op_4430_0_comp_nf, 0x00000002, 17456 }, /* NEG */ -{ op_4438_0_comp_nf, 0x00000002, 17464 }, /* NEG */ -{ op_4439_0_comp_nf, 0x00000002, 17465 }, /* NEG */ -{ op_4440_0_comp_nf, 0x00000000, 17472 }, /* NEG */ -{ op_4450_0_comp_nf, 0x00000000, 17488 }, /* NEG */ -{ op_4458_0_comp_nf, 0x00000000, 17496 }, /* NEG */ -{ op_4460_0_comp_nf, 0x00000000, 17504 }, /* NEG */ -{ op_4468_0_comp_nf, 0x00000002, 17512 }, /* NEG */ -{ op_4470_0_comp_nf, 0x00000002, 17520 }, /* NEG */ -{ op_4478_0_comp_nf, 0x00000002, 17528 }, /* NEG */ -{ op_4479_0_comp_nf, 0x00000002, 17529 }, /* NEG */ -{ op_4480_0_comp_nf, 0x00000000, 17536 }, /* NEG */ -{ op_4490_0_comp_nf, 0x00000000, 17552 }, /* NEG */ -{ op_4498_0_comp_nf, 0x00000000, 17560 }, /* NEG */ -{ op_44a0_0_comp_nf, 0x00000000, 17568 }, /* NEG */ -{ op_44a8_0_comp_nf, 0x00000002, 17576 }, /* NEG */ -{ op_44b0_0_comp_nf, 0x00000002, 17584 }, /* NEG */ -{ op_44b8_0_comp_nf, 0x00000002, 17592 }, /* NEG */ -{ op_44b9_0_comp_nf, 0x00000002, 17593 }, /* NEG */ -{ NULL, 0x00000001, 17600 }, /* MV2SR */ -{ NULL, 0x00000001, 17616 }, /* MV2SR */ -{ NULL, 0x00000001, 17624 }, /* MV2SR */ -{ NULL, 0x00000001, 17632 }, /* MV2SR */ -{ NULL, 0x00000001, 17640 }, /* MV2SR */ -{ NULL, 0x00000001, 17648 }, /* MV2SR */ -{ NULL, 0x00000001, 17656 }, /* MV2SR */ -{ NULL, 0x00000001, 17657 }, /* MV2SR */ -{ NULL, 0x00000001, 17658 }, /* MV2SR */ -{ NULL, 0x00000001, 17659 }, /* MV2SR */ -{ NULL, 0x00000001, 17660 }, /* MV2SR */ -{ op_4600_0_comp_nf, 0x00000000, 17920 }, /* NOT */ -{ op_4610_0_comp_nf, 0x00000000, 17936 }, /* NOT */ -{ op_4618_0_comp_nf, 0x00000000, 17944 }, /* NOT */ -{ op_4620_0_comp_nf, 0x00000000, 17952 }, /* NOT */ -{ op_4628_0_comp_nf, 0x00000002, 17960 }, /* NOT */ -{ op_4630_0_comp_nf, 0x00000002, 17968 }, /* NOT */ -{ op_4638_0_comp_nf, 0x00000002, 17976 }, /* NOT */ -{ op_4639_0_comp_nf, 0x00000002, 17977 }, /* NOT */ -{ op_4640_0_comp_nf, 0x00000000, 17984 }, /* NOT */ -{ op_4650_0_comp_nf, 0x00000000, 18000 }, /* NOT */ -{ op_4658_0_comp_nf, 0x00000000, 18008 }, /* NOT */ -{ op_4660_0_comp_nf, 0x00000000, 18016 }, /* NOT */ -{ op_4668_0_comp_nf, 0x00000002, 18024 }, /* NOT */ -{ op_4670_0_comp_nf, 0x00000002, 18032 }, /* NOT */ -{ op_4678_0_comp_nf, 0x00000002, 18040 }, /* NOT */ -{ op_4679_0_comp_nf, 0x00000002, 18041 }, /* NOT */ -{ op_4680_0_comp_nf, 0x00000000, 18048 }, /* NOT */ -{ op_4690_0_comp_nf, 0x00000000, 18064 }, /* NOT */ -{ op_4698_0_comp_nf, 0x00000000, 18072 }, /* NOT */ -{ op_46a0_0_comp_nf, 0x00000000, 18080 }, /* NOT */ -{ op_46a8_0_comp_nf, 0x00000002, 18088 }, /* NOT */ -{ op_46b0_0_comp_nf, 0x00000002, 18096 }, /* NOT */ -{ op_46b8_0_comp_nf, 0x00000002, 18104 }, /* NOT */ -{ op_46b9_0_comp_nf, 0x00000002, 18105 }, /* NOT */ -{ NULL, 0x00000001, 18112 }, /* MV2SR */ -{ NULL, 0x00000001, 18128 }, /* MV2SR */ -{ NULL, 0x00000001, 18136 }, /* MV2SR */ -{ NULL, 0x00000001, 18144 }, /* MV2SR */ -{ NULL, 0x00000001, 18152 }, /* MV2SR */ -{ NULL, 0x00000001, 18160 }, /* MV2SR */ -{ NULL, 0x00000001, 18168 }, /* MV2SR */ -{ NULL, 0x00000001, 18169 }, /* MV2SR */ -{ NULL, 0x00000001, 18170 }, /* MV2SR */ -{ NULL, 0x00000001, 18171 }, /* MV2SR */ -{ NULL, 0x00000001, 18172 }, /* MV2SR */ -{ NULL, 0x00000000, 18432 }, /* NBCD */ -{ op_4808_0_comp_nf, 0x00000002, 18440 }, /* LINK */ -{ NULL, 0x00000000, 18448 }, /* NBCD */ -{ NULL, 0x00000000, 18456 }, /* NBCD */ -{ NULL, 0x00000000, 18464 }, /* NBCD */ -{ NULL, 0x00000000, 18472 }, /* NBCD */ -{ NULL, 0x00000000, 18480 }, /* NBCD */ -{ NULL, 0x00000000, 18488 }, /* NBCD */ -{ NULL, 0x00000000, 18489 }, /* NBCD */ -{ op_4840_0_comp_nf, 0x00000000, 18496 }, /* SWAP */ -{ NULL, 0x00000001, 18504 }, /* BKPT */ -{ op_4850_0_comp_nf, 0x00000000, 18512 }, /* PEA */ -{ op_4868_0_comp_nf, 0x00000002, 18536 }, /* PEA */ -{ op_4870_0_comp_nf, 0x00000002, 18544 }, /* PEA */ -{ op_4878_0_comp_nf, 0x00000002, 18552 }, /* PEA */ -{ op_4879_0_comp_nf, 0x00000002, 18553 }, /* PEA */ -{ op_487a_0_comp_nf, 0x00000002, 18554 }, /* PEA */ -{ op_487b_0_comp_nf, 0x00000002, 18555 }, /* PEA */ -{ op_4880_0_comp_nf, 0x00000000, 18560 }, /* EXT */ -{ op_4890_0_comp_nf, 0x00000002, 18576 }, /* MVMLE */ -{ op_48a0_0_comp_nf, 0x00000002, 18592 }, /* MVMLE */ -{ op_48a8_0_comp_nf, 0x00000002, 18600 }, /* MVMLE */ -{ op_48b0_0_comp_nf, 0x00000002, 18608 }, /* MVMLE */ -{ op_48b8_0_comp_nf, 0x00000002, 18616 }, /* MVMLE */ -{ op_48b9_0_comp_nf, 0x00000002, 18617 }, /* MVMLE */ -{ op_48c0_0_comp_nf, 0x00000000, 18624 }, /* EXT */ -{ op_48d0_0_comp_nf, 0x00000002, 18640 }, /* MVMLE */ -{ op_48e0_0_comp_nf, 0x00000002, 18656 }, /* MVMLE */ -{ op_48e8_0_comp_nf, 0x00000002, 18664 }, /* MVMLE */ -{ op_48f0_0_comp_nf, 0x00000002, 18672 }, /* MVMLE */ -{ op_48f8_0_comp_nf, 0x00000002, 18680 }, /* MVMLE */ -{ op_48f9_0_comp_nf, 0x00000002, 18681 }, /* MVMLE */ -{ op_49c0_0_comp_nf, 0x00000000, 18880 }, /* EXT */ -{ op_4a00_0_comp_nf, 0x00000000, 18944 }, /* TST */ -{ op_4a10_0_comp_nf, 0x00000000, 18960 }, /* TST */ -{ op_4a18_0_comp_nf, 0x00000000, 18968 }, /* TST */ -{ op_4a20_0_comp_nf, 0x00000000, 18976 }, /* TST */ -{ op_4a28_0_comp_nf, 0x00000002, 18984 }, /* TST */ -{ op_4a30_0_comp_nf, 0x00000002, 18992 }, /* TST */ -{ op_4a38_0_comp_nf, 0x00000002, 19000 }, /* TST */ -{ op_4a39_0_comp_nf, 0x00000002, 19001 }, /* TST */ -{ op_4a3a_0_comp_nf, 0x00000002, 19002 }, /* TST */ -{ op_4a3b_0_comp_nf, 0x00000002, 19003 }, /* TST */ -{ op_4a3c_0_comp_nf, 0x00000002, 19004 }, /* TST */ -{ op_4a40_0_comp_nf, 0x00000000, 19008 }, /* TST */ -{ op_4a48_0_comp_nf, 0x00000000, 19016 }, /* TST */ -{ op_4a50_0_comp_nf, 0x00000000, 19024 }, /* TST */ -{ op_4a58_0_comp_nf, 0x00000000, 19032 }, /* TST */ -{ op_4a60_0_comp_nf, 0x00000000, 19040 }, /* TST */ -{ op_4a68_0_comp_nf, 0x00000002, 19048 }, /* TST */ -{ op_4a70_0_comp_nf, 0x00000002, 19056 }, /* TST */ -{ op_4a78_0_comp_nf, 0x00000002, 19064 }, /* TST */ -{ op_4a79_0_comp_nf, 0x00000002, 19065 }, /* TST */ -{ op_4a7a_0_comp_nf, 0x00000002, 19066 }, /* TST */ -{ op_4a7b_0_comp_nf, 0x00000002, 19067 }, /* TST */ -{ op_4a7c_0_comp_nf, 0x00000002, 19068 }, /* TST */ -{ op_4a80_0_comp_nf, 0x00000000, 19072 }, /* TST */ -{ op_4a88_0_comp_nf, 0x00000000, 19080 }, /* TST */ -{ op_4a90_0_comp_nf, 0x00000000, 19088 }, /* TST */ -{ op_4a98_0_comp_nf, 0x00000000, 19096 }, /* TST */ -{ op_4aa0_0_comp_nf, 0x00000000, 19104 }, /* TST */ -{ op_4aa8_0_comp_nf, 0x00000002, 19112 }, /* TST */ -{ op_4ab0_0_comp_nf, 0x00000002, 19120 }, /* TST */ -{ op_4ab8_0_comp_nf, 0x00000002, 19128 }, /* TST */ -{ op_4ab9_0_comp_nf, 0x00000002, 19129 }, /* TST */ -{ op_4aba_0_comp_nf, 0x00000002, 19130 }, /* TST */ -{ op_4abb_0_comp_nf, 0x00000002, 19131 }, /* TST */ -{ op_4abc_0_comp_nf, 0x00000002, 19132 }, /* TST */ -{ NULL, 0x00000000, 19136 }, /* TAS */ -{ NULL, 0x00000000, 19152 }, /* TAS */ -{ NULL, 0x00000000, 19160 }, /* TAS */ -{ NULL, 0x00000000, 19168 }, /* TAS */ -{ NULL, 0x00000000, 19176 }, /* TAS */ -{ NULL, 0x00000000, 19184 }, /* TAS */ -{ NULL, 0x00000000, 19192 }, /* TAS */ -{ NULL, 0x00000000, 19193 }, /* TAS */ -{ op_4c00_0_comp_nf, 0x00000002, 19456 }, /* MULL */ -{ op_4c10_0_comp_nf, 0x00000002, 19472 }, /* MULL */ -{ op_4c18_0_comp_nf, 0x00000002, 19480 }, /* MULL */ -{ op_4c20_0_comp_nf, 0x00000002, 19488 }, /* MULL */ -{ op_4c28_0_comp_nf, 0x00000002, 19496 }, /* MULL */ -{ op_4c30_0_comp_nf, 0x00000002, 19504 }, /* MULL */ -{ op_4c38_0_comp_nf, 0x00000002, 19512 }, /* MULL */ -{ op_4c39_0_comp_nf, 0x00000002, 19513 }, /* MULL */ -{ op_4c3a_0_comp_nf, 0x00000002, 19514 }, /* MULL */ -{ op_4c3b_0_comp_nf, 0x00000002, 19515 }, /* MULL */ -{ op_4c3c_0_comp_nf, 0x00000002, 19516 }, /* MULL */ -{ op_4c40_0_comp_nf, 0x00000002, 19520 }, /* DIVL */ -{ op_4c50_0_comp_nf, 0x00000002, 19536 }, /* DIVL */ -{ op_4c58_0_comp_nf, 0x00000002, 19544 }, /* DIVL */ -{ op_4c60_0_comp_nf, 0x00000002, 19552 }, /* DIVL */ -{ op_4c68_0_comp_nf, 0x00000002, 19560 }, /* DIVL */ -{ op_4c70_0_comp_nf, 0x00000002, 19568 }, /* DIVL */ -{ op_4c78_0_comp_nf, 0x00000002, 19576 }, /* DIVL */ -{ op_4c79_0_comp_nf, 0x00000002, 19577 }, /* DIVL */ -{ op_4c7a_0_comp_nf, 0x00000002, 19578 }, /* DIVL */ -{ op_4c7b_0_comp_nf, 0x00000002, 19579 }, /* DIVL */ -{ op_4c7c_0_comp_nf, 0x00000002, 19580 }, /* DIVL */ -{ op_4c90_0_comp_nf, 0x00000002, 19600 }, /* MVMEL */ -{ op_4c98_0_comp_nf, 0x00000002, 19608 }, /* MVMEL */ -{ op_4ca8_0_comp_nf, 0x00000002, 19624 }, /* MVMEL */ -{ op_4cb0_0_comp_nf, 0x00000002, 19632 }, /* MVMEL */ -{ op_4cb8_0_comp_nf, 0x00000002, 19640 }, /* MVMEL */ -{ op_4cb9_0_comp_nf, 0x00000002, 19641 }, /* MVMEL */ -{ op_4cba_0_comp_nf, 0x00000002, 19642 }, /* MVMEL */ -{ op_4cbb_0_comp_nf, 0x00000002, 19643 }, /* MVMEL */ -{ op_4cd0_0_comp_nf, 0x00000002, 19664 }, /* MVMEL */ -{ op_4cd8_0_comp_nf, 0x00000002, 19672 }, /* MVMEL */ -{ op_4ce8_0_comp_nf, 0x00000002, 19688 }, /* MVMEL */ -{ op_4cf0_0_comp_nf, 0x00000002, 19696 }, /* MVMEL */ -{ op_4cf8_0_comp_nf, 0x00000002, 19704 }, /* MVMEL */ -{ op_4cf9_0_comp_nf, 0x00000002, 19705 }, /* MVMEL */ -{ op_4cfa_0_comp_nf, 0x00000002, 19706 }, /* MVMEL */ -{ op_4cfb_0_comp_nf, 0x00000002, 19707 }, /* MVMEL */ -{ NULL, 0x00000001, 20032 }, /* TRAP */ -{ op_4e50_0_comp_nf, 0x00000002, 20048 }, /* LINK */ -{ op_4e58_0_comp_nf, 0x00000000, 20056 }, /* UNLK */ -{ NULL, 0x00000001, 20064 }, /* MVR2USP */ -{ NULL, 0x00000001, 20072 }, /* MVUSP2R */ -{ NULL, 0x00000001, 20080 }, /* RESET */ -{ op_4e71_0_comp_nf, 0x00000000, 20081 }, /* NOP */ -{ NULL, 0x00000001, 20082 }, /* STOP */ -{ NULL, 0x00000001, 20083 }, /* RTE */ -{ op_4e74_0_comp_nf, 0x00000003, 20084 }, /* RTD */ -{ op_4e75_0_comp_nf, 0x00000001, 20085 }, /* RTS */ -{ NULL, 0x00000001, 20086 }, /* TRAPV */ -{ NULL, 0x00000001, 20087 }, /* RTR */ -{ NULL, 0x00000001, 20090 }, /* MOVEC2 */ -{ NULL, 0x00000001, 20091 }, /* MOVE2C */ -{ op_4e90_0_comp_nf, 0x00000001, 20112 }, /* JSR */ -{ op_4ea8_0_comp_nf, 0x00000003, 20136 }, /* JSR */ -{ op_4eb0_0_comp_nf, 0x00000003, 20144 }, /* JSR */ -{ op_4eb8_0_comp_nf, 0x00000003, 20152 }, /* JSR */ -{ op_4eb9_0_comp_nf, 0x00000003, 20153 }, /* JSR */ -{ op_4eba_0_comp_nf, 0x00000003, 20154 }, /* JSR */ -{ op_4ebb_0_comp_nf, 0x00000003, 20155 }, /* JSR */ -{ op_4ed0_0_comp_nf, 0x00000001, 20176 }, /* JMP */ -{ op_4ee8_0_comp_nf, 0x00000003, 20200 }, /* JMP */ -{ op_4ef0_0_comp_nf, 0x00000003, 20208 }, /* JMP */ -{ op_4ef8_0_comp_nf, 0x00000003, 20216 }, /* JMP */ -{ op_4ef9_0_comp_nf, 0x00000003, 20217 }, /* JMP */ -{ op_4efa_0_comp_nf, 0x00000003, 20218 }, /* JMP */ -{ op_4efb_0_comp_nf, 0x00000003, 20219 }, /* JMP */ -{ op_5000_0_comp_nf, 0x00000000, 20480 }, /* ADD */ -{ op_5010_0_comp_nf, 0x00000000, 20496 }, /* ADD */ -{ op_5018_0_comp_nf, 0x00000000, 20504 }, /* ADD */ -{ op_5020_0_comp_nf, 0x00000000, 20512 }, /* ADD */ -{ op_5028_0_comp_nf, 0x00000002, 20520 }, /* ADD */ -{ op_5030_0_comp_nf, 0x00000002, 20528 }, /* ADD */ -{ op_5038_0_comp_nf, 0x00000002, 20536 }, /* ADD */ -{ op_5039_0_comp_nf, 0x00000002, 20537 }, /* ADD */ -{ op_5040_0_comp_nf, 0x00000000, 20544 }, /* ADD */ -{ op_5048_0_comp_nf, 0x00000000, 20552 }, /* ADDA */ -{ op_5050_0_comp_nf, 0x00000000, 20560 }, /* ADD */ -{ op_5058_0_comp_nf, 0x00000000, 20568 }, /* ADD */ -{ op_5060_0_comp_nf, 0x00000000, 20576 }, /* ADD */ -{ op_5068_0_comp_nf, 0x00000002, 20584 }, /* ADD */ -{ op_5070_0_comp_nf, 0x00000002, 20592 }, /* ADD */ -{ op_5078_0_comp_nf, 0x00000002, 20600 }, /* ADD */ -{ op_5079_0_comp_nf, 0x00000002, 20601 }, /* ADD */ -{ op_5080_0_comp_nf, 0x00000000, 20608 }, /* ADD */ -{ op_5088_0_comp_nf, 0x00000000, 20616 }, /* ADDA */ -{ op_5090_0_comp_nf, 0x00000000, 20624 }, /* ADD */ -{ op_5098_0_comp_nf, 0x00000000, 20632 }, /* ADD */ -{ op_50a0_0_comp_nf, 0x00000000, 20640 }, /* ADD */ -{ op_50a8_0_comp_nf, 0x00000002, 20648 }, /* ADD */ -{ op_50b0_0_comp_nf, 0x00000002, 20656 }, /* ADD */ -{ op_50b8_0_comp_nf, 0x00000002, 20664 }, /* ADD */ -{ op_50b9_0_comp_nf, 0x00000002, 20665 }, /* ADD */ -{ op_50c0_0_comp_nf, 0x00000000, 20672 }, /* Scc */ -{ op_50c8_0_comp_nf, 0x00000003, 20680 }, /* DBcc */ -{ op_50d0_0_comp_nf, 0x00000000, 20688 }, /* Scc */ -{ op_50d8_0_comp_nf, 0x00000000, 20696 }, /* Scc */ -{ op_50e0_0_comp_nf, 0x00000000, 20704 }, /* Scc */ -{ op_50e8_0_comp_nf, 0x00000002, 20712 }, /* Scc */ -{ op_50f0_0_comp_nf, 0x00000002, 20720 }, /* Scc */ -{ op_50f8_0_comp_nf, 0x00000002, 20728 }, /* Scc */ -{ op_50f9_0_comp_nf, 0x00000002, 20729 }, /* Scc */ -{ NULL, 0x00000001, 20730 }, /* TRAPcc */ -{ NULL, 0x00000001, 20731 }, /* TRAPcc */ -{ NULL, 0x00000001, 20732 }, /* TRAPcc */ -{ op_5100_0_comp_nf, 0x00000000, 20736 }, /* SUB */ -{ op_5110_0_comp_nf, 0x00000000, 20752 }, /* SUB */ -{ op_5118_0_comp_nf, 0x00000000, 20760 }, /* SUB */ -{ op_5120_0_comp_nf, 0x00000000, 20768 }, /* SUB */ -{ op_5128_0_comp_nf, 0x00000002, 20776 }, /* SUB */ -{ op_5130_0_comp_nf, 0x00000002, 20784 }, /* SUB */ -{ op_5138_0_comp_nf, 0x00000002, 20792 }, /* SUB */ -{ op_5139_0_comp_nf, 0x00000002, 20793 }, /* SUB */ -{ op_5140_0_comp_nf, 0x00000000, 20800 }, /* SUB */ -{ op_5148_0_comp_nf, 0x00000000, 20808 }, /* SUBA */ -{ op_5150_0_comp_nf, 0x00000000, 20816 }, /* SUB */ -{ op_5158_0_comp_nf, 0x00000000, 20824 }, /* SUB */ -{ op_5160_0_comp_nf, 0x00000000, 20832 }, /* SUB */ -{ op_5168_0_comp_nf, 0x00000002, 20840 }, /* SUB */ -{ op_5170_0_comp_nf, 0x00000002, 20848 }, /* SUB */ -{ op_5178_0_comp_nf, 0x00000002, 20856 }, /* SUB */ -{ op_5179_0_comp_nf, 0x00000002, 20857 }, /* SUB */ -{ op_5180_0_comp_nf, 0x00000000, 20864 }, /* SUB */ -{ op_5188_0_comp_nf, 0x00000000, 20872 }, /* SUBA */ -{ op_5190_0_comp_nf, 0x00000000, 20880 }, /* SUB */ -{ op_5198_0_comp_nf, 0x00000000, 20888 }, /* SUB */ -{ op_51a0_0_comp_nf, 0x00000000, 20896 }, /* SUB */ -{ op_51a8_0_comp_nf, 0x00000002, 20904 }, /* SUB */ -{ op_51b0_0_comp_nf, 0x00000002, 20912 }, /* SUB */ -{ op_51b8_0_comp_nf, 0x00000002, 20920 }, /* SUB */ -{ op_51b9_0_comp_nf, 0x00000002, 20921 }, /* SUB */ -{ op_51c0_0_comp_nf, 0x00000000, 20928 }, /* Scc */ -{ op_51c8_0_comp_nf, 0x00000003, 20936 }, /* DBcc */ -{ op_51d0_0_comp_nf, 0x00000000, 20944 }, /* Scc */ -{ op_51d8_0_comp_nf, 0x00000000, 20952 }, /* Scc */ -{ op_51e0_0_comp_nf, 0x00000000, 20960 }, /* Scc */ -{ op_51e8_0_comp_nf, 0x00000002, 20968 }, /* Scc */ -{ op_51f0_0_comp_nf, 0x00000002, 20976 }, /* Scc */ -{ op_51f8_0_comp_nf, 0x00000002, 20984 }, /* Scc */ -{ op_51f9_0_comp_nf, 0x00000002, 20985 }, /* Scc */ -{ NULL, 0x00000001, 20986 }, /* TRAPcc */ -{ NULL, 0x00000001, 20987 }, /* TRAPcc */ -{ NULL, 0x00000001, 20988 }, /* TRAPcc */ -{ op_52c0_0_comp_nf, 0x00000000, 21184 }, /* Scc */ -{ op_52c8_0_comp_nf, 0x00000003, 21192 }, /* DBcc */ -{ op_52d0_0_comp_nf, 0x00000000, 21200 }, /* Scc */ -{ op_52d8_0_comp_nf, 0x00000000, 21208 }, /* Scc */ -{ op_52e0_0_comp_nf, 0x00000000, 21216 }, /* Scc */ -{ op_52e8_0_comp_nf, 0x00000002, 21224 }, /* Scc */ -{ op_52f0_0_comp_nf, 0x00000002, 21232 }, /* Scc */ -{ op_52f8_0_comp_nf, 0x00000002, 21240 }, /* Scc */ -{ op_52f9_0_comp_nf, 0x00000002, 21241 }, /* Scc */ -{ NULL, 0x00000001, 21242 }, /* TRAPcc */ -{ NULL, 0x00000001, 21243 }, /* TRAPcc */ -{ NULL, 0x00000001, 21244 }, /* TRAPcc */ -{ op_53c0_0_comp_nf, 0x00000000, 21440 }, /* Scc */ -{ op_53c8_0_comp_nf, 0x00000003, 21448 }, /* DBcc */ -{ op_53d0_0_comp_nf, 0x00000000, 21456 }, /* Scc */ -{ op_53d8_0_comp_nf, 0x00000000, 21464 }, /* Scc */ -{ op_53e0_0_comp_nf, 0x00000000, 21472 }, /* Scc */ -{ op_53e8_0_comp_nf, 0x00000002, 21480 }, /* Scc */ -{ op_53f0_0_comp_nf, 0x00000002, 21488 }, /* Scc */ -{ op_53f8_0_comp_nf, 0x00000002, 21496 }, /* Scc */ -{ op_53f9_0_comp_nf, 0x00000002, 21497 }, /* Scc */ -{ NULL, 0x00000001, 21498 }, /* TRAPcc */ -{ NULL, 0x00000001, 21499 }, /* TRAPcc */ -{ NULL, 0x00000001, 21500 }, /* TRAPcc */ -{ op_54c0_0_comp_nf, 0x00000000, 21696 }, /* Scc */ -{ op_54c8_0_comp_nf, 0x00000003, 21704 }, /* DBcc */ -{ op_54d0_0_comp_nf, 0x00000000, 21712 }, /* Scc */ -{ op_54d8_0_comp_nf, 0x00000000, 21720 }, /* Scc */ -{ op_54e0_0_comp_nf, 0x00000000, 21728 }, /* Scc */ -{ op_54e8_0_comp_nf, 0x00000002, 21736 }, /* Scc */ -{ op_54f0_0_comp_nf, 0x00000002, 21744 }, /* Scc */ -{ op_54f8_0_comp_nf, 0x00000002, 21752 }, /* Scc */ -{ op_54f9_0_comp_nf, 0x00000002, 21753 }, /* Scc */ -{ NULL, 0x00000001, 21754 }, /* TRAPcc */ -{ NULL, 0x00000001, 21755 }, /* TRAPcc */ -{ NULL, 0x00000001, 21756 }, /* TRAPcc */ -{ op_55c0_0_comp_nf, 0x00000000, 21952 }, /* Scc */ -{ op_55c8_0_comp_nf, 0x00000003, 21960 }, /* DBcc */ -{ op_55d0_0_comp_nf, 0x00000000, 21968 }, /* Scc */ -{ op_55d8_0_comp_nf, 0x00000000, 21976 }, /* Scc */ -{ op_55e0_0_comp_nf, 0x00000000, 21984 }, /* Scc */ -{ op_55e8_0_comp_nf, 0x00000002, 21992 }, /* Scc */ -{ op_55f0_0_comp_nf, 0x00000002, 22000 }, /* Scc */ -{ op_55f8_0_comp_nf, 0x00000002, 22008 }, /* Scc */ -{ op_55f9_0_comp_nf, 0x00000002, 22009 }, /* Scc */ -{ NULL, 0x00000001, 22010 }, /* TRAPcc */ -{ NULL, 0x00000001, 22011 }, /* TRAPcc */ -{ NULL, 0x00000001, 22012 }, /* TRAPcc */ -{ op_56c0_0_comp_nf, 0x00000000, 22208 }, /* Scc */ -{ op_56c8_0_comp_nf, 0x00000003, 22216 }, /* DBcc */ -{ op_56d0_0_comp_nf, 0x00000000, 22224 }, /* Scc */ -{ op_56d8_0_comp_nf, 0x00000000, 22232 }, /* Scc */ -{ op_56e0_0_comp_nf, 0x00000000, 22240 }, /* Scc */ -{ op_56e8_0_comp_nf, 0x00000002, 22248 }, /* Scc */ -{ op_56f0_0_comp_nf, 0x00000002, 22256 }, /* Scc */ -{ op_56f8_0_comp_nf, 0x00000002, 22264 }, /* Scc */ -{ op_56f9_0_comp_nf, 0x00000002, 22265 }, /* Scc */ -{ NULL, 0x00000001, 22266 }, /* TRAPcc */ -{ NULL, 0x00000001, 22267 }, /* TRAPcc */ -{ NULL, 0x00000001, 22268 }, /* TRAPcc */ -{ op_57c0_0_comp_nf, 0x00000000, 22464 }, /* Scc */ -{ op_57c8_0_comp_nf, 0x00000003, 22472 }, /* DBcc */ -{ op_57d0_0_comp_nf, 0x00000000, 22480 }, /* Scc */ -{ op_57d8_0_comp_nf, 0x00000000, 22488 }, /* Scc */ -{ op_57e0_0_comp_nf, 0x00000000, 22496 }, /* Scc */ -{ op_57e8_0_comp_nf, 0x00000002, 22504 }, /* Scc */ -{ op_57f0_0_comp_nf, 0x00000002, 22512 }, /* Scc */ -{ op_57f8_0_comp_nf, 0x00000002, 22520 }, /* Scc */ -{ op_57f9_0_comp_nf, 0x00000002, 22521 }, /* Scc */ -{ NULL, 0x00000001, 22522 }, /* TRAPcc */ -{ NULL, 0x00000001, 22523 }, /* TRAPcc */ -{ NULL, 0x00000001, 22524 }, /* TRAPcc */ -{ op_58c0_0_comp_nf, 0x00000000, 22720 }, /* Scc */ -{ op_58c8_0_comp_nf, 0x00000003, 22728 }, /* DBcc */ -{ op_58d0_0_comp_nf, 0x00000000, 22736 }, /* Scc */ -{ op_58d8_0_comp_nf, 0x00000000, 22744 }, /* Scc */ -{ op_58e0_0_comp_nf, 0x00000000, 22752 }, /* Scc */ -{ op_58e8_0_comp_nf, 0x00000002, 22760 }, /* Scc */ -{ op_58f0_0_comp_nf, 0x00000002, 22768 }, /* Scc */ -{ op_58f8_0_comp_nf, 0x00000002, 22776 }, /* Scc */ -{ op_58f9_0_comp_nf, 0x00000002, 22777 }, /* Scc */ -{ NULL, 0x00000001, 22778 }, /* TRAPcc */ -{ NULL, 0x00000001, 22779 }, /* TRAPcc */ -{ NULL, 0x00000001, 22780 }, /* TRAPcc */ -{ op_59c0_0_comp_nf, 0x00000000, 22976 }, /* Scc */ -{ op_59c8_0_comp_nf, 0x00000003, 22984 }, /* DBcc */ -{ op_59d0_0_comp_nf, 0x00000000, 22992 }, /* Scc */ -{ op_59d8_0_comp_nf, 0x00000000, 23000 }, /* Scc */ -{ op_59e0_0_comp_nf, 0x00000000, 23008 }, /* Scc */ -{ op_59e8_0_comp_nf, 0x00000002, 23016 }, /* Scc */ -{ op_59f0_0_comp_nf, 0x00000002, 23024 }, /* Scc */ -{ op_59f8_0_comp_nf, 0x00000002, 23032 }, /* Scc */ -{ op_59f9_0_comp_nf, 0x00000002, 23033 }, /* Scc */ -{ NULL, 0x00000001, 23034 }, /* TRAPcc */ -{ NULL, 0x00000001, 23035 }, /* TRAPcc */ -{ NULL, 0x00000001, 23036 }, /* TRAPcc */ -{ op_5ac0_0_comp_nf, 0x00000000, 23232 }, /* Scc */ -{ op_5ac8_0_comp_nf, 0x00000003, 23240 }, /* DBcc */ -{ op_5ad0_0_comp_nf, 0x00000000, 23248 }, /* Scc */ -{ op_5ad8_0_comp_nf, 0x00000000, 23256 }, /* Scc */ -{ op_5ae0_0_comp_nf, 0x00000000, 23264 }, /* Scc */ -{ op_5ae8_0_comp_nf, 0x00000002, 23272 }, /* Scc */ -{ op_5af0_0_comp_nf, 0x00000002, 23280 }, /* Scc */ -{ op_5af8_0_comp_nf, 0x00000002, 23288 }, /* Scc */ -{ op_5af9_0_comp_nf, 0x00000002, 23289 }, /* Scc */ -{ NULL, 0x00000001, 23290 }, /* TRAPcc */ -{ NULL, 0x00000001, 23291 }, /* TRAPcc */ -{ NULL, 0x00000001, 23292 }, /* TRAPcc */ -{ op_5bc0_0_comp_nf, 0x00000000, 23488 }, /* Scc */ -{ op_5bc8_0_comp_nf, 0x00000003, 23496 }, /* DBcc */ -{ op_5bd0_0_comp_nf, 0x00000000, 23504 }, /* Scc */ -{ op_5bd8_0_comp_nf, 0x00000000, 23512 }, /* Scc */ -{ op_5be0_0_comp_nf, 0x00000000, 23520 }, /* Scc */ -{ op_5be8_0_comp_nf, 0x00000002, 23528 }, /* Scc */ -{ op_5bf0_0_comp_nf, 0x00000002, 23536 }, /* Scc */ -{ op_5bf8_0_comp_nf, 0x00000002, 23544 }, /* Scc */ -{ op_5bf9_0_comp_nf, 0x00000002, 23545 }, /* Scc */ -{ NULL, 0x00000001, 23546 }, /* TRAPcc */ -{ NULL, 0x00000001, 23547 }, /* TRAPcc */ -{ NULL, 0x00000001, 23548 }, /* TRAPcc */ -{ op_5cc0_0_comp_nf, 0x00000000, 23744 }, /* Scc */ -{ op_5cc8_0_comp_nf, 0x00000003, 23752 }, /* DBcc */ -{ op_5cd0_0_comp_nf, 0x00000000, 23760 }, /* Scc */ -{ op_5cd8_0_comp_nf, 0x00000000, 23768 }, /* Scc */ -{ op_5ce0_0_comp_nf, 0x00000000, 23776 }, /* Scc */ -{ op_5ce8_0_comp_nf, 0x00000002, 23784 }, /* Scc */ -{ op_5cf0_0_comp_nf, 0x00000002, 23792 }, /* Scc */ -{ op_5cf8_0_comp_nf, 0x00000002, 23800 }, /* Scc */ -{ op_5cf9_0_comp_nf, 0x00000002, 23801 }, /* Scc */ -{ NULL, 0x00000001, 23802 }, /* TRAPcc */ -{ NULL, 0x00000001, 23803 }, /* TRAPcc */ -{ NULL, 0x00000001, 23804 }, /* TRAPcc */ -{ op_5dc0_0_comp_nf, 0x00000000, 24000 }, /* Scc */ -{ op_5dc8_0_comp_nf, 0x00000003, 24008 }, /* DBcc */ -{ op_5dd0_0_comp_nf, 0x00000000, 24016 }, /* Scc */ -{ op_5dd8_0_comp_nf, 0x00000000, 24024 }, /* Scc */ -{ op_5de0_0_comp_nf, 0x00000000, 24032 }, /* Scc */ -{ op_5de8_0_comp_nf, 0x00000002, 24040 }, /* Scc */ -{ op_5df0_0_comp_nf, 0x00000002, 24048 }, /* Scc */ -{ op_5df8_0_comp_nf, 0x00000002, 24056 }, /* Scc */ -{ op_5df9_0_comp_nf, 0x00000002, 24057 }, /* Scc */ -{ NULL, 0x00000001, 24058 }, /* TRAPcc */ -{ NULL, 0x00000001, 24059 }, /* TRAPcc */ -{ NULL, 0x00000001, 24060 }, /* TRAPcc */ -{ op_5ec0_0_comp_nf, 0x00000000, 24256 }, /* Scc */ -{ op_5ec8_0_comp_nf, 0x00000003, 24264 }, /* DBcc */ -{ op_5ed0_0_comp_nf, 0x00000000, 24272 }, /* Scc */ -{ op_5ed8_0_comp_nf, 0x00000000, 24280 }, /* Scc */ -{ op_5ee0_0_comp_nf, 0x00000000, 24288 }, /* Scc */ -{ op_5ee8_0_comp_nf, 0x00000002, 24296 }, /* Scc */ -{ op_5ef0_0_comp_nf, 0x00000002, 24304 }, /* Scc */ -{ op_5ef8_0_comp_nf, 0x00000002, 24312 }, /* Scc */ -{ op_5ef9_0_comp_nf, 0x00000002, 24313 }, /* Scc */ -{ NULL, 0x00000001, 24314 }, /* TRAPcc */ -{ NULL, 0x00000001, 24315 }, /* TRAPcc */ -{ NULL, 0x00000001, 24316 }, /* TRAPcc */ -{ op_5fc0_0_comp_nf, 0x00000000, 24512 }, /* Scc */ -{ op_5fc8_0_comp_nf, 0x00000003, 24520 }, /* DBcc */ -{ op_5fd0_0_comp_nf, 0x00000000, 24528 }, /* Scc */ -{ op_5fd8_0_comp_nf, 0x00000000, 24536 }, /* Scc */ -{ op_5fe0_0_comp_nf, 0x00000000, 24544 }, /* Scc */ -{ op_5fe8_0_comp_nf, 0x00000002, 24552 }, /* Scc */ -{ op_5ff0_0_comp_nf, 0x00000002, 24560 }, /* Scc */ -{ op_5ff8_0_comp_nf, 0x00000002, 24568 }, /* Scc */ -{ op_5ff9_0_comp_nf, 0x00000002, 24569 }, /* Scc */ -{ NULL, 0x00000001, 24570 }, /* TRAPcc */ -{ NULL, 0x00000001, 24571 }, /* TRAPcc */ -{ NULL, 0x00000001, 24572 }, /* TRAPcc */ -{ op_6000_0_comp_nf, 0x00000012, 24576 }, /* Bcc */ -{ op_6001_0_comp_nf, 0x00000010, 24577 }, /* Bcc */ -{ op_60ff_0_comp_nf, 0x00000012, 24831 }, /* Bcc */ -{ op_6100_0_comp_nf, 0x00000012, 24832 }, /* BSR */ -{ op_6101_0_comp_nf, 0x00000010, 24833 }, /* BSR */ -{ op_61ff_0_comp_nf, 0x00000012, 25087 }, /* BSR */ -{ op_6200_0_comp_nf, 0x00000003, 25088 }, /* Bcc */ -{ op_6201_0_comp_nf, 0x00000001, 25089 }, /* Bcc */ -{ op_62ff_0_comp_nf, 0x00000003, 25343 }, /* Bcc */ -{ op_6300_0_comp_nf, 0x00000003, 25344 }, /* Bcc */ -{ op_6301_0_comp_nf, 0x00000001, 25345 }, /* Bcc */ -{ op_63ff_0_comp_nf, 0x00000003, 25599 }, /* Bcc */ -{ op_6400_0_comp_nf, 0x00000003, 25600 }, /* Bcc */ -{ op_6401_0_comp_nf, 0x00000001, 25601 }, /* Bcc */ -{ op_64ff_0_comp_nf, 0x00000003, 25855 }, /* Bcc */ -{ op_6500_0_comp_nf, 0x00000003, 25856 }, /* Bcc */ -{ op_6501_0_comp_nf, 0x00000001, 25857 }, /* Bcc */ -{ op_65ff_0_comp_nf, 0x00000003, 26111 }, /* Bcc */ -{ op_6600_0_comp_nf, 0x00000003, 26112 }, /* Bcc */ -{ op_6601_0_comp_nf, 0x00000001, 26113 }, /* Bcc */ -{ op_66ff_0_comp_nf, 0x00000003, 26367 }, /* Bcc */ -{ op_6700_0_comp_nf, 0x00000003, 26368 }, /* Bcc */ -{ op_6701_0_comp_nf, 0x00000001, 26369 }, /* Bcc */ -{ op_67ff_0_comp_nf, 0x00000003, 26623 }, /* Bcc */ -{ op_6800_0_comp_nf, 0x00000003, 26624 }, /* Bcc */ -{ op_6801_0_comp_nf, 0x00000001, 26625 }, /* Bcc */ -{ op_68ff_0_comp_nf, 0x00000003, 26879 }, /* Bcc */ -{ op_6900_0_comp_nf, 0x00000003, 26880 }, /* Bcc */ -{ op_6901_0_comp_nf, 0x00000001, 26881 }, /* Bcc */ -{ op_69ff_0_comp_nf, 0x00000003, 27135 }, /* Bcc */ -{ op_6a00_0_comp_nf, 0x00000003, 27136 }, /* Bcc */ -{ op_6a01_0_comp_nf, 0x00000001, 27137 }, /* Bcc */ -{ op_6aff_0_comp_nf, 0x00000003, 27391 }, /* Bcc */ -{ op_6b00_0_comp_nf, 0x00000003, 27392 }, /* Bcc */ -{ op_6b01_0_comp_nf, 0x00000001, 27393 }, /* Bcc */ -{ op_6bff_0_comp_nf, 0x00000003, 27647 }, /* Bcc */ -{ op_6c00_0_comp_nf, 0x00000003, 27648 }, /* Bcc */ -{ op_6c01_0_comp_nf, 0x00000001, 27649 }, /* Bcc */ -{ op_6cff_0_comp_nf, 0x00000003, 27903 }, /* Bcc */ -{ op_6d00_0_comp_nf, 0x00000003, 27904 }, /* Bcc */ -{ op_6d01_0_comp_nf, 0x00000001, 27905 }, /* Bcc */ -{ op_6dff_0_comp_nf, 0x00000003, 28159 }, /* Bcc */ -{ op_6e00_0_comp_nf, 0x00000003, 28160 }, /* Bcc */ -{ op_6e01_0_comp_nf, 0x00000001, 28161 }, /* Bcc */ -{ op_6eff_0_comp_nf, 0x00000003, 28415 }, /* Bcc */ -{ op_6f00_0_comp_nf, 0x00000003, 28416 }, /* Bcc */ -{ op_6f01_0_comp_nf, 0x00000001, 28417 }, /* Bcc */ -{ op_6fff_0_comp_nf, 0x00000003, 28671 }, /* Bcc */ -{ op_7000_0_comp_nf, 0x00000000, 28672 }, /* MOVE */ -{ op_8000_0_comp_nf, 0x00000000, 32768 }, /* OR */ -{ op_8010_0_comp_nf, 0x00000000, 32784 }, /* OR */ -{ op_8018_0_comp_nf, 0x00000000, 32792 }, /* OR */ -{ op_8020_0_comp_nf, 0x00000000, 32800 }, /* OR */ -{ op_8028_0_comp_nf, 0x00000002, 32808 }, /* OR */ -{ op_8030_0_comp_nf, 0x00000002, 32816 }, /* OR */ -{ op_8038_0_comp_nf, 0x00000002, 32824 }, /* OR */ -{ op_8039_0_comp_nf, 0x00000002, 32825 }, /* OR */ -{ op_803a_0_comp_nf, 0x00000002, 32826 }, /* OR */ -{ op_803b_0_comp_nf, 0x00000002, 32827 }, /* OR */ -{ op_803c_0_comp_nf, 0x00000002, 32828 }, /* OR */ -{ op_8040_0_comp_nf, 0x00000000, 32832 }, /* OR */ -{ op_8050_0_comp_nf, 0x00000000, 32848 }, /* OR */ -{ op_8058_0_comp_nf, 0x00000000, 32856 }, /* OR */ -{ op_8060_0_comp_nf, 0x00000000, 32864 }, /* OR */ -{ op_8068_0_comp_nf, 0x00000002, 32872 }, /* OR */ -{ op_8070_0_comp_nf, 0x00000002, 32880 }, /* OR */ -{ op_8078_0_comp_nf, 0x00000002, 32888 }, /* OR */ -{ op_8079_0_comp_nf, 0x00000002, 32889 }, /* OR */ -{ op_807a_0_comp_nf, 0x00000002, 32890 }, /* OR */ -{ op_807b_0_comp_nf, 0x00000002, 32891 }, /* OR */ -{ op_807c_0_comp_nf, 0x00000002, 32892 }, /* OR */ -{ op_8080_0_comp_nf, 0x00000000, 32896 }, /* OR */ -{ op_8090_0_comp_nf, 0x00000000, 32912 }, /* OR */ -{ op_8098_0_comp_nf, 0x00000000, 32920 }, /* OR */ -{ op_80a0_0_comp_nf, 0x00000000, 32928 }, /* OR */ -{ op_80a8_0_comp_nf, 0x00000002, 32936 }, /* OR */ -{ op_80b0_0_comp_nf, 0x00000002, 32944 }, /* OR */ -{ op_80b8_0_comp_nf, 0x00000002, 32952 }, /* OR */ -{ op_80b9_0_comp_nf, 0x00000002, 32953 }, /* OR */ -{ op_80ba_0_comp_nf, 0x00000002, 32954 }, /* OR */ -{ op_80bb_0_comp_nf, 0x00000002, 32955 }, /* OR */ -{ op_80bc_0_comp_nf, 0x00000002, 32956 }, /* OR */ -{ op_80c0_0_comp_nf, 0x00000000, 32960 }, /* DIVU */ -{ op_80d0_0_comp_nf, 0x00000000, 32976 }, /* DIVU */ -{ op_80d8_0_comp_nf, 0x00000000, 32984 }, /* DIVU */ -{ op_80e0_0_comp_nf, 0x00000000, 32992 }, /* DIVU */ -{ op_80e8_0_comp_nf, 0x00000002, 33000 }, /* DIVU */ -{ op_80f0_0_comp_nf, 0x00000002, 33008 }, /* DIVU */ -{ op_80f8_0_comp_nf, 0x00000002, 33016 }, /* DIVU */ -{ op_80f9_0_comp_nf, 0x00000002, 33017 }, /* DIVU */ -{ op_80fa_0_comp_nf, 0x00000002, 33018 }, /* DIVU */ -{ op_80fb_0_comp_nf, 0x00000002, 33019 }, /* DIVU */ -{ op_80fc_0_comp_nf, 0x00000002, 33020 }, /* DIVU */ -{ NULL, 0x00000000, 33024 }, /* SBCD */ -{ NULL, 0x00000000, 33032 }, /* SBCD */ -{ op_8110_0_comp_nf, 0x00000000, 33040 }, /* OR */ -{ op_8118_0_comp_nf, 0x00000000, 33048 }, /* OR */ -{ op_8120_0_comp_nf, 0x00000000, 33056 }, /* OR */ -{ op_8128_0_comp_nf, 0x00000002, 33064 }, /* OR */ -{ op_8130_0_comp_nf, 0x00000002, 33072 }, /* OR */ -{ op_8138_0_comp_nf, 0x00000002, 33080 }, /* OR */ -{ op_8139_0_comp_nf, 0x00000002, 33081 }, /* OR */ -{ NULL, 0x00000000, 33088 }, /* PACK */ -{ NULL, 0x00000000, 33096 }, /* PACK */ -{ op_8150_0_comp_nf, 0x00000000, 33104 }, /* OR */ -{ op_8158_0_comp_nf, 0x00000000, 33112 }, /* OR */ -{ op_8160_0_comp_nf, 0x00000000, 33120 }, /* OR */ -{ op_8168_0_comp_nf, 0x00000002, 33128 }, /* OR */ -{ op_8170_0_comp_nf, 0x00000002, 33136 }, /* OR */ -{ op_8178_0_comp_nf, 0x00000002, 33144 }, /* OR */ -{ op_8179_0_comp_nf, 0x00000002, 33145 }, /* OR */ -{ NULL, 0x00000000, 33152 }, /* UNPK */ -{ NULL, 0x00000000, 33160 }, /* UNPK */ -{ op_8190_0_comp_nf, 0x00000000, 33168 }, /* OR */ -{ op_8198_0_comp_nf, 0x00000000, 33176 }, /* OR */ -{ op_81a0_0_comp_nf, 0x00000000, 33184 }, /* OR */ -{ op_81a8_0_comp_nf, 0x00000002, 33192 }, /* OR */ -{ op_81b0_0_comp_nf, 0x00000002, 33200 }, /* OR */ -{ op_81b8_0_comp_nf, 0x00000002, 33208 }, /* OR */ -{ op_81b9_0_comp_nf, 0x00000002, 33209 }, /* OR */ -{ op_81c0_0_comp_nf, 0x00000000, 33216 }, /* DIVS */ -{ op_81d0_0_comp_nf, 0x00000000, 33232 }, /* DIVS */ -{ op_81d8_0_comp_nf, 0x00000000, 33240 }, /* DIVS */ -{ op_81e0_0_comp_nf, 0x00000000, 33248 }, /* DIVS */ -{ op_81e8_0_comp_nf, 0x00000002, 33256 }, /* DIVS */ -{ op_81f0_0_comp_nf, 0x00000002, 33264 }, /* DIVS */ -{ op_81f8_0_comp_nf, 0x00000002, 33272 }, /* DIVS */ -{ op_81f9_0_comp_nf, 0x00000002, 33273 }, /* DIVS */ -{ op_81fa_0_comp_nf, 0x00000002, 33274 }, /* DIVS */ -{ op_81fb_0_comp_nf, 0x00000002, 33275 }, /* DIVS */ -{ op_81fc_0_comp_nf, 0x00000002, 33276 }, /* DIVS */ -{ op_9000_0_comp_nf, 0x00000000, 36864 }, /* SUB */ -{ op_9010_0_comp_nf, 0x00000000, 36880 }, /* SUB */ -{ op_9018_0_comp_nf, 0x00000000, 36888 }, /* SUB */ -{ op_9020_0_comp_nf, 0x00000000, 36896 }, /* SUB */ -{ op_9028_0_comp_nf, 0x00000002, 36904 }, /* SUB */ -{ op_9030_0_comp_nf, 0x00000002, 36912 }, /* SUB */ -{ op_9038_0_comp_nf, 0x00000002, 36920 }, /* SUB */ -{ op_9039_0_comp_nf, 0x00000002, 36921 }, /* SUB */ -{ op_903a_0_comp_nf, 0x00000002, 36922 }, /* SUB */ -{ op_903b_0_comp_nf, 0x00000002, 36923 }, /* SUB */ -{ op_903c_0_comp_nf, 0x00000002, 36924 }, /* SUB */ -{ op_9040_0_comp_nf, 0x00000000, 36928 }, /* SUB */ -{ op_9048_0_comp_nf, 0x00000000, 36936 }, /* SUB */ -{ op_9050_0_comp_nf, 0x00000000, 36944 }, /* SUB */ -{ op_9058_0_comp_nf, 0x00000000, 36952 }, /* SUB */ -{ op_9060_0_comp_nf, 0x00000000, 36960 }, /* SUB */ -{ op_9068_0_comp_nf, 0x00000002, 36968 }, /* SUB */ -{ op_9070_0_comp_nf, 0x00000002, 36976 }, /* SUB */ -{ op_9078_0_comp_nf, 0x00000002, 36984 }, /* SUB */ -{ op_9079_0_comp_nf, 0x00000002, 36985 }, /* SUB */ -{ op_907a_0_comp_nf, 0x00000002, 36986 }, /* SUB */ -{ op_907b_0_comp_nf, 0x00000002, 36987 }, /* SUB */ -{ op_907c_0_comp_nf, 0x00000002, 36988 }, /* SUB */ -{ op_9080_0_comp_nf, 0x00000000, 36992 }, /* SUB */ -{ op_9088_0_comp_nf, 0x00000000, 37000 }, /* SUB */ -{ op_9090_0_comp_nf, 0x00000000, 37008 }, /* SUB */ -{ op_9098_0_comp_nf, 0x00000000, 37016 }, /* SUB */ -{ op_90a0_0_comp_nf, 0x00000000, 37024 }, /* SUB */ -{ op_90a8_0_comp_nf, 0x00000002, 37032 }, /* SUB */ -{ op_90b0_0_comp_nf, 0x00000002, 37040 }, /* SUB */ -{ op_90b8_0_comp_nf, 0x00000002, 37048 }, /* SUB */ -{ op_90b9_0_comp_nf, 0x00000002, 37049 }, /* SUB */ -{ op_90ba_0_comp_nf, 0x00000002, 37050 }, /* SUB */ -{ op_90bb_0_comp_nf, 0x00000002, 37051 }, /* SUB */ -{ op_90bc_0_comp_nf, 0x00000002, 37052 }, /* SUB */ -{ op_90c0_0_comp_nf, 0x00000000, 37056 }, /* SUBA */ -{ op_90c8_0_comp_nf, 0x00000000, 37064 }, /* SUBA */ -{ op_90d0_0_comp_nf, 0x00000000, 37072 }, /* SUBA */ -{ op_90d8_0_comp_nf, 0x00000000, 37080 }, /* SUBA */ -{ op_90e0_0_comp_nf, 0x00000000, 37088 }, /* SUBA */ -{ op_90e8_0_comp_nf, 0x00000002, 37096 }, /* SUBA */ -{ op_90f0_0_comp_nf, 0x00000002, 37104 }, /* SUBA */ -{ op_90f8_0_comp_nf, 0x00000002, 37112 }, /* SUBA */ -{ op_90f9_0_comp_nf, 0x00000002, 37113 }, /* SUBA */ -{ op_90fa_0_comp_nf, 0x00000002, 37114 }, /* SUBA */ -{ op_90fb_0_comp_nf, 0x00000002, 37115 }, /* SUBA */ -{ op_90fc_0_comp_nf, 0x00000002, 37116 }, /* SUBA */ -{ op_9100_0_comp_nf, 0x00000008, 37120 }, /* SUBX */ -{ op_9108_0_comp_nf, 0x00000008, 37128 }, /* SUBX */ -{ op_9110_0_comp_nf, 0x00000000, 37136 }, /* SUB */ -{ op_9118_0_comp_nf, 0x00000000, 37144 }, /* SUB */ -{ op_9120_0_comp_nf, 0x00000000, 37152 }, /* SUB */ -{ op_9128_0_comp_nf, 0x00000002, 37160 }, /* SUB */ -{ op_9130_0_comp_nf, 0x00000002, 37168 }, /* SUB */ -{ op_9138_0_comp_nf, 0x00000002, 37176 }, /* SUB */ -{ op_9139_0_comp_nf, 0x00000002, 37177 }, /* SUB */ -{ op_9140_0_comp_nf, 0x00000008, 37184 }, /* SUBX */ -{ op_9148_0_comp_nf, 0x00000008, 37192 }, /* SUBX */ -{ op_9150_0_comp_nf, 0x00000000, 37200 }, /* SUB */ -{ op_9158_0_comp_nf, 0x00000000, 37208 }, /* SUB */ -{ op_9160_0_comp_nf, 0x00000000, 37216 }, /* SUB */ -{ op_9168_0_comp_nf, 0x00000002, 37224 }, /* SUB */ -{ op_9170_0_comp_nf, 0x00000002, 37232 }, /* SUB */ -{ op_9178_0_comp_nf, 0x00000002, 37240 }, /* SUB */ -{ op_9179_0_comp_nf, 0x00000002, 37241 }, /* SUB */ -{ op_9180_0_comp_nf, 0x00000008, 37248 }, /* SUBX */ -{ op_9188_0_comp_nf, 0x00000008, 37256 }, /* SUBX */ -{ op_9190_0_comp_nf, 0x00000000, 37264 }, /* SUB */ -{ op_9198_0_comp_nf, 0x00000000, 37272 }, /* SUB */ -{ op_91a0_0_comp_nf, 0x00000000, 37280 }, /* SUB */ -{ op_91a8_0_comp_nf, 0x00000002, 37288 }, /* SUB */ -{ op_91b0_0_comp_nf, 0x00000002, 37296 }, /* SUB */ -{ op_91b8_0_comp_nf, 0x00000002, 37304 }, /* SUB */ -{ op_91b9_0_comp_nf, 0x00000002, 37305 }, /* SUB */ -{ op_91c0_0_comp_nf, 0x00000000, 37312 }, /* SUBA */ -{ op_91c8_0_comp_nf, 0x00000000, 37320 }, /* SUBA */ -{ op_91d0_0_comp_nf, 0x00000000, 37328 }, /* SUBA */ -{ op_91d8_0_comp_nf, 0x00000000, 37336 }, /* SUBA */ -{ op_91e0_0_comp_nf, 0x00000000, 37344 }, /* SUBA */ -{ op_91e8_0_comp_nf, 0x00000002, 37352 }, /* SUBA */ -{ op_91f0_0_comp_nf, 0x00000002, 37360 }, /* SUBA */ -{ op_91f8_0_comp_nf, 0x00000002, 37368 }, /* SUBA */ -{ op_91f9_0_comp_nf, 0x00000002, 37369 }, /* SUBA */ -{ op_91fa_0_comp_nf, 0x00000002, 37370 }, /* SUBA */ -{ op_91fb_0_comp_nf, 0x00000002, 37371 }, /* SUBA */ -{ op_91fc_0_comp_nf, 0x00000002, 37372 }, /* SUBA */ -{ op_b000_0_comp_nf, 0x00000000, 45056 }, /* CMP */ -{ op_b010_0_comp_nf, 0x00000000, 45072 }, /* CMP */ -{ op_b018_0_comp_nf, 0x00000000, 45080 }, /* CMP */ -{ op_b020_0_comp_nf, 0x00000000, 45088 }, /* CMP */ -{ op_b028_0_comp_nf, 0x00000002, 45096 }, /* CMP */ -{ op_b030_0_comp_nf, 0x00000002, 45104 }, /* CMP */ -{ op_b038_0_comp_nf, 0x00000002, 45112 }, /* CMP */ -{ op_b039_0_comp_nf, 0x00000002, 45113 }, /* CMP */ -{ op_b03a_0_comp_nf, 0x00000002, 45114 }, /* CMP */ -{ op_b03b_0_comp_nf, 0x00000002, 45115 }, /* CMP */ -{ op_b03c_0_comp_nf, 0x00000002, 45116 }, /* CMP */ -{ op_b040_0_comp_nf, 0x00000000, 45120 }, /* CMP */ -{ op_b048_0_comp_nf, 0x00000000, 45128 }, /* CMP */ -{ op_b050_0_comp_nf, 0x00000000, 45136 }, /* CMP */ -{ op_b058_0_comp_nf, 0x00000000, 45144 }, /* CMP */ -{ op_b060_0_comp_nf, 0x00000000, 45152 }, /* CMP */ -{ op_b068_0_comp_nf, 0x00000002, 45160 }, /* CMP */ -{ op_b070_0_comp_nf, 0x00000002, 45168 }, /* CMP */ -{ op_b078_0_comp_nf, 0x00000002, 45176 }, /* CMP */ -{ op_b079_0_comp_nf, 0x00000002, 45177 }, /* CMP */ -{ op_b07a_0_comp_nf, 0x00000002, 45178 }, /* CMP */ -{ op_b07b_0_comp_nf, 0x00000002, 45179 }, /* CMP */ -{ op_b07c_0_comp_nf, 0x00000002, 45180 }, /* CMP */ -{ op_b080_0_comp_nf, 0x00000000, 45184 }, /* CMP */ -{ op_b088_0_comp_nf, 0x00000000, 45192 }, /* CMP */ -{ op_b090_0_comp_nf, 0x00000000, 45200 }, /* CMP */ -{ op_b098_0_comp_nf, 0x00000000, 45208 }, /* CMP */ -{ op_b0a0_0_comp_nf, 0x00000000, 45216 }, /* CMP */ -{ op_b0a8_0_comp_nf, 0x00000002, 45224 }, /* CMP */ -{ op_b0b0_0_comp_nf, 0x00000002, 45232 }, /* CMP */ -{ op_b0b8_0_comp_nf, 0x00000002, 45240 }, /* CMP */ -{ op_b0b9_0_comp_nf, 0x00000002, 45241 }, /* CMP */ -{ op_b0ba_0_comp_nf, 0x00000002, 45242 }, /* CMP */ -{ op_b0bb_0_comp_nf, 0x00000002, 45243 }, /* CMP */ -{ op_b0bc_0_comp_nf, 0x00000002, 45244 }, /* CMP */ -{ op_b0c0_0_comp_nf, 0x00000000, 45248 }, /* CMPA */ -{ op_b0c8_0_comp_nf, 0x00000000, 45256 }, /* CMPA */ -{ op_b0d0_0_comp_nf, 0x00000000, 45264 }, /* CMPA */ -{ op_b0d8_0_comp_nf, 0x00000000, 45272 }, /* CMPA */ -{ op_b0e0_0_comp_nf, 0x00000000, 45280 }, /* CMPA */ -{ op_b0e8_0_comp_nf, 0x00000002, 45288 }, /* CMPA */ -{ op_b0f0_0_comp_nf, 0x00000002, 45296 }, /* CMPA */ -{ op_b0f8_0_comp_nf, 0x00000002, 45304 }, /* CMPA */ -{ op_b0f9_0_comp_nf, 0x00000002, 45305 }, /* CMPA */ -{ op_b0fa_0_comp_nf, 0x00000002, 45306 }, /* CMPA */ -{ op_b0fb_0_comp_nf, 0x00000002, 45307 }, /* CMPA */ -{ op_b0fc_0_comp_nf, 0x00000002, 45308 }, /* CMPA */ -{ op_b100_0_comp_nf, 0x00000000, 45312 }, /* EOR */ -{ op_b108_0_comp_nf, 0x00000000, 45320 }, /* CMPM */ -{ op_b110_0_comp_nf, 0x00000000, 45328 }, /* EOR */ -{ op_b118_0_comp_nf, 0x00000000, 45336 }, /* EOR */ -{ op_b120_0_comp_nf, 0x00000000, 45344 }, /* EOR */ -{ op_b128_0_comp_nf, 0x00000002, 45352 }, /* EOR */ -{ op_b130_0_comp_nf, 0x00000002, 45360 }, /* EOR */ -{ op_b138_0_comp_nf, 0x00000002, 45368 }, /* EOR */ -{ op_b139_0_comp_nf, 0x00000002, 45369 }, /* EOR */ -{ op_b140_0_comp_nf, 0x00000000, 45376 }, /* EOR */ -{ op_b148_0_comp_nf, 0x00000000, 45384 }, /* CMPM */ -{ op_b150_0_comp_nf, 0x00000000, 45392 }, /* EOR */ -{ op_b158_0_comp_nf, 0x00000000, 45400 }, /* EOR */ -{ op_b160_0_comp_nf, 0x00000000, 45408 }, /* EOR */ -{ op_b168_0_comp_nf, 0x00000002, 45416 }, /* EOR */ -{ op_b170_0_comp_nf, 0x00000002, 45424 }, /* EOR */ -{ op_b178_0_comp_nf, 0x00000002, 45432 }, /* EOR */ -{ op_b179_0_comp_nf, 0x00000002, 45433 }, /* EOR */ -{ op_b180_0_comp_nf, 0x00000000, 45440 }, /* EOR */ -{ op_b188_0_comp_nf, 0x00000000, 45448 }, /* CMPM */ -{ op_b190_0_comp_nf, 0x00000000, 45456 }, /* EOR */ -{ op_b198_0_comp_nf, 0x00000000, 45464 }, /* EOR */ -{ op_b1a0_0_comp_nf, 0x00000000, 45472 }, /* EOR */ -{ op_b1a8_0_comp_nf, 0x00000002, 45480 }, /* EOR */ -{ op_b1b0_0_comp_nf, 0x00000002, 45488 }, /* EOR */ -{ op_b1b8_0_comp_nf, 0x00000002, 45496 }, /* EOR */ -{ op_b1b9_0_comp_nf, 0x00000002, 45497 }, /* EOR */ -{ op_b1c0_0_comp_nf, 0x00000000, 45504 }, /* CMPA */ -{ op_b1c8_0_comp_nf, 0x00000000, 45512 }, /* CMPA */ -{ op_b1d0_0_comp_nf, 0x00000000, 45520 }, /* CMPA */ -{ op_b1d8_0_comp_nf, 0x00000000, 45528 }, /* CMPA */ -{ op_b1e0_0_comp_nf, 0x00000000, 45536 }, /* CMPA */ -{ op_b1e8_0_comp_nf, 0x00000002, 45544 }, /* CMPA */ -{ op_b1f0_0_comp_nf, 0x00000002, 45552 }, /* CMPA */ -{ op_b1f8_0_comp_nf, 0x00000002, 45560 }, /* CMPA */ -{ op_b1f9_0_comp_nf, 0x00000002, 45561 }, /* CMPA */ -{ op_b1fa_0_comp_nf, 0x00000002, 45562 }, /* CMPA */ -{ op_b1fb_0_comp_nf, 0x00000002, 45563 }, /* CMPA */ -{ op_b1fc_0_comp_nf, 0x00000002, 45564 }, /* CMPA */ -{ op_c000_0_comp_nf, 0x00000000, 49152 }, /* AND */ -{ op_c010_0_comp_nf, 0x00000000, 49168 }, /* AND */ -{ op_c018_0_comp_nf, 0x00000000, 49176 }, /* AND */ -{ op_c020_0_comp_nf, 0x00000000, 49184 }, /* AND */ -{ op_c028_0_comp_nf, 0x00000002, 49192 }, /* AND */ -{ op_c030_0_comp_nf, 0x00000002, 49200 }, /* AND */ -{ op_c038_0_comp_nf, 0x00000002, 49208 }, /* AND */ -{ op_c039_0_comp_nf, 0x00000002, 49209 }, /* AND */ -{ op_c03a_0_comp_nf, 0x00000002, 49210 }, /* AND */ -{ op_c03b_0_comp_nf, 0x00000002, 49211 }, /* AND */ -{ op_c03c_0_comp_nf, 0x00000002, 49212 }, /* AND */ -{ op_c040_0_comp_nf, 0x00000000, 49216 }, /* AND */ -{ op_c050_0_comp_nf, 0x00000000, 49232 }, /* AND */ -{ op_c058_0_comp_nf, 0x00000000, 49240 }, /* AND */ -{ op_c060_0_comp_nf, 0x00000000, 49248 }, /* AND */ -{ op_c068_0_comp_nf, 0x00000002, 49256 }, /* AND */ -{ op_c070_0_comp_nf, 0x00000002, 49264 }, /* AND */ -{ op_c078_0_comp_nf, 0x00000002, 49272 }, /* AND */ -{ op_c079_0_comp_nf, 0x00000002, 49273 }, /* AND */ -{ op_c07a_0_comp_nf, 0x00000002, 49274 }, /* AND */ -{ op_c07b_0_comp_nf, 0x00000002, 49275 }, /* AND */ -{ op_c07c_0_comp_nf, 0x00000002, 49276 }, /* AND */ -{ op_c080_0_comp_nf, 0x00000000, 49280 }, /* AND */ -{ op_c090_0_comp_nf, 0x00000000, 49296 }, /* AND */ -{ op_c098_0_comp_nf, 0x00000000, 49304 }, /* AND */ -{ op_c0a0_0_comp_nf, 0x00000000, 49312 }, /* AND */ -{ op_c0a8_0_comp_nf, 0x00000002, 49320 }, /* AND */ -{ op_c0b0_0_comp_nf, 0x00000002, 49328 }, /* AND */ -{ op_c0b8_0_comp_nf, 0x00000002, 49336 }, /* AND */ -{ op_c0b9_0_comp_nf, 0x00000002, 49337 }, /* AND */ -{ op_c0ba_0_comp_nf, 0x00000002, 49338 }, /* AND */ -{ op_c0bb_0_comp_nf, 0x00000002, 49339 }, /* AND */ -{ op_c0bc_0_comp_nf, 0x00000002, 49340 }, /* AND */ -{ op_c0c0_0_comp_nf, 0x00000000, 49344 }, /* MULU */ -{ op_c0d0_0_comp_nf, 0x00000000, 49360 }, /* MULU */ -{ op_c0d8_0_comp_nf, 0x00000000, 49368 }, /* MULU */ -{ op_c0e0_0_comp_nf, 0x00000000, 49376 }, /* MULU */ -{ op_c0e8_0_comp_nf, 0x00000002, 49384 }, /* MULU */ -{ op_c0f0_0_comp_nf, 0x00000002, 49392 }, /* MULU */ -{ op_c0f8_0_comp_nf, 0x00000002, 49400 }, /* MULU */ -{ op_c0f9_0_comp_nf, 0x00000002, 49401 }, /* MULU */ -{ op_c0fa_0_comp_nf, 0x00000002, 49402 }, /* MULU */ -{ op_c0fb_0_comp_nf, 0x00000002, 49403 }, /* MULU */ -{ op_c0fc_0_comp_nf, 0x00000002, 49404 }, /* MULU */ -{ NULL, 0x00000000, 49408 }, /* ABCD */ -{ NULL, 0x00000000, 49416 }, /* ABCD */ -{ op_c110_0_comp_nf, 0x00000000, 49424 }, /* AND */ -{ op_c118_0_comp_nf, 0x00000000, 49432 }, /* AND */ -{ op_c120_0_comp_nf, 0x00000000, 49440 }, /* AND */ -{ op_c128_0_comp_nf, 0x00000002, 49448 }, /* AND */ -{ op_c130_0_comp_nf, 0x00000002, 49456 }, /* AND */ -{ op_c138_0_comp_nf, 0x00000002, 49464 }, /* AND */ -{ op_c139_0_comp_nf, 0x00000002, 49465 }, /* AND */ -{ op_c140_0_comp_nf, 0x00000000, 49472 }, /* EXG */ -{ op_c148_0_comp_nf, 0x00000000, 49480 }, /* EXG */ -{ op_c150_0_comp_nf, 0x00000000, 49488 }, /* AND */ -{ op_c158_0_comp_nf, 0x00000000, 49496 }, /* AND */ -{ op_c160_0_comp_nf, 0x00000000, 49504 }, /* AND */ -{ op_c168_0_comp_nf, 0x00000002, 49512 }, /* AND */ -{ op_c170_0_comp_nf, 0x00000002, 49520 }, /* AND */ -{ op_c178_0_comp_nf, 0x00000002, 49528 }, /* AND */ -{ op_c179_0_comp_nf, 0x00000002, 49529 }, /* AND */ -{ op_c188_0_comp_nf, 0x00000000, 49544 }, /* EXG */ -{ op_c190_0_comp_nf, 0x00000000, 49552 }, /* AND */ -{ op_c198_0_comp_nf, 0x00000000, 49560 }, /* AND */ -{ op_c1a0_0_comp_nf, 0x00000000, 49568 }, /* AND */ -{ op_c1a8_0_comp_nf, 0x00000002, 49576 }, /* AND */ -{ op_c1b0_0_comp_nf, 0x00000002, 49584 }, /* AND */ -{ op_c1b8_0_comp_nf, 0x00000002, 49592 }, /* AND */ -{ op_c1b9_0_comp_nf, 0x00000002, 49593 }, /* AND */ -{ op_c1c0_0_comp_nf, 0x00000000, 49600 }, /* MULS */ -{ op_c1d0_0_comp_nf, 0x00000000, 49616 }, /* MULS */ -{ op_c1d8_0_comp_nf, 0x00000000, 49624 }, /* MULS */ -{ op_c1e0_0_comp_nf, 0x00000000, 49632 }, /* MULS */ -{ op_c1e8_0_comp_nf, 0x00000002, 49640 }, /* MULS */ -{ op_c1f0_0_comp_nf, 0x00000002, 49648 }, /* MULS */ -{ op_c1f8_0_comp_nf, 0x00000002, 49656 }, /* MULS */ -{ op_c1f9_0_comp_nf, 0x00000002, 49657 }, /* MULS */ -{ op_c1fa_0_comp_nf, 0x00000002, 49658 }, /* MULS */ -{ op_c1fb_0_comp_nf, 0x00000002, 49659 }, /* MULS */ -{ op_c1fc_0_comp_nf, 0x00000002, 49660 }, /* MULS */ -{ op_d000_0_comp_nf, 0x00000000, 53248 }, /* ADD */ -{ op_d010_0_comp_nf, 0x00000000, 53264 }, /* ADD */ -{ op_d018_0_comp_nf, 0x00000000, 53272 }, /* ADD */ -{ op_d020_0_comp_nf, 0x00000000, 53280 }, /* ADD */ -{ op_d028_0_comp_nf, 0x00000002, 53288 }, /* ADD */ -{ op_d030_0_comp_nf, 0x00000002, 53296 }, /* ADD */ -{ op_d038_0_comp_nf, 0x00000002, 53304 }, /* ADD */ -{ op_d039_0_comp_nf, 0x00000002, 53305 }, /* ADD */ -{ op_d03a_0_comp_nf, 0x00000002, 53306 }, /* ADD */ -{ op_d03b_0_comp_nf, 0x00000002, 53307 }, /* ADD */ -{ op_d03c_0_comp_nf, 0x00000002, 53308 }, /* ADD */ -{ op_d040_0_comp_nf, 0x00000000, 53312 }, /* ADD */ -{ op_d048_0_comp_nf, 0x00000000, 53320 }, /* ADD */ -{ op_d050_0_comp_nf, 0x00000000, 53328 }, /* ADD */ -{ op_d058_0_comp_nf, 0x00000000, 53336 }, /* ADD */ -{ op_d060_0_comp_nf, 0x00000000, 53344 }, /* ADD */ -{ op_d068_0_comp_nf, 0x00000002, 53352 }, /* ADD */ -{ op_d070_0_comp_nf, 0x00000002, 53360 }, /* ADD */ -{ op_d078_0_comp_nf, 0x00000002, 53368 }, /* ADD */ -{ op_d079_0_comp_nf, 0x00000002, 53369 }, /* ADD */ -{ op_d07a_0_comp_nf, 0x00000002, 53370 }, /* ADD */ -{ op_d07b_0_comp_nf, 0x00000002, 53371 }, /* ADD */ -{ op_d07c_0_comp_nf, 0x00000002, 53372 }, /* ADD */ -{ op_d080_0_comp_nf, 0x00000000, 53376 }, /* ADD */ -{ op_d088_0_comp_nf, 0x00000000, 53384 }, /* ADD */ -{ op_d090_0_comp_nf, 0x00000000, 53392 }, /* ADD */ -{ op_d098_0_comp_nf, 0x00000000, 53400 }, /* ADD */ -{ op_d0a0_0_comp_nf, 0x00000000, 53408 }, /* ADD */ -{ op_d0a8_0_comp_nf, 0x00000002, 53416 }, /* ADD */ -{ op_d0b0_0_comp_nf, 0x00000002, 53424 }, /* ADD */ -{ op_d0b8_0_comp_nf, 0x00000002, 53432 }, /* ADD */ -{ op_d0b9_0_comp_nf, 0x00000002, 53433 }, /* ADD */ -{ op_d0ba_0_comp_nf, 0x00000002, 53434 }, /* ADD */ -{ op_d0bb_0_comp_nf, 0x00000002, 53435 }, /* ADD */ -{ op_d0bc_0_comp_nf, 0x00000002, 53436 }, /* ADD */ -{ op_d0c0_0_comp_nf, 0x00000000, 53440 }, /* ADDA */ -{ op_d0c8_0_comp_nf, 0x00000000, 53448 }, /* ADDA */ -{ op_d0d0_0_comp_nf, 0x00000000, 53456 }, /* ADDA */ -{ op_d0d8_0_comp_nf, 0x00000000, 53464 }, /* ADDA */ -{ op_d0e0_0_comp_nf, 0x00000000, 53472 }, /* ADDA */ -{ op_d0e8_0_comp_nf, 0x00000002, 53480 }, /* ADDA */ -{ op_d0f0_0_comp_nf, 0x00000002, 53488 }, /* ADDA */ -{ op_d0f8_0_comp_nf, 0x00000002, 53496 }, /* ADDA */ -{ op_d0f9_0_comp_nf, 0x00000002, 53497 }, /* ADDA */ -{ op_d0fa_0_comp_nf, 0x00000002, 53498 }, /* ADDA */ -{ op_d0fb_0_comp_nf, 0x00000002, 53499 }, /* ADDA */ -{ op_d0fc_0_comp_nf, 0x00000002, 53500 }, /* ADDA */ -{ op_d100_0_comp_nf, 0x00000008, 53504 }, /* ADDX */ -{ op_d108_0_comp_nf, 0x00000008, 53512 }, /* ADDX */ -{ op_d110_0_comp_nf, 0x00000000, 53520 }, /* ADD */ -{ op_d118_0_comp_nf, 0x00000000, 53528 }, /* ADD */ -{ op_d120_0_comp_nf, 0x00000000, 53536 }, /* ADD */ -{ op_d128_0_comp_nf, 0x00000002, 53544 }, /* ADD */ -{ op_d130_0_comp_nf, 0x00000002, 53552 }, /* ADD */ -{ op_d138_0_comp_nf, 0x00000002, 53560 }, /* ADD */ -{ op_d139_0_comp_nf, 0x00000002, 53561 }, /* ADD */ -{ op_d140_0_comp_nf, 0x00000008, 53568 }, /* ADDX */ -{ op_d148_0_comp_nf, 0x00000008, 53576 }, /* ADDX */ -{ op_d150_0_comp_nf, 0x00000000, 53584 }, /* ADD */ -{ op_d158_0_comp_nf, 0x00000000, 53592 }, /* ADD */ -{ op_d160_0_comp_nf, 0x00000000, 53600 }, /* ADD */ -{ op_d168_0_comp_nf, 0x00000002, 53608 }, /* ADD */ -{ op_d170_0_comp_nf, 0x00000002, 53616 }, /* ADD */ -{ op_d178_0_comp_nf, 0x00000002, 53624 }, /* ADD */ -{ op_d179_0_comp_nf, 0x00000002, 53625 }, /* ADD */ -{ op_d180_0_comp_nf, 0x00000008, 53632 }, /* ADDX */ -{ op_d188_0_comp_nf, 0x00000008, 53640 }, /* ADDX */ -{ op_d190_0_comp_nf, 0x00000000, 53648 }, /* ADD */ -{ op_d198_0_comp_nf, 0x00000000, 53656 }, /* ADD */ -{ op_d1a0_0_comp_nf, 0x00000000, 53664 }, /* ADD */ -{ op_d1a8_0_comp_nf, 0x00000002, 53672 }, /* ADD */ -{ op_d1b0_0_comp_nf, 0x00000002, 53680 }, /* ADD */ -{ op_d1b8_0_comp_nf, 0x00000002, 53688 }, /* ADD */ -{ op_d1b9_0_comp_nf, 0x00000002, 53689 }, /* ADD */ -{ op_d1c0_0_comp_nf, 0x00000000, 53696 }, /* ADDA */ -{ op_d1c8_0_comp_nf, 0x00000000, 53704 }, /* ADDA */ -{ op_d1d0_0_comp_nf, 0x00000000, 53712 }, /* ADDA */ -{ op_d1d8_0_comp_nf, 0x00000000, 53720 }, /* ADDA */ -{ op_d1e0_0_comp_nf, 0x00000000, 53728 }, /* ADDA */ -{ op_d1e8_0_comp_nf, 0x00000002, 53736 }, /* ADDA */ -{ op_d1f0_0_comp_nf, 0x00000002, 53744 }, /* ADDA */ -{ op_d1f8_0_comp_nf, 0x00000002, 53752 }, /* ADDA */ -{ op_d1f9_0_comp_nf, 0x00000002, 53753 }, /* ADDA */ -{ op_d1fa_0_comp_nf, 0x00000002, 53754 }, /* ADDA */ -{ op_d1fb_0_comp_nf, 0x00000002, 53755 }, /* ADDA */ -{ op_d1fc_0_comp_nf, 0x00000002, 53756 }, /* ADDA */ -{ op_e000_0_comp_nf, 0x00000000, 57344 }, /* ASR */ -{ op_e008_0_comp_nf, 0x00000000, 57352 }, /* LSR */ -{ op_e010_0_comp_nf, 0x00000008, 57360 }, /* ROXR */ -{ op_e018_0_comp_nf, 0x00000000, 57368 }, /* ROR */ -{ op_e020_0_comp_nf, 0x00000000, 57376 }, /* ASR */ -{ op_e028_0_comp_nf, 0x00000000, 57384 }, /* LSR */ -{ op_e030_0_comp_nf, 0x00000008, 57392 }, /* ROXR */ -{ op_e038_0_comp_nf, 0x00000000, 57400 }, /* ROR */ -{ op_e040_0_comp_nf, 0x00000000, 57408 }, /* ASR */ -{ op_e048_0_comp_nf, 0x00000000, 57416 }, /* LSR */ -{ op_e050_0_comp_nf, 0x00000008, 57424 }, /* ROXR */ -{ op_e058_0_comp_nf, 0x00000000, 57432 }, /* ROR */ -{ op_e060_0_comp_nf, 0x00000000, 57440 }, /* ASR */ -{ op_e068_0_comp_nf, 0x00000000, 57448 }, /* LSR */ -{ op_e070_0_comp_nf, 0x00000008, 57456 }, /* ROXR */ -{ op_e078_0_comp_nf, 0x00000000, 57464 }, /* ROR */ -{ op_e080_0_comp_nf, 0x00000000, 57472 }, /* ASR */ -{ op_e088_0_comp_nf, 0x00000000, 57480 }, /* LSR */ -{ op_e090_0_comp_nf, 0x00000008, 57488 }, /* ROXR */ -{ op_e098_0_comp_nf, 0x00000000, 57496 }, /* ROR */ -{ op_e0a0_0_comp_nf, 0x00000000, 57504 }, /* ASR */ -{ op_e0a8_0_comp_nf, 0x00000000, 57512 }, /* LSR */ -{ op_e0b0_0_comp_nf, 0x00000008, 57520 }, /* ROXR */ -{ op_e0b8_0_comp_nf, 0x00000000, 57528 }, /* ROR */ -{ op_e0d0_0_comp_nf, 0x00000000, 57552 }, /* ASRW */ -{ op_e0d8_0_comp_nf, 0x00000000, 57560 }, /* ASRW */ -{ op_e0e0_0_comp_nf, 0x00000000, 57568 }, /* ASRW */ -{ op_e0e8_0_comp_nf, 0x00000002, 57576 }, /* ASRW */ -{ op_e0f0_0_comp_nf, 0x00000002, 57584 }, /* ASRW */ -{ op_e0f8_0_comp_nf, 0x00000002, 57592 }, /* ASRW */ -{ op_e0f9_0_comp_nf, 0x00000002, 57593 }, /* ASRW */ -{ op_e100_0_comp_nf, 0x00000000, 57600 }, /* ASL */ -{ op_e108_0_comp_nf, 0x00000000, 57608 }, /* LSL */ -{ op_e110_0_comp_nf, 0x00000008, 57616 }, /* ROXL */ -{ op_e118_0_comp_nf, 0x00000000, 57624 }, /* ROL */ -{ op_e120_0_comp_nf, 0x00000000, 57632 }, /* ASL */ -{ op_e128_0_comp_nf, 0x00000000, 57640 }, /* LSL */ -{ op_e130_0_comp_nf, 0x00000008, 57648 }, /* ROXL */ -{ op_e138_0_comp_nf, 0x00000000, 57656 }, /* ROL */ -{ op_e140_0_comp_nf, 0x00000000, 57664 }, /* ASL */ -{ op_e148_0_comp_nf, 0x00000000, 57672 }, /* LSL */ -{ op_e150_0_comp_nf, 0x00000008, 57680 }, /* ROXL */ -{ op_e158_0_comp_nf, 0x00000000, 57688 }, /* ROL */ -{ op_e160_0_comp_nf, 0x00000000, 57696 }, /* ASL */ -{ op_e168_0_comp_nf, 0x00000000, 57704 }, /* LSL */ -{ op_e170_0_comp_nf, 0x00000008, 57712 }, /* ROXL */ -{ op_e178_0_comp_nf, 0x00000000, 57720 }, /* ROL */ -{ op_e180_0_comp_nf, 0x00000000, 57728 }, /* ASL */ -{ op_e188_0_comp_nf, 0x00000000, 57736 }, /* LSL */ -{ op_e190_0_comp_nf, 0x00000008, 57744 }, /* ROXL */ -{ op_e198_0_comp_nf, 0x00000000, 57752 }, /* ROL */ -{ op_e1a0_0_comp_nf, 0x00000000, 57760 }, /* ASL */ -{ op_e1a8_0_comp_nf, 0x00000000, 57768 }, /* LSL */ -{ op_e1b0_0_comp_nf, 0x00000008, 57776 }, /* ROXL */ -{ op_e1b8_0_comp_nf, 0x00000000, 57784 }, /* ROL */ -{ op_e1d0_0_comp_nf, 0x00000000, 57808 }, /* ASLW */ -{ op_e1d8_0_comp_nf, 0x00000000, 57816 }, /* ASLW */ -{ op_e1e0_0_comp_nf, 0x00000000, 57824 }, /* ASLW */ -{ op_e1e8_0_comp_nf, 0x00000002, 57832 }, /* ASLW */ -{ op_e1f0_0_comp_nf, 0x00000002, 57840 }, /* ASLW */ -{ op_e1f8_0_comp_nf, 0x00000002, 57848 }, /* ASLW */ -{ op_e1f9_0_comp_nf, 0x00000002, 57849 }, /* ASLW */ -{ op_e2d0_0_comp_nf, 0x00000000, 58064 }, /* LSRW */ -{ op_e2d8_0_comp_nf, 0x00000000, 58072 }, /* LSRW */ -{ op_e2e0_0_comp_nf, 0x00000000, 58080 }, /* LSRW */ -{ op_e2e8_0_comp_nf, 0x00000002, 58088 }, /* LSRW */ -{ op_e2f0_0_comp_nf, 0x00000002, 58096 }, /* LSRW */ -{ op_e2f8_0_comp_nf, 0x00000002, 58104 }, /* LSRW */ -{ op_e2f9_0_comp_nf, 0x00000002, 58105 }, /* LSRW */ -{ op_e3d0_0_comp_nf, 0x00000000, 58320 }, /* LSLW */ -{ op_e3d8_0_comp_nf, 0x00000000, 58328 }, /* LSLW */ -{ op_e3e0_0_comp_nf, 0x00000000, 58336 }, /* LSLW */ -{ op_e3e8_0_comp_nf, 0x00000002, 58344 }, /* LSLW */ -{ op_e3f0_0_comp_nf, 0x00000002, 58352 }, /* LSLW */ -{ op_e3f8_0_comp_nf, 0x00000002, 58360 }, /* LSLW */ -{ op_e3f9_0_comp_nf, 0x00000002, 58361 }, /* LSLW */ -{ NULL, 0x00000008, 58576 }, /* ROXRW */ -{ NULL, 0x00000008, 58584 }, /* ROXRW */ -{ NULL, 0x00000008, 58592 }, /* ROXRW */ -{ NULL, 0x0000000a, 58600 }, /* ROXRW */ -{ NULL, 0x0000000a, 58608 }, /* ROXRW */ -{ NULL, 0x0000000a, 58616 }, /* ROXRW */ -{ NULL, 0x0000000a, 58617 }, /* ROXRW */ -{ NULL, 0x00000008, 58832 }, /* ROXLW */ -{ NULL, 0x00000008, 58840 }, /* ROXLW */ -{ NULL, 0x00000008, 58848 }, /* ROXLW */ -{ NULL, 0x0000000a, 58856 }, /* ROXLW */ -{ NULL, 0x0000000a, 58864 }, /* ROXLW */ -{ NULL, 0x0000000a, 58872 }, /* ROXLW */ -{ NULL, 0x0000000a, 58873 }, /* ROXLW */ -{ op_e6d0_0_comp_nf, 0x00000000, 59088 }, /* RORW */ -{ op_e6d8_0_comp_nf, 0x00000000, 59096 }, /* RORW */ -{ op_e6e0_0_comp_nf, 0x00000000, 59104 }, /* RORW */ -{ op_e6e8_0_comp_nf, 0x00000002, 59112 }, /* RORW */ -{ op_e6f0_0_comp_nf, 0x00000002, 59120 }, /* RORW */ -{ op_e6f8_0_comp_nf, 0x00000002, 59128 }, /* RORW */ -{ op_e6f9_0_comp_nf, 0x00000002, 59129 }, /* RORW */ -{ op_e7d0_0_comp_nf, 0x00000000, 59344 }, /* ROLW */ -{ op_e7d8_0_comp_nf, 0x00000000, 59352 }, /* ROLW */ -{ op_e7e0_0_comp_nf, 0x00000000, 59360 }, /* ROLW */ -{ op_e7e8_0_comp_nf, 0x00000002, 59368 }, /* ROLW */ -{ op_e7f0_0_comp_nf, 0x00000002, 59376 }, /* ROLW */ -{ op_e7f8_0_comp_nf, 0x00000002, 59384 }, /* ROLW */ -{ op_e7f9_0_comp_nf, 0x00000002, 59385 }, /* ROLW */ -{ NULL, 0x00000000, 59584 }, /* BFTST */ -{ NULL, 0x00000000, 59600 }, /* BFTST */ -{ NULL, 0x00000000, 59624 }, /* BFTST */ -{ NULL, 0x00000000, 59632 }, /* BFTST */ -{ NULL, 0x00000000, 59640 }, /* BFTST */ -{ NULL, 0x00000000, 59641 }, /* BFTST */ -{ NULL, 0x00000000, 59642 }, /* BFTST */ -{ NULL, 0x00000000, 59643 }, /* BFTST */ -{ NULL, 0x00000000, 59840 }, /* BFEXTU */ -{ NULL, 0x00000000, 59856 }, /* BFEXTU */ -{ NULL, 0x00000000, 59880 }, /* BFEXTU */ -{ NULL, 0x00000000, 59888 }, /* BFEXTU */ -{ NULL, 0x00000000, 59896 }, /* BFEXTU */ -{ NULL, 0x00000000, 59897 }, /* BFEXTU */ -{ NULL, 0x00000000, 59898 }, /* BFEXTU */ -{ NULL, 0x00000000, 59899 }, /* BFEXTU */ -{ NULL, 0x00000000, 60096 }, /* BFCHG */ -{ NULL, 0x00000000, 60112 }, /* BFCHG */ -{ NULL, 0x00000000, 60136 }, /* BFCHG */ -{ NULL, 0x00000000, 60144 }, /* BFCHG */ -{ NULL, 0x00000000, 60152 }, /* BFCHG */ -{ NULL, 0x00000000, 60153 }, /* BFCHG */ -{ NULL, 0x00000000, 60352 }, /* BFEXTS */ -{ NULL, 0x00000000, 60368 }, /* BFEXTS */ -{ NULL, 0x00000000, 60392 }, /* BFEXTS */ -{ NULL, 0x00000000, 60400 }, /* BFEXTS */ -{ NULL, 0x00000000, 60408 }, /* BFEXTS */ -{ NULL, 0x00000000, 60409 }, /* BFEXTS */ -{ NULL, 0x00000000, 60410 }, /* BFEXTS */ -{ NULL, 0x00000000, 60411 }, /* BFEXTS */ -{ NULL, 0x00000000, 60608 }, /* BFCLR */ -{ NULL, 0x00000000, 60624 }, /* BFCLR */ -{ NULL, 0x00000000, 60648 }, /* BFCLR */ -{ NULL, 0x00000000, 60656 }, /* BFCLR */ -{ NULL, 0x00000000, 60664 }, /* BFCLR */ -{ NULL, 0x00000000, 60665 }, /* BFCLR */ -{ NULL, 0x00000000, 60864 }, /* BFFFO */ -{ NULL, 0x00000000, 60880 }, /* BFFFO */ -{ NULL, 0x00000000, 60904 }, /* BFFFO */ -{ NULL, 0x00000000, 60912 }, /* BFFFO */ -{ NULL, 0x00000000, 60920 }, /* BFFFO */ -{ NULL, 0x00000000, 60921 }, /* BFFFO */ -{ NULL, 0x00000000, 60922 }, /* BFFFO */ -{ NULL, 0x00000000, 60923 }, /* BFFFO */ -{ NULL, 0x00000000, 61120 }, /* BFSET */ -{ NULL, 0x00000000, 61136 }, /* BFSET */ -{ NULL, 0x00000000, 61160 }, /* BFSET */ -{ NULL, 0x00000000, 61168 }, /* BFSET */ -{ NULL, 0x00000000, 61176 }, /* BFSET */ -{ NULL, 0x00000000, 61177 }, /* BFSET */ -{ op_efc0_0_comp_nf, 0x00000002, 61376 }, /* BFINS */ -{ op_efd0_0_comp_nf, 0x00000002, 61392 }, /* BFINS */ -{ op_efe8_0_comp_nf, 0x00000002, 61416 }, /* BFINS */ -{ op_eff0_0_comp_nf, 0x00000002, 61424 }, /* BFINS */ -{ op_eff8_0_comp_nf, 0x00000002, 61432 }, /* BFINS */ -{ op_eff9_0_comp_nf, 0x00000002, 61433 }, /* BFINS */ -{ NULL, 0x00000001, 61440 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61448 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61456 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61464 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61472 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61480 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61488 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61496 }, /* MMUOP030 */ -{ NULL, 0x00000001, 61497 }, /* MMUOP030 */ -{ op_f200_0_comp_nf, 0x00000022, 61952 }, /* FPP */ -{ op_f208_0_comp_nf, 0x00000022, 61960 }, /* FPP */ -{ op_f210_0_comp_nf, 0x00000022, 61968 }, /* FPP */ -{ op_f218_0_comp_nf, 0x00000022, 61976 }, /* FPP */ -{ op_f220_0_comp_nf, 0x00000022, 61984 }, /* FPP */ -{ op_f228_0_comp_nf, 0x00000022, 61992 }, /* FPP */ -{ op_f230_0_comp_nf, 0x00000022, 62000 }, /* FPP */ -{ op_f238_0_comp_nf, 0x00000022, 62008 }, /* FPP */ -{ op_f239_0_comp_nf, 0x00000022, 62009 }, /* FPP */ -{ op_f23a_0_comp_nf, 0x00000022, 62010 }, /* FPP */ -{ op_f23b_0_comp_nf, 0x00000022, 62011 }, /* FPP */ -{ op_f23c_0_comp_nf, 0x00000022, 62012 }, /* FPP */ -{ op_f240_0_comp_nf, 0x00000006, 62016 }, /* FScc */ -{ NULL, 0x00000021, 62024 }, /* FDBcc */ -{ op_f250_0_comp_nf, 0x00000006, 62032 }, /* FScc */ -{ op_f258_0_comp_nf, 0x00000006, 62040 }, /* FScc */ -{ op_f260_0_comp_nf, 0x00000006, 62048 }, /* FScc */ -{ op_f268_0_comp_nf, 0x00000006, 62056 }, /* FScc */ -{ op_f270_0_comp_nf, 0x00000006, 62064 }, /* FScc */ -{ op_f278_0_comp_nf, 0x00000006, 62072 }, /* FScc */ -{ op_f279_0_comp_nf, 0x00000006, 62073 }, /* FScc */ -{ NULL, 0x00000021, 62074 }, /* FTRAPcc */ -{ NULL, 0x00000021, 62075 }, /* FTRAPcc */ -{ NULL, 0x00000021, 62076 }, /* FTRAPcc */ -{ op_f280_0_comp_nf, 0x00000005, 62080 }, /* FBcc */ -{ op_f2c0_0_comp_nf, 0x00000005, 62144 }, /* FBcc */ -{ NULL, 0x00000020, 62224 }, /* FSAVE */ -{ NULL, 0x00000020, 62240 }, /* FSAVE */ -{ NULL, 0x00000020, 62248 }, /* FSAVE */ -{ NULL, 0x00000020, 62256 }, /* FSAVE */ -{ NULL, 0x00000020, 62264 }, /* FSAVE */ -{ NULL, 0x00000020, 62265 }, /* FSAVE */ -{ NULL, 0x00000020, 62288 }, /* FRESTORE */ -{ NULL, 0x00000020, 62296 }, /* FRESTORE */ -{ NULL, 0x00000020, 62312 }, /* FRESTORE */ -{ NULL, 0x00000020, 62320 }, /* FRESTORE */ -{ NULL, 0x00000020, 62328 }, /* FRESTORE */ -{ NULL, 0x00000020, 62329 }, /* FRESTORE */ -{ NULL, 0x00000020, 62330 }, /* FRESTORE */ -{ NULL, 0x00000020, 62331 }, /* FRESTORE */ -{ NULL, 0x00000001, 62472 }, /* CINVL */ -{ NULL, 0x00000001, 62480 }, /* CINVP */ -{ NULL, 0x00000001, 62488 }, /* CINVA */ -{ NULL, 0x00000001, 62489 }, /* CINVA */ -{ NULL, 0x00000001, 62490 }, /* CINVA */ -{ NULL, 0x00000001, 62491 }, /* CINVA */ -{ NULL, 0x00000001, 62492 }, /* CINVA */ -{ NULL, 0x00000001, 62493 }, /* CINVA */ -{ NULL, 0x00000001, 62494 }, /* CINVA */ -{ NULL, 0x00000001, 62495 }, /* CINVA */ -{ NULL, 0x00000001, 62504 }, /* CPUSHL */ -{ NULL, 0x00000001, 62512 }, /* CPUSHP */ -{ NULL, 0x00000001, 62520 }, /* CPUSHA */ -{ NULL, 0x00000001, 62521 }, /* CPUSHA */ -{ NULL, 0x00000001, 62522 }, /* CPUSHA */ -{ NULL, 0x00000001, 62523 }, /* CPUSHA */ -{ NULL, 0x00000001, 62524 }, /* CPUSHA */ -{ NULL, 0x00000001, 62525 }, /* CPUSHA */ -{ NULL, 0x00000001, 62526 }, /* CPUSHA */ -{ NULL, 0x00000001, 62527 }, /* CPUSHA */ -{ NULL, 0x00000001, 62720 }, /* PFLUSHN */ -{ NULL, 0x00000001, 62728 }, /* PFLUSH */ -{ NULL, 0x00000001, 62736 }, /* PFLUSHAN */ -{ NULL, 0x00000001, 62744 }, /* PFLUSHA */ -{ NULL, 0x00000001, 62792 }, /* PTESTW */ -{ NULL, 0x00000001, 62824 }, /* PTESTR */ -{ op_f600_0_comp_nf, 0x00000002, 62976 }, /* MOVE16 */ -{ op_f608_0_comp_nf, 0x00000002, 62984 }, /* MOVE16 */ -{ op_f610_0_comp_nf, 0x00000002, 62992 }, /* MOVE16 */ -{ op_f618_0_comp_nf, 0x00000002, 63000 }, /* MOVE16 */ -{ op_f620_0_comp_nf, 0x00000002, 63008 }, /* MOVE16 */ -{ 0, 0,65536 }}; -#endif +// +// Created by midwan on 22/12/2023. +// + +#if defined(CPU_arm) || defined(CPU_AARCH64) +#include "arm/compstbl_arm.cpp" +#elif defined(__x86_64__) || defined(_M_AMD64) +#include "x86/compstbl_x86.cpp" +#endif \ No newline at end of file diff --git a/src/jit/comptbl.h b/src/jit/comptbl.h index 872e4e0c2..8a7833131 100644 --- a/src/jit/comptbl.h +++ b/src/jit/comptbl.h @@ -1,3054 +1,14 @@ -extern const struct comptbl op_smalltbl_0_comp_nf[]; -extern const struct comptbl op_smalltbl_0_comp_ff[]; -extern compop_func op_0_0_comp_ff; -extern compop_func op_10_0_comp_ff; -extern compop_func op_18_0_comp_ff; -extern compop_func op_20_0_comp_ff; -extern compop_func op_28_0_comp_ff; -extern compop_func op_30_0_comp_ff; -extern compop_func op_38_0_comp_ff; -extern compop_func op_39_0_comp_ff; -extern compop_func op_3c_0_comp_ff; -extern compop_func op_40_0_comp_ff; -extern compop_func op_50_0_comp_ff; -extern compop_func op_58_0_comp_ff; -extern compop_func op_60_0_comp_ff; -extern compop_func op_68_0_comp_ff; -extern compop_func op_70_0_comp_ff; -extern compop_func op_78_0_comp_ff; -extern compop_func op_79_0_comp_ff; -extern compop_func op_80_0_comp_ff; -extern compop_func op_90_0_comp_ff; -extern compop_func op_98_0_comp_ff; -extern compop_func op_a0_0_comp_ff; -extern compop_func op_a8_0_comp_ff; -extern compop_func op_b0_0_comp_ff; -extern compop_func op_b8_0_comp_ff; -extern compop_func op_b9_0_comp_ff; -extern compop_func op_100_0_comp_ff; -extern compop_func op_110_0_comp_ff; -extern compop_func op_118_0_comp_ff; -extern compop_func op_120_0_comp_ff; -extern compop_func op_128_0_comp_ff; -extern compop_func op_130_0_comp_ff; -extern compop_func op_138_0_comp_ff; -extern compop_func op_139_0_comp_ff; -extern compop_func op_13a_0_comp_ff; -extern compop_func op_13b_0_comp_ff; -extern compop_func op_13c_0_comp_ff; -extern compop_func op_140_0_comp_ff; -extern compop_func op_150_0_comp_ff; -extern compop_func op_158_0_comp_ff; -extern compop_func op_160_0_comp_ff; -extern compop_func op_168_0_comp_ff; -extern compop_func op_170_0_comp_ff; -extern compop_func op_178_0_comp_ff; -extern compop_func op_179_0_comp_ff; -extern compop_func op_180_0_comp_ff; -extern compop_func op_190_0_comp_ff; -extern compop_func op_198_0_comp_ff; -extern compop_func op_1a0_0_comp_ff; -extern compop_func op_1a8_0_comp_ff; -extern compop_func op_1b0_0_comp_ff; -extern compop_func op_1b8_0_comp_ff; -extern compop_func op_1b9_0_comp_ff; -extern compop_func op_1c0_0_comp_ff; -extern compop_func op_1d0_0_comp_ff; -extern compop_func op_1d8_0_comp_ff; -extern compop_func op_1e0_0_comp_ff; -extern compop_func op_1e8_0_comp_ff; -extern compop_func op_1f0_0_comp_ff; -extern compop_func op_1f8_0_comp_ff; -extern compop_func op_1f9_0_comp_ff; -extern compop_func op_200_0_comp_ff; -extern compop_func op_210_0_comp_ff; -extern compop_func op_218_0_comp_ff; -extern compop_func op_220_0_comp_ff; -extern compop_func op_228_0_comp_ff; -extern compop_func op_230_0_comp_ff; -extern compop_func op_238_0_comp_ff; -extern compop_func op_239_0_comp_ff; -extern compop_func op_23c_0_comp_ff; -extern compop_func op_240_0_comp_ff; -extern compop_func op_250_0_comp_ff; -extern compop_func op_258_0_comp_ff; -extern compop_func op_260_0_comp_ff; -extern compop_func op_268_0_comp_ff; -extern compop_func op_270_0_comp_ff; -extern compop_func op_278_0_comp_ff; -extern compop_func op_279_0_comp_ff; -extern compop_func op_280_0_comp_ff; -extern compop_func op_290_0_comp_ff; -extern compop_func op_298_0_comp_ff; -extern compop_func op_2a0_0_comp_ff; -extern compop_func op_2a8_0_comp_ff; -extern compop_func op_2b0_0_comp_ff; -extern compop_func op_2b8_0_comp_ff; -extern compop_func op_2b9_0_comp_ff; -extern compop_func op_400_0_comp_ff; -extern compop_func op_410_0_comp_ff; -extern compop_func op_418_0_comp_ff; -extern compop_func op_420_0_comp_ff; -extern compop_func op_428_0_comp_ff; -extern compop_func op_430_0_comp_ff; -extern compop_func op_438_0_comp_ff; -extern compop_func op_439_0_comp_ff; -extern compop_func op_440_0_comp_ff; -extern compop_func op_450_0_comp_ff; -extern compop_func op_458_0_comp_ff; -extern compop_func op_460_0_comp_ff; -extern compop_func op_468_0_comp_ff; -extern compop_func op_470_0_comp_ff; -extern compop_func op_478_0_comp_ff; -extern compop_func op_479_0_comp_ff; -extern compop_func op_480_0_comp_ff; -extern compop_func op_490_0_comp_ff; -extern compop_func op_498_0_comp_ff; -extern compop_func op_4a0_0_comp_ff; -extern compop_func op_4a8_0_comp_ff; -extern compop_func op_4b0_0_comp_ff; -extern compop_func op_4b8_0_comp_ff; -extern compop_func op_4b9_0_comp_ff; -extern compop_func op_600_0_comp_ff; -extern compop_func op_610_0_comp_ff; -extern compop_func op_618_0_comp_ff; -extern compop_func op_620_0_comp_ff; -extern compop_func op_628_0_comp_ff; -extern compop_func op_630_0_comp_ff; -extern compop_func op_638_0_comp_ff; -extern compop_func op_639_0_comp_ff; -extern compop_func op_640_0_comp_ff; -extern compop_func op_650_0_comp_ff; -extern compop_func op_658_0_comp_ff; -extern compop_func op_660_0_comp_ff; -extern compop_func op_668_0_comp_ff; -extern compop_func op_670_0_comp_ff; -extern compop_func op_678_0_comp_ff; -extern compop_func op_679_0_comp_ff; -extern compop_func op_680_0_comp_ff; -extern compop_func op_690_0_comp_ff; -extern compop_func op_698_0_comp_ff; -extern compop_func op_6a0_0_comp_ff; -extern compop_func op_6a8_0_comp_ff; -extern compop_func op_6b0_0_comp_ff; -extern compop_func op_6b8_0_comp_ff; -extern compop_func op_6b9_0_comp_ff; -extern compop_func op_800_0_comp_ff; -extern compop_func op_810_0_comp_ff; -extern compop_func op_818_0_comp_ff; -extern compop_func op_820_0_comp_ff; -extern compop_func op_828_0_comp_ff; -extern compop_func op_830_0_comp_ff; -extern compop_func op_838_0_comp_ff; -extern compop_func op_839_0_comp_ff; -extern compop_func op_83a_0_comp_ff; -extern compop_func op_83b_0_comp_ff; -extern compop_func op_840_0_comp_ff; -extern compop_func op_850_0_comp_ff; -extern compop_func op_858_0_comp_ff; -extern compop_func op_860_0_comp_ff; -extern compop_func op_868_0_comp_ff; -extern compop_func op_870_0_comp_ff; -extern compop_func op_878_0_comp_ff; -extern compop_func op_879_0_comp_ff; -extern compop_func op_880_0_comp_ff; -extern compop_func op_890_0_comp_ff; -extern compop_func op_898_0_comp_ff; -extern compop_func op_8a0_0_comp_ff; -extern compop_func op_8a8_0_comp_ff; -extern compop_func op_8b0_0_comp_ff; -extern compop_func op_8b8_0_comp_ff; -extern compop_func op_8b9_0_comp_ff; -extern compop_func op_8c0_0_comp_ff; -extern compop_func op_8d0_0_comp_ff; -extern compop_func op_8d8_0_comp_ff; -extern compop_func op_8e0_0_comp_ff; -extern compop_func op_8e8_0_comp_ff; -extern compop_func op_8f0_0_comp_ff; -extern compop_func op_8f8_0_comp_ff; -extern compop_func op_8f9_0_comp_ff; -extern compop_func op_a00_0_comp_ff; -extern compop_func op_a10_0_comp_ff; -extern compop_func op_a18_0_comp_ff; -extern compop_func op_a20_0_comp_ff; -extern compop_func op_a28_0_comp_ff; -extern compop_func op_a30_0_comp_ff; -extern compop_func op_a38_0_comp_ff; -extern compop_func op_a39_0_comp_ff; -extern compop_func op_a3c_0_comp_ff; -extern compop_func op_a40_0_comp_ff; -extern compop_func op_a50_0_comp_ff; -extern compop_func op_a58_0_comp_ff; -extern compop_func op_a60_0_comp_ff; -extern compop_func op_a68_0_comp_ff; -extern compop_func op_a70_0_comp_ff; -extern compop_func op_a78_0_comp_ff; -extern compop_func op_a79_0_comp_ff; -extern compop_func op_a80_0_comp_ff; -extern compop_func op_a90_0_comp_ff; -extern compop_func op_a98_0_comp_ff; -extern compop_func op_aa0_0_comp_ff; -extern compop_func op_aa8_0_comp_ff; -extern compop_func op_ab0_0_comp_ff; -extern compop_func op_ab8_0_comp_ff; -extern compop_func op_ab9_0_comp_ff; -extern compop_func op_c00_0_comp_ff; -extern compop_func op_c10_0_comp_ff; -extern compop_func op_c18_0_comp_ff; -extern compop_func op_c20_0_comp_ff; -extern compop_func op_c28_0_comp_ff; -extern compop_func op_c30_0_comp_ff; -extern compop_func op_c38_0_comp_ff; -extern compop_func op_c39_0_comp_ff; -extern compop_func op_c3a_0_comp_ff; -extern compop_func op_c3b_0_comp_ff; -extern compop_func op_c40_0_comp_ff; -extern compop_func op_c50_0_comp_ff; -extern compop_func op_c58_0_comp_ff; -extern compop_func op_c60_0_comp_ff; -extern compop_func op_c68_0_comp_ff; -extern compop_func op_c70_0_comp_ff; -extern compop_func op_c78_0_comp_ff; -extern compop_func op_c79_0_comp_ff; -extern compop_func op_c7a_0_comp_ff; -extern compop_func op_c7b_0_comp_ff; -extern compop_func op_c80_0_comp_ff; -extern compop_func op_c90_0_comp_ff; -extern compop_func op_c98_0_comp_ff; -extern compop_func op_ca0_0_comp_ff; -extern compop_func op_ca8_0_comp_ff; -extern compop_func op_cb0_0_comp_ff; -extern compop_func op_cb8_0_comp_ff; -extern compop_func op_cb9_0_comp_ff; -extern compop_func op_cba_0_comp_ff; -extern compop_func op_cbb_0_comp_ff; -extern compop_func op_1000_0_comp_ff; -extern compop_func op_1010_0_comp_ff; -extern compop_func op_1018_0_comp_ff; -extern compop_func op_1020_0_comp_ff; -extern compop_func op_1028_0_comp_ff; -extern compop_func op_1030_0_comp_ff; -extern compop_func op_1038_0_comp_ff; -extern compop_func op_1039_0_comp_ff; -extern compop_func op_103a_0_comp_ff; -extern compop_func op_103b_0_comp_ff; -extern compop_func op_103c_0_comp_ff; -extern compop_func op_1080_0_comp_ff; -extern compop_func op_1090_0_comp_ff; -extern compop_func op_1098_0_comp_ff; -extern compop_func op_10a0_0_comp_ff; -extern compop_func op_10a8_0_comp_ff; -extern compop_func op_10b0_0_comp_ff; -extern compop_func op_10b8_0_comp_ff; -extern compop_func op_10b9_0_comp_ff; -extern compop_func op_10ba_0_comp_ff; -extern compop_func op_10bb_0_comp_ff; -extern compop_func op_10bc_0_comp_ff; -extern compop_func op_10c0_0_comp_ff; -extern compop_func op_10d0_0_comp_ff; -extern compop_func op_10d8_0_comp_ff; -extern compop_func op_10e0_0_comp_ff; -extern compop_func op_10e8_0_comp_ff; -extern compop_func op_10f0_0_comp_ff; -extern compop_func op_10f8_0_comp_ff; -extern compop_func op_10f9_0_comp_ff; -extern compop_func op_10fa_0_comp_ff; -extern compop_func op_10fb_0_comp_ff; -extern compop_func op_10fc_0_comp_ff; -extern compop_func op_1100_0_comp_ff; -extern compop_func op_1110_0_comp_ff; -extern compop_func op_1118_0_comp_ff; -extern compop_func op_1120_0_comp_ff; -extern compop_func op_1128_0_comp_ff; -extern compop_func op_1130_0_comp_ff; -extern compop_func op_1138_0_comp_ff; -extern compop_func op_1139_0_comp_ff; -extern compop_func op_113a_0_comp_ff; -extern compop_func op_113b_0_comp_ff; -extern compop_func op_113c_0_comp_ff; -extern compop_func op_1140_0_comp_ff; -extern compop_func op_1150_0_comp_ff; -extern compop_func op_1158_0_comp_ff; -extern compop_func op_1160_0_comp_ff; -extern compop_func op_1168_0_comp_ff; -extern compop_func op_1170_0_comp_ff; -extern compop_func op_1178_0_comp_ff; -extern compop_func op_1179_0_comp_ff; -extern compop_func op_117a_0_comp_ff; -extern compop_func op_117b_0_comp_ff; -extern compop_func op_117c_0_comp_ff; -extern compop_func op_1180_0_comp_ff; -extern compop_func op_1190_0_comp_ff; -extern compop_func op_1198_0_comp_ff; -extern compop_func op_11a0_0_comp_ff; -extern compop_func op_11a8_0_comp_ff; -extern compop_func op_11b0_0_comp_ff; -extern compop_func op_11b8_0_comp_ff; -extern compop_func op_11b9_0_comp_ff; -extern compop_func op_11ba_0_comp_ff; -extern compop_func op_11bb_0_comp_ff; -extern compop_func op_11bc_0_comp_ff; -extern compop_func op_11c0_0_comp_ff; -extern compop_func op_11d0_0_comp_ff; -extern compop_func op_11d8_0_comp_ff; -extern compop_func op_11e0_0_comp_ff; -extern compop_func op_11e8_0_comp_ff; -extern compop_func op_11f0_0_comp_ff; -extern compop_func op_11f8_0_comp_ff; -extern compop_func op_11f9_0_comp_ff; -extern compop_func op_11fa_0_comp_ff; -extern compop_func op_11fb_0_comp_ff; -extern compop_func op_11fc_0_comp_ff; -extern compop_func op_13c0_0_comp_ff; -extern compop_func op_13d0_0_comp_ff; -extern compop_func op_13d8_0_comp_ff; -extern compop_func op_13e0_0_comp_ff; -extern compop_func op_13e8_0_comp_ff; -extern compop_func op_13f0_0_comp_ff; -extern compop_func op_13f8_0_comp_ff; -extern compop_func op_13f9_0_comp_ff; -extern compop_func op_13fa_0_comp_ff; -extern compop_func op_13fb_0_comp_ff; -extern compop_func op_13fc_0_comp_ff; -extern compop_func op_2000_0_comp_ff; -extern compop_func op_2008_0_comp_ff; -extern compop_func op_2010_0_comp_ff; -extern compop_func op_2018_0_comp_ff; -extern compop_func op_2020_0_comp_ff; -extern compop_func op_2028_0_comp_ff; -extern compop_func op_2030_0_comp_ff; -extern compop_func op_2038_0_comp_ff; -extern compop_func op_2039_0_comp_ff; -extern compop_func op_203a_0_comp_ff; -extern compop_func op_203b_0_comp_ff; -extern compop_func op_203c_0_comp_ff; -extern compop_func op_2040_0_comp_ff; -extern compop_func op_2048_0_comp_ff; -extern compop_func op_2050_0_comp_ff; -extern compop_func op_2058_0_comp_ff; -extern compop_func op_2060_0_comp_ff; -extern compop_func op_2068_0_comp_ff; -extern compop_func op_2070_0_comp_ff; -extern compop_func op_2078_0_comp_ff; -extern compop_func op_2079_0_comp_ff; -extern compop_func op_207a_0_comp_ff; -extern compop_func op_207b_0_comp_ff; -extern compop_func op_207c_0_comp_ff; -extern compop_func op_2080_0_comp_ff; -extern compop_func op_2088_0_comp_ff; -extern compop_func op_2090_0_comp_ff; -extern compop_func op_2098_0_comp_ff; -extern compop_func op_20a0_0_comp_ff; -extern compop_func op_20a8_0_comp_ff; -extern compop_func op_20b0_0_comp_ff; -extern compop_func op_20b8_0_comp_ff; -extern compop_func op_20b9_0_comp_ff; -extern compop_func op_20ba_0_comp_ff; -extern compop_func op_20bb_0_comp_ff; -extern compop_func op_20bc_0_comp_ff; -extern compop_func op_20c0_0_comp_ff; -extern compop_func op_20c8_0_comp_ff; -extern compop_func op_20d0_0_comp_ff; -extern compop_func op_20d8_0_comp_ff; -extern compop_func op_20e0_0_comp_ff; -extern compop_func op_20e8_0_comp_ff; -extern compop_func op_20f0_0_comp_ff; -extern compop_func op_20f8_0_comp_ff; -extern compop_func op_20f9_0_comp_ff; -extern compop_func op_20fa_0_comp_ff; -extern compop_func op_20fb_0_comp_ff; -extern compop_func op_20fc_0_comp_ff; -extern compop_func op_2100_0_comp_ff; -extern compop_func op_2108_0_comp_ff; -extern compop_func op_2110_0_comp_ff; -extern compop_func op_2118_0_comp_ff; -extern compop_func op_2120_0_comp_ff; -extern compop_func op_2128_0_comp_ff; -extern compop_func op_2130_0_comp_ff; -extern compop_func op_2138_0_comp_ff; -extern compop_func op_2139_0_comp_ff; -extern compop_func op_213a_0_comp_ff; -extern compop_func op_213b_0_comp_ff; -extern compop_func op_213c_0_comp_ff; -extern compop_func op_2140_0_comp_ff; -extern compop_func op_2148_0_comp_ff; -extern compop_func op_2150_0_comp_ff; -extern compop_func op_2158_0_comp_ff; -extern compop_func op_2160_0_comp_ff; -extern compop_func op_2168_0_comp_ff; -extern compop_func op_2170_0_comp_ff; -extern compop_func op_2178_0_comp_ff; -extern compop_func op_2179_0_comp_ff; -extern compop_func op_217a_0_comp_ff; -extern compop_func op_217b_0_comp_ff; -extern compop_func op_217c_0_comp_ff; -extern compop_func op_2180_0_comp_ff; -extern compop_func op_2188_0_comp_ff; -extern compop_func op_2190_0_comp_ff; -extern compop_func op_2198_0_comp_ff; -extern compop_func op_21a0_0_comp_ff; -extern compop_func op_21a8_0_comp_ff; -extern compop_func op_21b0_0_comp_ff; -extern compop_func op_21b8_0_comp_ff; -extern compop_func op_21b9_0_comp_ff; -extern compop_func op_21ba_0_comp_ff; -extern compop_func op_21bb_0_comp_ff; -extern compop_func op_21bc_0_comp_ff; -extern compop_func op_21c0_0_comp_ff; -extern compop_func op_21c8_0_comp_ff; -extern compop_func op_21d0_0_comp_ff; -extern compop_func op_21d8_0_comp_ff; -extern compop_func op_21e0_0_comp_ff; -extern compop_func op_21e8_0_comp_ff; -extern compop_func op_21f0_0_comp_ff; -extern compop_func op_21f8_0_comp_ff; -extern compop_func op_21f9_0_comp_ff; -extern compop_func op_21fa_0_comp_ff; -extern compop_func op_21fb_0_comp_ff; -extern compop_func op_21fc_0_comp_ff; -extern compop_func op_23c0_0_comp_ff; -extern compop_func op_23c8_0_comp_ff; -extern compop_func op_23d0_0_comp_ff; -extern compop_func op_23d8_0_comp_ff; -extern compop_func op_23e0_0_comp_ff; -extern compop_func op_23e8_0_comp_ff; -extern compop_func op_23f0_0_comp_ff; -extern compop_func op_23f8_0_comp_ff; -extern compop_func op_23f9_0_comp_ff; -extern compop_func op_23fa_0_comp_ff; -extern compop_func op_23fb_0_comp_ff; -extern compop_func op_23fc_0_comp_ff; -extern compop_func op_3000_0_comp_ff; -extern compop_func op_3008_0_comp_ff; -extern compop_func op_3010_0_comp_ff; -extern compop_func op_3018_0_comp_ff; -extern compop_func op_3020_0_comp_ff; -extern compop_func op_3028_0_comp_ff; -extern compop_func op_3030_0_comp_ff; -extern compop_func op_3038_0_comp_ff; -extern compop_func op_3039_0_comp_ff; -extern compop_func op_303a_0_comp_ff; -extern compop_func op_303b_0_comp_ff; -extern compop_func op_303c_0_comp_ff; -extern compop_func op_3040_0_comp_ff; -extern compop_func op_3048_0_comp_ff; -extern compop_func op_3050_0_comp_ff; -extern compop_func op_3058_0_comp_ff; -extern compop_func op_3060_0_comp_ff; -extern compop_func op_3068_0_comp_ff; -extern compop_func op_3070_0_comp_ff; -extern compop_func op_3078_0_comp_ff; -extern compop_func op_3079_0_comp_ff; -extern compop_func op_307a_0_comp_ff; -extern compop_func op_307b_0_comp_ff; -extern compop_func op_307c_0_comp_ff; -extern compop_func op_3080_0_comp_ff; -extern compop_func op_3088_0_comp_ff; -extern compop_func op_3090_0_comp_ff; -extern compop_func op_3098_0_comp_ff; -extern compop_func op_30a0_0_comp_ff; -extern compop_func op_30a8_0_comp_ff; -extern compop_func op_30b0_0_comp_ff; -extern compop_func op_30b8_0_comp_ff; -extern compop_func op_30b9_0_comp_ff; -extern compop_func op_30ba_0_comp_ff; -extern compop_func op_30bb_0_comp_ff; -extern compop_func op_30bc_0_comp_ff; -extern compop_func op_30c0_0_comp_ff; -extern compop_func op_30c8_0_comp_ff; -extern compop_func op_30d0_0_comp_ff; -extern compop_func op_30d8_0_comp_ff; -extern compop_func op_30e0_0_comp_ff; -extern compop_func op_30e8_0_comp_ff; -extern compop_func op_30f0_0_comp_ff; -extern compop_func op_30f8_0_comp_ff; -extern compop_func op_30f9_0_comp_ff; -extern compop_func op_30fa_0_comp_ff; -extern compop_func op_30fb_0_comp_ff; -extern compop_func op_30fc_0_comp_ff; -extern compop_func op_3100_0_comp_ff; -extern compop_func op_3108_0_comp_ff; -extern compop_func op_3110_0_comp_ff; -extern compop_func op_3118_0_comp_ff; -extern compop_func op_3120_0_comp_ff; -extern compop_func op_3128_0_comp_ff; -extern compop_func op_3130_0_comp_ff; -extern compop_func op_3138_0_comp_ff; -extern compop_func op_3139_0_comp_ff; -extern compop_func op_313a_0_comp_ff; -extern compop_func op_313b_0_comp_ff; -extern compop_func op_313c_0_comp_ff; -extern compop_func op_3140_0_comp_ff; -extern compop_func op_3148_0_comp_ff; -extern compop_func op_3150_0_comp_ff; -extern compop_func op_3158_0_comp_ff; -extern compop_func op_3160_0_comp_ff; -extern compop_func op_3168_0_comp_ff; -extern compop_func op_3170_0_comp_ff; -extern compop_func op_3178_0_comp_ff; -extern compop_func op_3179_0_comp_ff; -extern compop_func op_317a_0_comp_ff; -extern compop_func op_317b_0_comp_ff; -extern compop_func op_317c_0_comp_ff; -extern compop_func op_3180_0_comp_ff; -extern compop_func op_3188_0_comp_ff; -extern compop_func op_3190_0_comp_ff; -extern compop_func op_3198_0_comp_ff; -extern compop_func op_31a0_0_comp_ff; -extern compop_func op_31a8_0_comp_ff; -extern compop_func op_31b0_0_comp_ff; -extern compop_func op_31b8_0_comp_ff; -extern compop_func op_31b9_0_comp_ff; -extern compop_func op_31ba_0_comp_ff; -extern compop_func op_31bb_0_comp_ff; -extern compop_func op_31bc_0_comp_ff; -extern compop_func op_31c0_0_comp_ff; -extern compop_func op_31c8_0_comp_ff; -extern compop_func op_31d0_0_comp_ff; -extern compop_func op_31d8_0_comp_ff; -extern compop_func op_31e0_0_comp_ff; -extern compop_func op_31e8_0_comp_ff; -extern compop_func op_31f0_0_comp_ff; -extern compop_func op_31f8_0_comp_ff; -extern compop_func op_31f9_0_comp_ff; -extern compop_func op_31fa_0_comp_ff; -extern compop_func op_31fb_0_comp_ff; -extern compop_func op_31fc_0_comp_ff; -extern compop_func op_33c0_0_comp_ff; -extern compop_func op_33c8_0_comp_ff; -extern compop_func op_33d0_0_comp_ff; -extern compop_func op_33d8_0_comp_ff; -extern compop_func op_33e0_0_comp_ff; -extern compop_func op_33e8_0_comp_ff; -extern compop_func op_33f0_0_comp_ff; -extern compop_func op_33f8_0_comp_ff; -extern compop_func op_33f9_0_comp_ff; -extern compop_func op_33fa_0_comp_ff; -extern compop_func op_33fb_0_comp_ff; -extern compop_func op_33fc_0_comp_ff; -extern compop_func op_4000_0_comp_ff; -extern compop_func op_4010_0_comp_ff; -extern compop_func op_4018_0_comp_ff; -extern compop_func op_4020_0_comp_ff; -extern compop_func op_4028_0_comp_ff; -extern compop_func op_4030_0_comp_ff; -extern compop_func op_4038_0_comp_ff; -extern compop_func op_4039_0_comp_ff; -extern compop_func op_4040_0_comp_ff; -extern compop_func op_4050_0_comp_ff; -extern compop_func op_4058_0_comp_ff; -extern compop_func op_4060_0_comp_ff; -extern compop_func op_4068_0_comp_ff; -extern compop_func op_4070_0_comp_ff; -extern compop_func op_4078_0_comp_ff; -extern compop_func op_4079_0_comp_ff; -extern compop_func op_4080_0_comp_ff; -extern compop_func op_4090_0_comp_ff; -extern compop_func op_4098_0_comp_ff; -extern compop_func op_40a0_0_comp_ff; -extern compop_func op_40a8_0_comp_ff; -extern compop_func op_40b0_0_comp_ff; -extern compop_func op_40b8_0_comp_ff; -extern compop_func op_40b9_0_comp_ff; -extern compop_func op_41d0_0_comp_ff; -extern compop_func op_41e8_0_comp_ff; -extern compop_func op_41f0_0_comp_ff; -extern compop_func op_41f8_0_comp_ff; -extern compop_func op_41f9_0_comp_ff; -extern compop_func op_41fa_0_comp_ff; -extern compop_func op_41fb_0_comp_ff; -extern compop_func op_4200_0_comp_ff; -extern compop_func op_4210_0_comp_ff; -extern compop_func op_4218_0_comp_ff; -extern compop_func op_4220_0_comp_ff; -extern compop_func op_4228_0_comp_ff; -extern compop_func op_4230_0_comp_ff; -extern compop_func op_4238_0_comp_ff; -extern compop_func op_4239_0_comp_ff; -extern compop_func op_4240_0_comp_ff; -extern compop_func op_4250_0_comp_ff; -extern compop_func op_4258_0_comp_ff; -extern compop_func op_4260_0_comp_ff; -extern compop_func op_4268_0_comp_ff; -extern compop_func op_4270_0_comp_ff; -extern compop_func op_4278_0_comp_ff; -extern compop_func op_4279_0_comp_ff; -extern compop_func op_4280_0_comp_ff; -extern compop_func op_4290_0_comp_ff; -extern compop_func op_4298_0_comp_ff; -extern compop_func op_42a0_0_comp_ff; -extern compop_func op_42a8_0_comp_ff; -extern compop_func op_42b0_0_comp_ff; -extern compop_func op_42b8_0_comp_ff; -extern compop_func op_42b9_0_comp_ff; -extern compop_func op_4400_0_comp_ff; -extern compop_func op_4410_0_comp_ff; -extern compop_func op_4418_0_comp_ff; -extern compop_func op_4420_0_comp_ff; -extern compop_func op_4428_0_comp_ff; -extern compop_func op_4430_0_comp_ff; -extern compop_func op_4438_0_comp_ff; -extern compop_func op_4439_0_comp_ff; -extern compop_func op_4440_0_comp_ff; -extern compop_func op_4450_0_comp_ff; -extern compop_func op_4458_0_comp_ff; -extern compop_func op_4460_0_comp_ff; -extern compop_func op_4468_0_comp_ff; -extern compop_func op_4470_0_comp_ff; -extern compop_func op_4478_0_comp_ff; -extern compop_func op_4479_0_comp_ff; -extern compop_func op_4480_0_comp_ff; -extern compop_func op_4490_0_comp_ff; -extern compop_func op_4498_0_comp_ff; -extern compop_func op_44a0_0_comp_ff; -extern compop_func op_44a8_0_comp_ff; -extern compop_func op_44b0_0_comp_ff; -extern compop_func op_44b8_0_comp_ff; -extern compop_func op_44b9_0_comp_ff; -extern compop_func op_4600_0_comp_ff; -extern compop_func op_4610_0_comp_ff; -extern compop_func op_4618_0_comp_ff; -extern compop_func op_4620_0_comp_ff; -extern compop_func op_4628_0_comp_ff; -extern compop_func op_4630_0_comp_ff; -extern compop_func op_4638_0_comp_ff; -extern compop_func op_4639_0_comp_ff; -extern compop_func op_4640_0_comp_ff; -extern compop_func op_4650_0_comp_ff; -extern compop_func op_4658_0_comp_ff; -extern compop_func op_4660_0_comp_ff; -extern compop_func op_4668_0_comp_ff; -extern compop_func op_4670_0_comp_ff; -extern compop_func op_4678_0_comp_ff; -extern compop_func op_4679_0_comp_ff; -extern compop_func op_4680_0_comp_ff; -extern compop_func op_4690_0_comp_ff; -extern compop_func op_4698_0_comp_ff; -extern compop_func op_46a0_0_comp_ff; -extern compop_func op_46a8_0_comp_ff; -extern compop_func op_46b0_0_comp_ff; -extern compop_func op_46b8_0_comp_ff; -extern compop_func op_46b9_0_comp_ff; -extern compop_func op_4808_0_comp_ff; -extern compop_func op_4840_0_comp_ff; -extern compop_func op_4850_0_comp_ff; -extern compop_func op_4868_0_comp_ff; -extern compop_func op_4870_0_comp_ff; -extern compop_func op_4878_0_comp_ff; -extern compop_func op_4879_0_comp_ff; -extern compop_func op_487a_0_comp_ff; -extern compop_func op_487b_0_comp_ff; -extern compop_func op_4880_0_comp_ff; -extern compop_func op_4890_0_comp_ff; -extern compop_func op_48a0_0_comp_ff; -extern compop_func op_48a8_0_comp_ff; -extern compop_func op_48b0_0_comp_ff; -extern compop_func op_48b8_0_comp_ff; -extern compop_func op_48b9_0_comp_ff; -extern compop_func op_48c0_0_comp_ff; -extern compop_func op_48d0_0_comp_ff; -extern compop_func op_48e0_0_comp_ff; -extern compop_func op_48e8_0_comp_ff; -extern compop_func op_48f0_0_comp_ff; -extern compop_func op_48f8_0_comp_ff; -extern compop_func op_48f9_0_comp_ff; -extern compop_func op_49c0_0_comp_ff; -extern compop_func op_4a00_0_comp_ff; -extern compop_func op_4a10_0_comp_ff; -extern compop_func op_4a18_0_comp_ff; -extern compop_func op_4a20_0_comp_ff; -extern compop_func op_4a28_0_comp_ff; -extern compop_func op_4a30_0_comp_ff; -extern compop_func op_4a38_0_comp_ff; -extern compop_func op_4a39_0_comp_ff; -extern compop_func op_4a3a_0_comp_ff; -extern compop_func op_4a3b_0_comp_ff; -extern compop_func op_4a3c_0_comp_ff; -extern compop_func op_4a40_0_comp_ff; -extern compop_func op_4a48_0_comp_ff; -extern compop_func op_4a50_0_comp_ff; -extern compop_func op_4a58_0_comp_ff; -extern compop_func op_4a60_0_comp_ff; -extern compop_func op_4a68_0_comp_ff; -extern compop_func op_4a70_0_comp_ff; -extern compop_func op_4a78_0_comp_ff; -extern compop_func op_4a79_0_comp_ff; -extern compop_func op_4a7a_0_comp_ff; -extern compop_func op_4a7b_0_comp_ff; -extern compop_func op_4a7c_0_comp_ff; -extern compop_func op_4a80_0_comp_ff; -extern compop_func op_4a88_0_comp_ff; -extern compop_func op_4a90_0_comp_ff; -extern compop_func op_4a98_0_comp_ff; -extern compop_func op_4aa0_0_comp_ff; -extern compop_func op_4aa8_0_comp_ff; -extern compop_func op_4ab0_0_comp_ff; -extern compop_func op_4ab8_0_comp_ff; -extern compop_func op_4ab9_0_comp_ff; -extern compop_func op_4aba_0_comp_ff; -extern compop_func op_4abb_0_comp_ff; -extern compop_func op_4abc_0_comp_ff; -extern compop_func op_4c00_0_comp_ff; -extern compop_func op_4c10_0_comp_ff; -extern compop_func op_4c18_0_comp_ff; -extern compop_func op_4c20_0_comp_ff; -extern compop_func op_4c28_0_comp_ff; -extern compop_func op_4c30_0_comp_ff; -extern compop_func op_4c38_0_comp_ff; -extern compop_func op_4c39_0_comp_ff; -extern compop_func op_4c3a_0_comp_ff; -extern compop_func op_4c3b_0_comp_ff; -extern compop_func op_4c3c_0_comp_ff; -extern compop_func op_4c40_0_comp_ff; -extern compop_func op_4c50_0_comp_ff; -extern compop_func op_4c58_0_comp_ff; -extern compop_func op_4c60_0_comp_ff; -extern compop_func op_4c68_0_comp_ff; -extern compop_func op_4c70_0_comp_ff; -extern compop_func op_4c78_0_comp_ff; -extern compop_func op_4c79_0_comp_ff; -extern compop_func op_4c7a_0_comp_ff; -extern compop_func op_4c7b_0_comp_ff; -extern compop_func op_4c7c_0_comp_ff; -extern compop_func op_4c90_0_comp_ff; -extern compop_func op_4c98_0_comp_ff; -extern compop_func op_4ca8_0_comp_ff; -extern compop_func op_4cb0_0_comp_ff; -extern compop_func op_4cb8_0_comp_ff; -extern compop_func op_4cb9_0_comp_ff; -extern compop_func op_4cba_0_comp_ff; -extern compop_func op_4cbb_0_comp_ff; -extern compop_func op_4cd0_0_comp_ff; -extern compop_func op_4cd8_0_comp_ff; -extern compop_func op_4ce8_0_comp_ff; -extern compop_func op_4cf0_0_comp_ff; -extern compop_func op_4cf8_0_comp_ff; -extern compop_func op_4cf9_0_comp_ff; -extern compop_func op_4cfa_0_comp_ff; -extern compop_func op_4cfb_0_comp_ff; -extern compop_func op_4e50_0_comp_ff; -extern compop_func op_4e58_0_comp_ff; -extern compop_func op_4e71_0_comp_ff; -extern compop_func op_4e74_0_comp_ff; -extern compop_func op_4e75_0_comp_ff; -extern compop_func op_4e90_0_comp_ff; -extern compop_func op_4ea8_0_comp_ff; -extern compop_func op_4eb0_0_comp_ff; -extern compop_func op_4eb8_0_comp_ff; -extern compop_func op_4eb9_0_comp_ff; -extern compop_func op_4eba_0_comp_ff; -extern compop_func op_4ebb_0_comp_ff; -extern compop_func op_4ed0_0_comp_ff; -extern compop_func op_4ee8_0_comp_ff; -extern compop_func op_4ef0_0_comp_ff; -extern compop_func op_4ef8_0_comp_ff; -extern compop_func op_4ef9_0_comp_ff; -extern compop_func op_4efa_0_comp_ff; -extern compop_func op_4efb_0_comp_ff; -extern compop_func op_5000_0_comp_ff; -extern compop_func op_5010_0_comp_ff; -extern compop_func op_5018_0_comp_ff; -extern compop_func op_5020_0_comp_ff; -extern compop_func op_5028_0_comp_ff; -extern compop_func op_5030_0_comp_ff; -extern compop_func op_5038_0_comp_ff; -extern compop_func op_5039_0_comp_ff; -extern compop_func op_5040_0_comp_ff; -extern compop_func op_5048_0_comp_ff; -extern compop_func op_5050_0_comp_ff; -extern compop_func op_5058_0_comp_ff; -extern compop_func op_5060_0_comp_ff; -extern compop_func op_5068_0_comp_ff; -extern compop_func op_5070_0_comp_ff; -extern compop_func op_5078_0_comp_ff; -extern compop_func op_5079_0_comp_ff; -extern compop_func op_5080_0_comp_ff; -extern compop_func op_5088_0_comp_ff; -extern compop_func op_5090_0_comp_ff; -extern compop_func op_5098_0_comp_ff; -extern compop_func op_50a0_0_comp_ff; -extern compop_func op_50a8_0_comp_ff; -extern compop_func op_50b0_0_comp_ff; -extern compop_func op_50b8_0_comp_ff; -extern compop_func op_50b9_0_comp_ff; -extern compop_func op_50c0_0_comp_ff; -extern compop_func op_50c8_0_comp_ff; -extern compop_func op_50d0_0_comp_ff; -extern compop_func op_50d8_0_comp_ff; -extern compop_func op_50e0_0_comp_ff; -extern compop_func op_50e8_0_comp_ff; -extern compop_func op_50f0_0_comp_ff; -extern compop_func op_50f8_0_comp_ff; -extern compop_func op_50f9_0_comp_ff; -extern compop_func op_5100_0_comp_ff; -extern compop_func op_5110_0_comp_ff; -extern compop_func op_5118_0_comp_ff; -extern compop_func op_5120_0_comp_ff; -extern compop_func op_5128_0_comp_ff; -extern compop_func op_5130_0_comp_ff; -extern compop_func op_5138_0_comp_ff; -extern compop_func op_5139_0_comp_ff; -extern compop_func op_5140_0_comp_ff; -extern compop_func op_5148_0_comp_ff; -extern compop_func op_5150_0_comp_ff; -extern compop_func op_5158_0_comp_ff; -extern compop_func op_5160_0_comp_ff; -extern compop_func op_5168_0_comp_ff; -extern compop_func op_5170_0_comp_ff; -extern compop_func op_5178_0_comp_ff; -extern compop_func op_5179_0_comp_ff; -extern compop_func op_5180_0_comp_ff; -extern compop_func op_5188_0_comp_ff; -extern compop_func op_5190_0_comp_ff; -extern compop_func op_5198_0_comp_ff; -extern compop_func op_51a0_0_comp_ff; -extern compop_func op_51a8_0_comp_ff; -extern compop_func op_51b0_0_comp_ff; -extern compop_func op_51b8_0_comp_ff; -extern compop_func op_51b9_0_comp_ff; -extern compop_func op_51c0_0_comp_ff; -extern compop_func op_51c8_0_comp_ff; -extern compop_func op_51d0_0_comp_ff; -extern compop_func op_51d8_0_comp_ff; -extern compop_func op_51e0_0_comp_ff; -extern compop_func op_51e8_0_comp_ff; -extern compop_func op_51f0_0_comp_ff; -extern compop_func op_51f8_0_comp_ff; -extern compop_func op_51f9_0_comp_ff; -extern compop_func op_52c0_0_comp_ff; -extern compop_func op_52c8_0_comp_ff; -extern compop_func op_52d0_0_comp_ff; -extern compop_func op_52d8_0_comp_ff; -extern compop_func op_52e0_0_comp_ff; -extern compop_func op_52e8_0_comp_ff; -extern compop_func op_52f0_0_comp_ff; -extern compop_func op_52f8_0_comp_ff; -extern compop_func op_52f9_0_comp_ff; -extern compop_func op_53c0_0_comp_ff; -extern compop_func op_53c8_0_comp_ff; -extern compop_func op_53d0_0_comp_ff; -extern compop_func op_53d8_0_comp_ff; -extern compop_func op_53e0_0_comp_ff; -extern compop_func op_53e8_0_comp_ff; -extern compop_func op_53f0_0_comp_ff; -extern compop_func op_53f8_0_comp_ff; -extern compop_func op_53f9_0_comp_ff; -extern compop_func op_54c0_0_comp_ff; -extern compop_func op_54c8_0_comp_ff; -extern compop_func op_54d0_0_comp_ff; -extern compop_func op_54d8_0_comp_ff; -extern compop_func op_54e0_0_comp_ff; -extern compop_func op_54e8_0_comp_ff; -extern compop_func op_54f0_0_comp_ff; -extern compop_func op_54f8_0_comp_ff; -extern compop_func op_54f9_0_comp_ff; -extern compop_func op_55c0_0_comp_ff; -extern compop_func op_55c8_0_comp_ff; -extern compop_func op_55d0_0_comp_ff; -extern compop_func op_55d8_0_comp_ff; -extern compop_func op_55e0_0_comp_ff; -extern compop_func op_55e8_0_comp_ff; -extern compop_func op_55f0_0_comp_ff; -extern compop_func op_55f8_0_comp_ff; -extern compop_func op_55f9_0_comp_ff; -extern compop_func op_56c0_0_comp_ff; -extern compop_func op_56c8_0_comp_ff; -extern compop_func op_56d0_0_comp_ff; -extern compop_func op_56d8_0_comp_ff; -extern compop_func op_56e0_0_comp_ff; -extern compop_func op_56e8_0_comp_ff; -extern compop_func op_56f0_0_comp_ff; -extern compop_func op_56f8_0_comp_ff; -extern compop_func op_56f9_0_comp_ff; -extern compop_func op_57c0_0_comp_ff; -extern compop_func op_57c8_0_comp_ff; -extern compop_func op_57d0_0_comp_ff; -extern compop_func op_57d8_0_comp_ff; -extern compop_func op_57e0_0_comp_ff; -extern compop_func op_57e8_0_comp_ff; -extern compop_func op_57f0_0_comp_ff; -extern compop_func op_57f8_0_comp_ff; -extern compop_func op_57f9_0_comp_ff; -extern compop_func op_58c0_0_comp_ff; -extern compop_func op_58c8_0_comp_ff; -extern compop_func op_58d0_0_comp_ff; -extern compop_func op_58d8_0_comp_ff; -extern compop_func op_58e0_0_comp_ff; -extern compop_func op_58e8_0_comp_ff; -extern compop_func op_58f0_0_comp_ff; -extern compop_func op_58f8_0_comp_ff; -extern compop_func op_58f9_0_comp_ff; -extern compop_func op_59c0_0_comp_ff; -extern compop_func op_59c8_0_comp_ff; -extern compop_func op_59d0_0_comp_ff; -extern compop_func op_59d8_0_comp_ff; -extern compop_func op_59e0_0_comp_ff; -extern compop_func op_59e8_0_comp_ff; -extern compop_func op_59f0_0_comp_ff; -extern compop_func op_59f8_0_comp_ff; -extern compop_func op_59f9_0_comp_ff; -extern compop_func op_5ac0_0_comp_ff; -extern compop_func op_5ac8_0_comp_ff; -extern compop_func op_5ad0_0_comp_ff; -extern compop_func op_5ad8_0_comp_ff; -extern compop_func op_5ae0_0_comp_ff; -extern compop_func op_5ae8_0_comp_ff; -extern compop_func op_5af0_0_comp_ff; -extern compop_func op_5af8_0_comp_ff; -extern compop_func op_5af9_0_comp_ff; -extern compop_func op_5bc0_0_comp_ff; -extern compop_func op_5bc8_0_comp_ff; -extern compop_func op_5bd0_0_comp_ff; -extern compop_func op_5bd8_0_comp_ff; -extern compop_func op_5be0_0_comp_ff; -extern compop_func op_5be8_0_comp_ff; -extern compop_func op_5bf0_0_comp_ff; -extern compop_func op_5bf8_0_comp_ff; -extern compop_func op_5bf9_0_comp_ff; -extern compop_func op_5cc0_0_comp_ff; -extern compop_func op_5cc8_0_comp_ff; -extern compop_func op_5cd0_0_comp_ff; -extern compop_func op_5cd8_0_comp_ff; -extern compop_func op_5ce0_0_comp_ff; -extern compop_func op_5ce8_0_comp_ff; -extern compop_func op_5cf0_0_comp_ff; -extern compop_func op_5cf8_0_comp_ff; -extern compop_func op_5cf9_0_comp_ff; -extern compop_func op_5dc0_0_comp_ff; -extern compop_func op_5dc8_0_comp_ff; -extern compop_func op_5dd0_0_comp_ff; -extern compop_func op_5dd8_0_comp_ff; -extern compop_func op_5de0_0_comp_ff; -extern compop_func op_5de8_0_comp_ff; -extern compop_func op_5df0_0_comp_ff; -extern compop_func op_5df8_0_comp_ff; -extern compop_func op_5df9_0_comp_ff; -extern compop_func op_5ec0_0_comp_ff; -extern compop_func op_5ec8_0_comp_ff; -extern compop_func op_5ed0_0_comp_ff; -extern compop_func op_5ed8_0_comp_ff; -extern compop_func op_5ee0_0_comp_ff; -extern compop_func op_5ee8_0_comp_ff; -extern compop_func op_5ef0_0_comp_ff; -extern compop_func op_5ef8_0_comp_ff; -extern compop_func op_5ef9_0_comp_ff; -extern compop_func op_5fc0_0_comp_ff; -extern compop_func op_5fc8_0_comp_ff; -extern compop_func op_5fd0_0_comp_ff; -extern compop_func op_5fd8_0_comp_ff; -extern compop_func op_5fe0_0_comp_ff; -extern compop_func op_5fe8_0_comp_ff; -extern compop_func op_5ff0_0_comp_ff; -extern compop_func op_5ff8_0_comp_ff; -extern compop_func op_5ff9_0_comp_ff; -extern compop_func op_6000_0_comp_ff; -extern compop_func op_6001_0_comp_ff; -extern compop_func op_60ff_0_comp_ff; -extern compop_func op_6100_0_comp_ff; -extern compop_func op_6101_0_comp_ff; -extern compop_func op_61ff_0_comp_ff; -extern compop_func op_6200_0_comp_ff; -extern compop_func op_6201_0_comp_ff; -extern compop_func op_62ff_0_comp_ff; -extern compop_func op_6300_0_comp_ff; -extern compop_func op_6301_0_comp_ff; -extern compop_func op_63ff_0_comp_ff; -extern compop_func op_6400_0_comp_ff; -extern compop_func op_6401_0_comp_ff; -extern compop_func op_64ff_0_comp_ff; -extern compop_func op_6500_0_comp_ff; -extern compop_func op_6501_0_comp_ff; -extern compop_func op_65ff_0_comp_ff; -extern compop_func op_6600_0_comp_ff; -extern compop_func op_6601_0_comp_ff; -extern compop_func op_66ff_0_comp_ff; -extern compop_func op_6700_0_comp_ff; -extern compop_func op_6701_0_comp_ff; -extern compop_func op_67ff_0_comp_ff; -extern compop_func op_6800_0_comp_ff; -extern compop_func op_6801_0_comp_ff; -extern compop_func op_68ff_0_comp_ff; -extern compop_func op_6900_0_comp_ff; -extern compop_func op_6901_0_comp_ff; -extern compop_func op_69ff_0_comp_ff; -extern compop_func op_6a00_0_comp_ff; -extern compop_func op_6a01_0_comp_ff; -extern compop_func op_6aff_0_comp_ff; -extern compop_func op_6b00_0_comp_ff; -extern compop_func op_6b01_0_comp_ff; -extern compop_func op_6bff_0_comp_ff; -extern compop_func op_6c00_0_comp_ff; -extern compop_func op_6c01_0_comp_ff; -extern compop_func op_6cff_0_comp_ff; -extern compop_func op_6d00_0_comp_ff; -extern compop_func op_6d01_0_comp_ff; -extern compop_func op_6dff_0_comp_ff; -extern compop_func op_6e00_0_comp_ff; -extern compop_func op_6e01_0_comp_ff; -extern compop_func op_6eff_0_comp_ff; -extern compop_func op_6f00_0_comp_ff; -extern compop_func op_6f01_0_comp_ff; -extern compop_func op_6fff_0_comp_ff; -extern compop_func op_7000_0_comp_ff; -extern compop_func op_8000_0_comp_ff; -extern compop_func op_8010_0_comp_ff; -extern compop_func op_8018_0_comp_ff; -extern compop_func op_8020_0_comp_ff; -extern compop_func op_8028_0_comp_ff; -extern compop_func op_8030_0_comp_ff; -extern compop_func op_8038_0_comp_ff; -extern compop_func op_8039_0_comp_ff; -extern compop_func op_803a_0_comp_ff; -extern compop_func op_803b_0_comp_ff; -extern compop_func op_803c_0_comp_ff; -extern compop_func op_8040_0_comp_ff; -extern compop_func op_8050_0_comp_ff; -extern compop_func op_8058_0_comp_ff; -extern compop_func op_8060_0_comp_ff; -extern compop_func op_8068_0_comp_ff; -extern compop_func op_8070_0_comp_ff; -extern compop_func op_8078_0_comp_ff; -extern compop_func op_8079_0_comp_ff; -extern compop_func op_807a_0_comp_ff; -extern compop_func op_807b_0_comp_ff; -extern compop_func op_807c_0_comp_ff; -extern compop_func op_8080_0_comp_ff; -extern compop_func op_8090_0_comp_ff; -extern compop_func op_8098_0_comp_ff; -extern compop_func op_80a0_0_comp_ff; -extern compop_func op_80a8_0_comp_ff; -extern compop_func op_80b0_0_comp_ff; -extern compop_func op_80b8_0_comp_ff; -extern compop_func op_80b9_0_comp_ff; -extern compop_func op_80ba_0_comp_ff; -extern compop_func op_80bb_0_comp_ff; -extern compop_func op_80bc_0_comp_ff; -extern compop_func op_80c0_0_comp_ff; -extern compop_func op_80d0_0_comp_ff; -extern compop_func op_80d8_0_comp_ff; -extern compop_func op_80e0_0_comp_ff; -extern compop_func op_80e8_0_comp_ff; -extern compop_func op_80f0_0_comp_ff; -extern compop_func op_80f8_0_comp_ff; -extern compop_func op_80f9_0_comp_ff; -extern compop_func op_80fa_0_comp_ff; -extern compop_func op_80fb_0_comp_ff; -extern compop_func op_80fc_0_comp_ff; -extern compop_func op_8110_0_comp_ff; -extern compop_func op_8118_0_comp_ff; -extern compop_func op_8120_0_comp_ff; -extern compop_func op_8128_0_comp_ff; -extern compop_func op_8130_0_comp_ff; -extern compop_func op_8138_0_comp_ff; -extern compop_func op_8139_0_comp_ff; -extern compop_func op_8150_0_comp_ff; -extern compop_func op_8158_0_comp_ff; -extern compop_func op_8160_0_comp_ff; -extern compop_func op_8168_0_comp_ff; -extern compop_func op_8170_0_comp_ff; -extern compop_func op_8178_0_comp_ff; -extern compop_func op_8179_0_comp_ff; -extern compop_func op_8190_0_comp_ff; -extern compop_func op_8198_0_comp_ff; -extern compop_func op_81a0_0_comp_ff; -extern compop_func op_81a8_0_comp_ff; -extern compop_func op_81b0_0_comp_ff; -extern compop_func op_81b8_0_comp_ff; -extern compop_func op_81b9_0_comp_ff; -extern compop_func op_81c0_0_comp_ff; -extern compop_func op_81d0_0_comp_ff; -extern compop_func op_81d8_0_comp_ff; -extern compop_func op_81e0_0_comp_ff; -extern compop_func op_81e8_0_comp_ff; -extern compop_func op_81f0_0_comp_ff; -extern compop_func op_81f8_0_comp_ff; -extern compop_func op_81f9_0_comp_ff; -extern compop_func op_81fa_0_comp_ff; -extern compop_func op_81fb_0_comp_ff; -extern compop_func op_81fc_0_comp_ff; -extern compop_func op_9000_0_comp_ff; -extern compop_func op_9010_0_comp_ff; -extern compop_func op_9018_0_comp_ff; -extern compop_func op_9020_0_comp_ff; -extern compop_func op_9028_0_comp_ff; -extern compop_func op_9030_0_comp_ff; -extern compop_func op_9038_0_comp_ff; -extern compop_func op_9039_0_comp_ff; -extern compop_func op_903a_0_comp_ff; -extern compop_func op_903b_0_comp_ff; -extern compop_func op_903c_0_comp_ff; -extern compop_func op_9040_0_comp_ff; -extern compop_func op_9048_0_comp_ff; -extern compop_func op_9050_0_comp_ff; -extern compop_func op_9058_0_comp_ff; -extern compop_func op_9060_0_comp_ff; -extern compop_func op_9068_0_comp_ff; -extern compop_func op_9070_0_comp_ff; -extern compop_func op_9078_0_comp_ff; -extern compop_func op_9079_0_comp_ff; -extern compop_func op_907a_0_comp_ff; -extern compop_func op_907b_0_comp_ff; -extern compop_func op_907c_0_comp_ff; -extern compop_func op_9080_0_comp_ff; -extern compop_func op_9088_0_comp_ff; -extern compop_func op_9090_0_comp_ff; -extern compop_func op_9098_0_comp_ff; -extern compop_func op_90a0_0_comp_ff; -extern compop_func op_90a8_0_comp_ff; -extern compop_func op_90b0_0_comp_ff; -extern compop_func op_90b8_0_comp_ff; -extern compop_func op_90b9_0_comp_ff; -extern compop_func op_90ba_0_comp_ff; -extern compop_func op_90bb_0_comp_ff; -extern compop_func op_90bc_0_comp_ff; -extern compop_func op_90c0_0_comp_ff; -extern compop_func op_90c8_0_comp_ff; -extern compop_func op_90d0_0_comp_ff; -extern compop_func op_90d8_0_comp_ff; -extern compop_func op_90e0_0_comp_ff; -extern compop_func op_90e8_0_comp_ff; -extern compop_func op_90f0_0_comp_ff; -extern compop_func op_90f8_0_comp_ff; -extern compop_func op_90f9_0_comp_ff; -extern compop_func op_90fa_0_comp_ff; -extern compop_func op_90fb_0_comp_ff; -extern compop_func op_90fc_0_comp_ff; -extern compop_func op_9100_0_comp_ff; -extern compop_func op_9108_0_comp_ff; -extern compop_func op_9110_0_comp_ff; -extern compop_func op_9118_0_comp_ff; -extern compop_func op_9120_0_comp_ff; -extern compop_func op_9128_0_comp_ff; -extern compop_func op_9130_0_comp_ff; -extern compop_func op_9138_0_comp_ff; -extern compop_func op_9139_0_comp_ff; -extern compop_func op_9140_0_comp_ff; -extern compop_func op_9148_0_comp_ff; -extern compop_func op_9150_0_comp_ff; -extern compop_func op_9158_0_comp_ff; -extern compop_func op_9160_0_comp_ff; -extern compop_func op_9168_0_comp_ff; -extern compop_func op_9170_0_comp_ff; -extern compop_func op_9178_0_comp_ff; -extern compop_func op_9179_0_comp_ff; -extern compop_func op_9180_0_comp_ff; -extern compop_func op_9188_0_comp_ff; -extern compop_func op_9190_0_comp_ff; -extern compop_func op_9198_0_comp_ff; -extern compop_func op_91a0_0_comp_ff; -extern compop_func op_91a8_0_comp_ff; -extern compop_func op_91b0_0_comp_ff; -extern compop_func op_91b8_0_comp_ff; -extern compop_func op_91b9_0_comp_ff; -extern compop_func op_91c0_0_comp_ff; -extern compop_func op_91c8_0_comp_ff; -extern compop_func op_91d0_0_comp_ff; -extern compop_func op_91d8_0_comp_ff; -extern compop_func op_91e0_0_comp_ff; -extern compop_func op_91e8_0_comp_ff; -extern compop_func op_91f0_0_comp_ff; -extern compop_func op_91f8_0_comp_ff; -extern compop_func op_91f9_0_comp_ff; -extern compop_func op_91fa_0_comp_ff; -extern compop_func op_91fb_0_comp_ff; -extern compop_func op_91fc_0_comp_ff; -extern compop_func op_b000_0_comp_ff; -extern compop_func op_b010_0_comp_ff; -extern compop_func op_b018_0_comp_ff; -extern compop_func op_b020_0_comp_ff; -extern compop_func op_b028_0_comp_ff; -extern compop_func op_b030_0_comp_ff; -extern compop_func op_b038_0_comp_ff; -extern compop_func op_b039_0_comp_ff; -extern compop_func op_b03a_0_comp_ff; -extern compop_func op_b03b_0_comp_ff; -extern compop_func op_b03c_0_comp_ff; -extern compop_func op_b040_0_comp_ff; -extern compop_func op_b048_0_comp_ff; -extern compop_func op_b050_0_comp_ff; -extern compop_func op_b058_0_comp_ff; -extern compop_func op_b060_0_comp_ff; -extern compop_func op_b068_0_comp_ff; -extern compop_func op_b070_0_comp_ff; -extern compop_func op_b078_0_comp_ff; -extern compop_func op_b079_0_comp_ff; -extern compop_func op_b07a_0_comp_ff; -extern compop_func op_b07b_0_comp_ff; -extern compop_func op_b07c_0_comp_ff; -extern compop_func op_b080_0_comp_ff; -extern compop_func op_b088_0_comp_ff; -extern compop_func op_b090_0_comp_ff; -extern compop_func op_b098_0_comp_ff; -extern compop_func op_b0a0_0_comp_ff; -extern compop_func op_b0a8_0_comp_ff; -extern compop_func op_b0b0_0_comp_ff; -extern compop_func op_b0b8_0_comp_ff; -extern compop_func op_b0b9_0_comp_ff; -extern compop_func op_b0ba_0_comp_ff; -extern compop_func op_b0bb_0_comp_ff; -extern compop_func op_b0bc_0_comp_ff; -extern compop_func op_b0c0_0_comp_ff; -extern compop_func op_b0c8_0_comp_ff; -extern compop_func op_b0d0_0_comp_ff; -extern compop_func op_b0d8_0_comp_ff; -extern compop_func op_b0e0_0_comp_ff; -extern compop_func op_b0e8_0_comp_ff; -extern compop_func op_b0f0_0_comp_ff; -extern compop_func op_b0f8_0_comp_ff; -extern compop_func op_b0f9_0_comp_ff; -extern compop_func op_b0fa_0_comp_ff; -extern compop_func op_b0fb_0_comp_ff; -extern compop_func op_b0fc_0_comp_ff; -extern compop_func op_b100_0_comp_ff; -extern compop_func op_b108_0_comp_ff; -extern compop_func op_b110_0_comp_ff; -extern compop_func op_b118_0_comp_ff; -extern compop_func op_b120_0_comp_ff; -extern compop_func op_b128_0_comp_ff; -extern compop_func op_b130_0_comp_ff; -extern compop_func op_b138_0_comp_ff; -extern compop_func op_b139_0_comp_ff; -extern compop_func op_b140_0_comp_ff; -extern compop_func op_b148_0_comp_ff; -extern compop_func op_b150_0_comp_ff; -extern compop_func op_b158_0_comp_ff; -extern compop_func op_b160_0_comp_ff; -extern compop_func op_b168_0_comp_ff; -extern compop_func op_b170_0_comp_ff; -extern compop_func op_b178_0_comp_ff; -extern compop_func op_b179_0_comp_ff; -extern compop_func op_b180_0_comp_ff; -extern compop_func op_b188_0_comp_ff; -extern compop_func op_b190_0_comp_ff; -extern compop_func op_b198_0_comp_ff; -extern compop_func op_b1a0_0_comp_ff; -extern compop_func op_b1a8_0_comp_ff; -extern compop_func op_b1b0_0_comp_ff; -extern compop_func op_b1b8_0_comp_ff; -extern compop_func op_b1b9_0_comp_ff; -extern compop_func op_b1c0_0_comp_ff; -extern compop_func op_b1c8_0_comp_ff; -extern compop_func op_b1d0_0_comp_ff; -extern compop_func op_b1d8_0_comp_ff; -extern compop_func op_b1e0_0_comp_ff; -extern compop_func op_b1e8_0_comp_ff; -extern compop_func op_b1f0_0_comp_ff; -extern compop_func op_b1f8_0_comp_ff; -extern compop_func op_b1f9_0_comp_ff; -extern compop_func op_b1fa_0_comp_ff; -extern compop_func op_b1fb_0_comp_ff; -extern compop_func op_b1fc_0_comp_ff; -extern compop_func op_c000_0_comp_ff; -extern compop_func op_c010_0_comp_ff; -extern compop_func op_c018_0_comp_ff; -extern compop_func op_c020_0_comp_ff; -extern compop_func op_c028_0_comp_ff; -extern compop_func op_c030_0_comp_ff; -extern compop_func op_c038_0_comp_ff; -extern compop_func op_c039_0_comp_ff; -extern compop_func op_c03a_0_comp_ff; -extern compop_func op_c03b_0_comp_ff; -extern compop_func op_c03c_0_comp_ff; -extern compop_func op_c040_0_comp_ff; -extern compop_func op_c050_0_comp_ff; -extern compop_func op_c058_0_comp_ff; -extern compop_func op_c060_0_comp_ff; -extern compop_func op_c068_0_comp_ff; -extern compop_func op_c070_0_comp_ff; -extern compop_func op_c078_0_comp_ff; -extern compop_func op_c079_0_comp_ff; -extern compop_func op_c07a_0_comp_ff; -extern compop_func op_c07b_0_comp_ff; -extern compop_func op_c07c_0_comp_ff; -extern compop_func op_c080_0_comp_ff; -extern compop_func op_c090_0_comp_ff; -extern compop_func op_c098_0_comp_ff; -extern compop_func op_c0a0_0_comp_ff; -extern compop_func op_c0a8_0_comp_ff; -extern compop_func op_c0b0_0_comp_ff; -extern compop_func op_c0b8_0_comp_ff; -extern compop_func op_c0b9_0_comp_ff; -extern compop_func op_c0ba_0_comp_ff; -extern compop_func op_c0bb_0_comp_ff; -extern compop_func op_c0bc_0_comp_ff; -extern compop_func op_c0c0_0_comp_ff; -extern compop_func op_c0d0_0_comp_ff; -extern compop_func op_c0d8_0_comp_ff; -extern compop_func op_c0e0_0_comp_ff; -extern compop_func op_c0e8_0_comp_ff; -extern compop_func op_c0f0_0_comp_ff; -extern compop_func op_c0f8_0_comp_ff; -extern compop_func op_c0f9_0_comp_ff; -extern compop_func op_c0fa_0_comp_ff; -extern compop_func op_c0fb_0_comp_ff; -extern compop_func op_c0fc_0_comp_ff; -extern compop_func op_c110_0_comp_ff; -extern compop_func op_c118_0_comp_ff; -extern compop_func op_c120_0_comp_ff; -extern compop_func op_c128_0_comp_ff; -extern compop_func op_c130_0_comp_ff; -extern compop_func op_c138_0_comp_ff; -extern compop_func op_c139_0_comp_ff; -extern compop_func op_c140_0_comp_ff; -extern compop_func op_c148_0_comp_ff; -extern compop_func op_c150_0_comp_ff; -extern compop_func op_c158_0_comp_ff; -extern compop_func op_c160_0_comp_ff; -extern compop_func op_c168_0_comp_ff; -extern compop_func op_c170_0_comp_ff; -extern compop_func op_c178_0_comp_ff; -extern compop_func op_c179_0_comp_ff; -extern compop_func op_c188_0_comp_ff; -extern compop_func op_c190_0_comp_ff; -extern compop_func op_c198_0_comp_ff; -extern compop_func op_c1a0_0_comp_ff; -extern compop_func op_c1a8_0_comp_ff; -extern compop_func op_c1b0_0_comp_ff; -extern compop_func op_c1b8_0_comp_ff; -extern compop_func op_c1b9_0_comp_ff; -extern compop_func op_c1c0_0_comp_ff; -extern compop_func op_c1d0_0_comp_ff; -extern compop_func op_c1d8_0_comp_ff; -extern compop_func op_c1e0_0_comp_ff; -extern compop_func op_c1e8_0_comp_ff; -extern compop_func op_c1f0_0_comp_ff; -extern compop_func op_c1f8_0_comp_ff; -extern compop_func op_c1f9_0_comp_ff; -extern compop_func op_c1fa_0_comp_ff; -extern compop_func op_c1fb_0_comp_ff; -extern compop_func op_c1fc_0_comp_ff; -extern compop_func op_d000_0_comp_ff; -extern compop_func op_d010_0_comp_ff; -extern compop_func op_d018_0_comp_ff; -extern compop_func op_d020_0_comp_ff; -extern compop_func op_d028_0_comp_ff; -extern compop_func op_d030_0_comp_ff; -extern compop_func op_d038_0_comp_ff; -extern compop_func op_d039_0_comp_ff; -extern compop_func op_d03a_0_comp_ff; -extern compop_func op_d03b_0_comp_ff; -extern compop_func op_d03c_0_comp_ff; -extern compop_func op_d040_0_comp_ff; -extern compop_func op_d048_0_comp_ff; -extern compop_func op_d050_0_comp_ff; -extern compop_func op_d058_0_comp_ff; -extern compop_func op_d060_0_comp_ff; -extern compop_func op_d068_0_comp_ff; -extern compop_func op_d070_0_comp_ff; -extern compop_func op_d078_0_comp_ff; -extern compop_func op_d079_0_comp_ff; -extern compop_func op_d07a_0_comp_ff; -extern compop_func op_d07b_0_comp_ff; -extern compop_func op_d07c_0_comp_ff; -extern compop_func op_d080_0_comp_ff; -extern compop_func op_d088_0_comp_ff; -extern compop_func op_d090_0_comp_ff; -extern compop_func op_d098_0_comp_ff; -extern compop_func op_d0a0_0_comp_ff; -extern compop_func op_d0a8_0_comp_ff; -extern compop_func op_d0b0_0_comp_ff; -extern compop_func op_d0b8_0_comp_ff; -extern compop_func op_d0b9_0_comp_ff; -extern compop_func op_d0ba_0_comp_ff; -extern compop_func op_d0bb_0_comp_ff; -extern compop_func op_d0bc_0_comp_ff; -extern compop_func op_d0c0_0_comp_ff; -extern compop_func op_d0c8_0_comp_ff; -extern compop_func op_d0d0_0_comp_ff; -extern compop_func op_d0d8_0_comp_ff; -extern compop_func op_d0e0_0_comp_ff; -extern compop_func op_d0e8_0_comp_ff; -extern compop_func op_d0f0_0_comp_ff; -extern compop_func op_d0f8_0_comp_ff; -extern compop_func op_d0f9_0_comp_ff; -extern compop_func op_d0fa_0_comp_ff; -extern compop_func op_d0fb_0_comp_ff; -extern compop_func op_d0fc_0_comp_ff; -extern compop_func op_d100_0_comp_ff; -extern compop_func op_d108_0_comp_ff; -extern compop_func op_d110_0_comp_ff; -extern compop_func op_d118_0_comp_ff; -extern compop_func op_d120_0_comp_ff; -extern compop_func op_d128_0_comp_ff; -extern compop_func op_d130_0_comp_ff; -extern compop_func op_d138_0_comp_ff; -extern compop_func op_d139_0_comp_ff; -extern compop_func op_d140_0_comp_ff; -extern compop_func op_d148_0_comp_ff; -extern compop_func op_d150_0_comp_ff; -extern compop_func op_d158_0_comp_ff; -extern compop_func op_d160_0_comp_ff; -extern compop_func op_d168_0_comp_ff; -extern compop_func op_d170_0_comp_ff; -extern compop_func op_d178_0_comp_ff; -extern compop_func op_d179_0_comp_ff; -extern compop_func op_d180_0_comp_ff; -extern compop_func op_d188_0_comp_ff; -extern compop_func op_d190_0_comp_ff; -extern compop_func op_d198_0_comp_ff; -extern compop_func op_d1a0_0_comp_ff; -extern compop_func op_d1a8_0_comp_ff; -extern compop_func op_d1b0_0_comp_ff; -extern compop_func op_d1b8_0_comp_ff; -extern compop_func op_d1b9_0_comp_ff; -extern compop_func op_d1c0_0_comp_ff; -extern compop_func op_d1c8_0_comp_ff; -extern compop_func op_d1d0_0_comp_ff; -extern compop_func op_d1d8_0_comp_ff; -extern compop_func op_d1e0_0_comp_ff; -extern compop_func op_d1e8_0_comp_ff; -extern compop_func op_d1f0_0_comp_ff; -extern compop_func op_d1f8_0_comp_ff; -extern compop_func op_d1f9_0_comp_ff; -extern compop_func op_d1fa_0_comp_ff; -extern compop_func op_d1fb_0_comp_ff; -extern compop_func op_d1fc_0_comp_ff; -extern compop_func op_e000_0_comp_ff; -extern compop_func op_e008_0_comp_ff; -extern compop_func op_e010_0_comp_ff; -extern compop_func op_e018_0_comp_ff; -extern compop_func op_e020_0_comp_ff; -extern compop_func op_e028_0_comp_ff; -extern compop_func op_e030_0_comp_ff; -extern compop_func op_e038_0_comp_ff; -extern compop_func op_e040_0_comp_ff; -extern compop_func op_e048_0_comp_ff; -extern compop_func op_e050_0_comp_ff; -extern compop_func op_e058_0_comp_ff; -extern compop_func op_e060_0_comp_ff; -extern compop_func op_e068_0_comp_ff; -extern compop_func op_e070_0_comp_ff; -extern compop_func op_e078_0_comp_ff; -extern compop_func op_e080_0_comp_ff; -extern compop_func op_e088_0_comp_ff; -extern compop_func op_e090_0_comp_ff; -extern compop_func op_e098_0_comp_ff; -extern compop_func op_e0a0_0_comp_ff; -extern compop_func op_e0a8_0_comp_ff; -extern compop_func op_e0b0_0_comp_ff; -extern compop_func op_e0b8_0_comp_ff; -extern compop_func op_e0d0_0_comp_ff; -extern compop_func op_e0d8_0_comp_ff; -extern compop_func op_e0e0_0_comp_ff; -extern compop_func op_e0e8_0_comp_ff; -extern compop_func op_e0f0_0_comp_ff; -extern compop_func op_e0f8_0_comp_ff; -extern compop_func op_e0f9_0_comp_ff; -extern compop_func op_e100_0_comp_ff; -extern compop_func op_e108_0_comp_ff; -extern compop_func op_e110_0_comp_ff; -extern compop_func op_e118_0_comp_ff; -extern compop_func op_e120_0_comp_ff; -extern compop_func op_e128_0_comp_ff; -extern compop_func op_e130_0_comp_ff; -extern compop_func op_e138_0_comp_ff; -extern compop_func op_e140_0_comp_ff; -extern compop_func op_e148_0_comp_ff; -extern compop_func op_e150_0_comp_ff; -extern compop_func op_e158_0_comp_ff; -extern compop_func op_e160_0_comp_ff; -extern compop_func op_e168_0_comp_ff; -extern compop_func op_e170_0_comp_ff; -extern compop_func op_e178_0_comp_ff; -extern compop_func op_e180_0_comp_ff; -extern compop_func op_e188_0_comp_ff; -extern compop_func op_e190_0_comp_ff; -extern compop_func op_e198_0_comp_ff; -extern compop_func op_e1a0_0_comp_ff; -extern compop_func op_e1a8_0_comp_ff; -extern compop_func op_e1b0_0_comp_ff; -extern compop_func op_e1b8_0_comp_ff; -extern compop_func op_e1d0_0_comp_ff; -extern compop_func op_e1d8_0_comp_ff; -extern compop_func op_e1e0_0_comp_ff; -extern compop_func op_e1e8_0_comp_ff; -extern compop_func op_e1f0_0_comp_ff; -extern compop_func op_e1f8_0_comp_ff; -extern compop_func op_e1f9_0_comp_ff; -extern compop_func op_e2d0_0_comp_ff; -extern compop_func op_e2d8_0_comp_ff; -extern compop_func op_e2e0_0_comp_ff; -extern compop_func op_e2e8_0_comp_ff; -extern compop_func op_e2f0_0_comp_ff; -extern compop_func op_e2f8_0_comp_ff; -extern compop_func op_e2f9_0_comp_ff; -extern compop_func op_e3d0_0_comp_ff; -extern compop_func op_e3d8_0_comp_ff; -extern compop_func op_e3e0_0_comp_ff; -extern compop_func op_e3e8_0_comp_ff; -extern compop_func op_e3f0_0_comp_ff; -extern compop_func op_e3f8_0_comp_ff; -extern compop_func op_e3f9_0_comp_ff; -extern compop_func op_e6d0_0_comp_ff; -extern compop_func op_e6d8_0_comp_ff; -extern compop_func op_e6e0_0_comp_ff; -extern compop_func op_e6e8_0_comp_ff; -extern compop_func op_e6f0_0_comp_ff; -extern compop_func op_e6f8_0_comp_ff; -extern compop_func op_e6f9_0_comp_ff; -extern compop_func op_e7d0_0_comp_ff; -extern compop_func op_e7d8_0_comp_ff; -extern compop_func op_e7e0_0_comp_ff; -extern compop_func op_e7e8_0_comp_ff; -extern compop_func op_e7f0_0_comp_ff; -extern compop_func op_e7f8_0_comp_ff; -extern compop_func op_e7f9_0_comp_ff; -extern compop_func op_efc0_0_comp_ff; -extern compop_func op_efd0_0_comp_ff; -extern compop_func op_efe8_0_comp_ff; -extern compop_func op_eff0_0_comp_ff; -extern compop_func op_eff8_0_comp_ff; -extern compop_func op_eff9_0_comp_ff; -extern compop_func op_f200_0_comp_ff; -extern compop_func op_f208_0_comp_ff; -extern compop_func op_f210_0_comp_ff; -extern compop_func op_f218_0_comp_ff; -extern compop_func op_f220_0_comp_ff; -extern compop_func op_f228_0_comp_ff; -extern compop_func op_f230_0_comp_ff; -extern compop_func op_f238_0_comp_ff; -extern compop_func op_f239_0_comp_ff; -extern compop_func op_f23a_0_comp_ff; -extern compop_func op_f23b_0_comp_ff; -extern compop_func op_f23c_0_comp_ff; -extern compop_func op_f240_0_comp_ff; -extern compop_func op_f250_0_comp_ff; -extern compop_func op_f258_0_comp_ff; -extern compop_func op_f260_0_comp_ff; -extern compop_func op_f268_0_comp_ff; -extern compop_func op_f270_0_comp_ff; -extern compop_func op_f278_0_comp_ff; -extern compop_func op_f279_0_comp_ff; -extern compop_func op_f280_0_comp_ff; -extern compop_func op_f2c0_0_comp_ff; -extern compop_func op_f600_0_comp_ff; -extern compop_func op_f608_0_comp_ff; -extern compop_func op_f610_0_comp_ff; -extern compop_func op_f618_0_comp_ff; -extern compop_func op_f620_0_comp_ff; -extern compop_func op_0_0_comp_nf; -extern compop_func op_10_0_comp_nf; -extern compop_func op_18_0_comp_nf; -extern compop_func op_20_0_comp_nf; -extern compop_func op_28_0_comp_nf; -extern compop_func op_30_0_comp_nf; -extern compop_func op_38_0_comp_nf; -extern compop_func op_39_0_comp_nf; -extern compop_func op_3c_0_comp_nf; -extern compop_func op_40_0_comp_nf; -extern compop_func op_50_0_comp_nf; -extern compop_func op_58_0_comp_nf; -extern compop_func op_60_0_comp_nf; -extern compop_func op_68_0_comp_nf; -extern compop_func op_70_0_comp_nf; -extern compop_func op_78_0_comp_nf; -extern compop_func op_79_0_comp_nf; -extern compop_func op_80_0_comp_nf; -extern compop_func op_90_0_comp_nf; -extern compop_func op_98_0_comp_nf; -extern compop_func op_a0_0_comp_nf; -extern compop_func op_a8_0_comp_nf; -extern compop_func op_b0_0_comp_nf; -extern compop_func op_b8_0_comp_nf; -extern compop_func op_b9_0_comp_nf; -extern compop_func op_100_0_comp_nf; -extern compop_func op_110_0_comp_nf; -extern compop_func op_118_0_comp_nf; -extern compop_func op_120_0_comp_nf; -extern compop_func op_128_0_comp_nf; -extern compop_func op_130_0_comp_nf; -extern compop_func op_138_0_comp_nf; -extern compop_func op_139_0_comp_nf; -extern compop_func op_13a_0_comp_nf; -extern compop_func op_13b_0_comp_nf; -extern compop_func op_13c_0_comp_nf; -extern compop_func op_140_0_comp_nf; -extern compop_func op_150_0_comp_nf; -extern compop_func op_158_0_comp_nf; -extern compop_func op_160_0_comp_nf; -extern compop_func op_168_0_comp_nf; -extern compop_func op_170_0_comp_nf; -extern compop_func op_178_0_comp_nf; -extern compop_func op_179_0_comp_nf; -extern compop_func op_180_0_comp_nf; -extern compop_func op_190_0_comp_nf; -extern compop_func op_198_0_comp_nf; -extern compop_func op_1a0_0_comp_nf; -extern compop_func op_1a8_0_comp_nf; -extern compop_func op_1b0_0_comp_nf; -extern compop_func op_1b8_0_comp_nf; -extern compop_func op_1b9_0_comp_nf; -extern compop_func op_1c0_0_comp_nf; -extern compop_func op_1d0_0_comp_nf; -extern compop_func op_1d8_0_comp_nf; -extern compop_func op_1e0_0_comp_nf; -extern compop_func op_1e8_0_comp_nf; -extern compop_func op_1f0_0_comp_nf; -extern compop_func op_1f8_0_comp_nf; -extern compop_func op_1f9_0_comp_nf; -extern compop_func op_200_0_comp_nf; -extern compop_func op_210_0_comp_nf; -extern compop_func op_218_0_comp_nf; -extern compop_func op_220_0_comp_nf; -extern compop_func op_228_0_comp_nf; -extern compop_func op_230_0_comp_nf; -extern compop_func op_238_0_comp_nf; -extern compop_func op_239_0_comp_nf; -extern compop_func op_23c_0_comp_nf; -extern compop_func op_240_0_comp_nf; -extern compop_func op_250_0_comp_nf; -extern compop_func op_258_0_comp_nf; -extern compop_func op_260_0_comp_nf; -extern compop_func op_268_0_comp_nf; -extern compop_func op_270_0_comp_nf; -extern compop_func op_278_0_comp_nf; -extern compop_func op_279_0_comp_nf; -extern compop_func op_280_0_comp_nf; -extern compop_func op_290_0_comp_nf; -extern compop_func op_298_0_comp_nf; -extern compop_func op_2a0_0_comp_nf; -extern compop_func op_2a8_0_comp_nf; -extern compop_func op_2b0_0_comp_nf; -extern compop_func op_2b8_0_comp_nf; -extern compop_func op_2b9_0_comp_nf; -extern compop_func op_400_0_comp_nf; -extern compop_func op_410_0_comp_nf; -extern compop_func op_418_0_comp_nf; -extern compop_func op_420_0_comp_nf; -extern compop_func op_428_0_comp_nf; -extern compop_func op_430_0_comp_nf; -extern compop_func op_438_0_comp_nf; -extern compop_func op_439_0_comp_nf; -extern compop_func op_440_0_comp_nf; -extern compop_func op_450_0_comp_nf; -extern compop_func op_458_0_comp_nf; -extern compop_func op_460_0_comp_nf; -extern compop_func op_468_0_comp_nf; -extern compop_func op_470_0_comp_nf; -extern compop_func op_478_0_comp_nf; -extern compop_func op_479_0_comp_nf; -extern compop_func op_480_0_comp_nf; -extern compop_func op_490_0_comp_nf; -extern compop_func op_498_0_comp_nf; -extern compop_func op_4a0_0_comp_nf; -extern compop_func op_4a8_0_comp_nf; -extern compop_func op_4b0_0_comp_nf; -extern compop_func op_4b8_0_comp_nf; -extern compop_func op_4b9_0_comp_nf; -extern compop_func op_600_0_comp_nf; -extern compop_func op_610_0_comp_nf; -extern compop_func op_618_0_comp_nf; -extern compop_func op_620_0_comp_nf; -extern compop_func op_628_0_comp_nf; -extern compop_func op_630_0_comp_nf; -extern compop_func op_638_0_comp_nf; -extern compop_func op_639_0_comp_nf; -extern compop_func op_640_0_comp_nf; -extern compop_func op_650_0_comp_nf; -extern compop_func op_658_0_comp_nf; -extern compop_func op_660_0_comp_nf; -extern compop_func op_668_0_comp_nf; -extern compop_func op_670_0_comp_nf; -extern compop_func op_678_0_comp_nf; -extern compop_func op_679_0_comp_nf; -extern compop_func op_680_0_comp_nf; -extern compop_func op_690_0_comp_nf; -extern compop_func op_698_0_comp_nf; -extern compop_func op_6a0_0_comp_nf; -extern compop_func op_6a8_0_comp_nf; -extern compop_func op_6b0_0_comp_nf; -extern compop_func op_6b8_0_comp_nf; -extern compop_func op_6b9_0_comp_nf; -extern compop_func op_800_0_comp_nf; -extern compop_func op_810_0_comp_nf; -extern compop_func op_818_0_comp_nf; -extern compop_func op_820_0_comp_nf; -extern compop_func op_828_0_comp_nf; -extern compop_func op_830_0_comp_nf; -extern compop_func op_838_0_comp_nf; -extern compop_func op_839_0_comp_nf; -extern compop_func op_83a_0_comp_nf; -extern compop_func op_83b_0_comp_nf; -extern compop_func op_840_0_comp_nf; -extern compop_func op_850_0_comp_nf; -extern compop_func op_858_0_comp_nf; -extern compop_func op_860_0_comp_nf; -extern compop_func op_868_0_comp_nf; -extern compop_func op_870_0_comp_nf; -extern compop_func op_878_0_comp_nf; -extern compop_func op_879_0_comp_nf; -extern compop_func op_880_0_comp_nf; -extern compop_func op_890_0_comp_nf; -extern compop_func op_898_0_comp_nf; -extern compop_func op_8a0_0_comp_nf; -extern compop_func op_8a8_0_comp_nf; -extern compop_func op_8b0_0_comp_nf; -extern compop_func op_8b8_0_comp_nf; -extern compop_func op_8b9_0_comp_nf; -extern compop_func op_8c0_0_comp_nf; -extern compop_func op_8d0_0_comp_nf; -extern compop_func op_8d8_0_comp_nf; -extern compop_func op_8e0_0_comp_nf; -extern compop_func op_8e8_0_comp_nf; -extern compop_func op_8f0_0_comp_nf; -extern compop_func op_8f8_0_comp_nf; -extern compop_func op_8f9_0_comp_nf; -extern compop_func op_a00_0_comp_nf; -extern compop_func op_a10_0_comp_nf; -extern compop_func op_a18_0_comp_nf; -extern compop_func op_a20_0_comp_nf; -extern compop_func op_a28_0_comp_nf; -extern compop_func op_a30_0_comp_nf; -extern compop_func op_a38_0_comp_nf; -extern compop_func op_a39_0_comp_nf; -extern compop_func op_a3c_0_comp_nf; -extern compop_func op_a40_0_comp_nf; -extern compop_func op_a50_0_comp_nf; -extern compop_func op_a58_0_comp_nf; -extern compop_func op_a60_0_comp_nf; -extern compop_func op_a68_0_comp_nf; -extern compop_func op_a70_0_comp_nf; -extern compop_func op_a78_0_comp_nf; -extern compop_func op_a79_0_comp_nf; -extern compop_func op_a80_0_comp_nf; -extern compop_func op_a90_0_comp_nf; -extern compop_func op_a98_0_comp_nf; -extern compop_func op_aa0_0_comp_nf; -extern compop_func op_aa8_0_comp_nf; -extern compop_func op_ab0_0_comp_nf; -extern compop_func op_ab8_0_comp_nf; -extern compop_func op_ab9_0_comp_nf; -extern compop_func op_c00_0_comp_nf; -extern compop_func op_c10_0_comp_nf; -extern compop_func op_c18_0_comp_nf; -extern compop_func op_c20_0_comp_nf; -extern compop_func op_c28_0_comp_nf; -extern compop_func op_c30_0_comp_nf; -extern compop_func op_c38_0_comp_nf; -extern compop_func op_c39_0_comp_nf; -extern compop_func op_c3a_0_comp_nf; -extern compop_func op_c3b_0_comp_nf; -extern compop_func op_c40_0_comp_nf; -extern compop_func op_c50_0_comp_nf; -extern compop_func op_c58_0_comp_nf; -extern compop_func op_c60_0_comp_nf; -extern compop_func op_c68_0_comp_nf; -extern compop_func op_c70_0_comp_nf; -extern compop_func op_c78_0_comp_nf; -extern compop_func op_c79_0_comp_nf; -extern compop_func op_c7a_0_comp_nf; -extern compop_func op_c7b_0_comp_nf; -extern compop_func op_c80_0_comp_nf; -extern compop_func op_c90_0_comp_nf; -extern compop_func op_c98_0_comp_nf; -extern compop_func op_ca0_0_comp_nf; -extern compop_func op_ca8_0_comp_nf; -extern compop_func op_cb0_0_comp_nf; -extern compop_func op_cb8_0_comp_nf; -extern compop_func op_cb9_0_comp_nf; -extern compop_func op_cba_0_comp_nf; -extern compop_func op_cbb_0_comp_nf; -extern compop_func op_1000_0_comp_nf; -extern compop_func op_1010_0_comp_nf; -extern compop_func op_1018_0_comp_nf; -extern compop_func op_1020_0_comp_nf; -extern compop_func op_1028_0_comp_nf; -extern compop_func op_1030_0_comp_nf; -extern compop_func op_1038_0_comp_nf; -extern compop_func op_1039_0_comp_nf; -extern compop_func op_103a_0_comp_nf; -extern compop_func op_103b_0_comp_nf; -extern compop_func op_103c_0_comp_nf; -extern compop_func op_1080_0_comp_nf; -extern compop_func op_1090_0_comp_nf; -extern compop_func op_1098_0_comp_nf; -extern compop_func op_10a0_0_comp_nf; -extern compop_func op_10a8_0_comp_nf; -extern compop_func op_10b0_0_comp_nf; -extern compop_func op_10b8_0_comp_nf; -extern compop_func op_10b9_0_comp_nf; -extern compop_func op_10ba_0_comp_nf; -extern compop_func op_10bb_0_comp_nf; -extern compop_func op_10bc_0_comp_nf; -extern compop_func op_10c0_0_comp_nf; -extern compop_func op_10d0_0_comp_nf; -extern compop_func op_10d8_0_comp_nf; -extern compop_func op_10e0_0_comp_nf; -extern compop_func op_10e8_0_comp_nf; -extern compop_func op_10f0_0_comp_nf; -extern compop_func op_10f8_0_comp_nf; -extern compop_func op_10f9_0_comp_nf; -extern compop_func op_10fa_0_comp_nf; -extern compop_func op_10fb_0_comp_nf; -extern compop_func op_10fc_0_comp_nf; -extern compop_func op_1100_0_comp_nf; -extern compop_func op_1110_0_comp_nf; -extern compop_func op_1118_0_comp_nf; -extern compop_func op_1120_0_comp_nf; -extern compop_func op_1128_0_comp_nf; -extern compop_func op_1130_0_comp_nf; -extern compop_func op_1138_0_comp_nf; -extern compop_func op_1139_0_comp_nf; -extern compop_func op_113a_0_comp_nf; -extern compop_func op_113b_0_comp_nf; -extern compop_func op_113c_0_comp_nf; -extern compop_func op_1140_0_comp_nf; -extern compop_func op_1150_0_comp_nf; -extern compop_func op_1158_0_comp_nf; -extern compop_func op_1160_0_comp_nf; -extern compop_func op_1168_0_comp_nf; -extern compop_func op_1170_0_comp_nf; -extern compop_func op_1178_0_comp_nf; -extern compop_func op_1179_0_comp_nf; -extern compop_func op_117a_0_comp_nf; -extern compop_func op_117b_0_comp_nf; -extern compop_func op_117c_0_comp_nf; -extern compop_func op_1180_0_comp_nf; -extern compop_func op_1190_0_comp_nf; -extern compop_func op_1198_0_comp_nf; -extern compop_func op_11a0_0_comp_nf; -extern compop_func op_11a8_0_comp_nf; -extern compop_func op_11b0_0_comp_nf; -extern compop_func op_11b8_0_comp_nf; -extern compop_func op_11b9_0_comp_nf; -extern compop_func op_11ba_0_comp_nf; -extern compop_func op_11bb_0_comp_nf; -extern compop_func op_11bc_0_comp_nf; -extern compop_func op_11c0_0_comp_nf; -extern compop_func op_11d0_0_comp_nf; -extern compop_func op_11d8_0_comp_nf; -extern compop_func op_11e0_0_comp_nf; -extern compop_func op_11e8_0_comp_nf; -extern compop_func op_11f0_0_comp_nf; -extern compop_func op_11f8_0_comp_nf; -extern compop_func op_11f9_0_comp_nf; -extern compop_func op_11fa_0_comp_nf; -extern compop_func op_11fb_0_comp_nf; -extern compop_func op_11fc_0_comp_nf; -extern compop_func op_13c0_0_comp_nf; -extern compop_func op_13d0_0_comp_nf; -extern compop_func op_13d8_0_comp_nf; -extern compop_func op_13e0_0_comp_nf; -extern compop_func op_13e8_0_comp_nf; -extern compop_func op_13f0_0_comp_nf; -extern compop_func op_13f8_0_comp_nf; -extern compop_func op_13f9_0_comp_nf; -extern compop_func op_13fa_0_comp_nf; -extern compop_func op_13fb_0_comp_nf; -extern compop_func op_13fc_0_comp_nf; -extern compop_func op_2000_0_comp_nf; -extern compop_func op_2008_0_comp_nf; -extern compop_func op_2010_0_comp_nf; -extern compop_func op_2018_0_comp_nf; -extern compop_func op_2020_0_comp_nf; -extern compop_func op_2028_0_comp_nf; -extern compop_func op_2030_0_comp_nf; -extern compop_func op_2038_0_comp_nf; -extern compop_func op_2039_0_comp_nf; -extern compop_func op_203a_0_comp_nf; -extern compop_func op_203b_0_comp_nf; -extern compop_func op_203c_0_comp_nf; -extern compop_func op_2040_0_comp_nf; -extern compop_func op_2048_0_comp_nf; -extern compop_func op_2050_0_comp_nf; -extern compop_func op_2058_0_comp_nf; -extern compop_func op_2060_0_comp_nf; -extern compop_func op_2068_0_comp_nf; -extern compop_func op_2070_0_comp_nf; -extern compop_func op_2078_0_comp_nf; -extern compop_func op_2079_0_comp_nf; -extern compop_func op_207a_0_comp_nf; -extern compop_func op_207b_0_comp_nf; -extern compop_func op_207c_0_comp_nf; -extern compop_func op_2080_0_comp_nf; -extern compop_func op_2088_0_comp_nf; -extern compop_func op_2090_0_comp_nf; -extern compop_func op_2098_0_comp_nf; -extern compop_func op_20a0_0_comp_nf; -extern compop_func op_20a8_0_comp_nf; -extern compop_func op_20b0_0_comp_nf; -extern compop_func op_20b8_0_comp_nf; -extern compop_func op_20b9_0_comp_nf; -extern compop_func op_20ba_0_comp_nf; -extern compop_func op_20bb_0_comp_nf; -extern compop_func op_20bc_0_comp_nf; -extern compop_func op_20c0_0_comp_nf; -extern compop_func op_20c8_0_comp_nf; -extern compop_func op_20d0_0_comp_nf; -extern compop_func op_20d8_0_comp_nf; -extern compop_func op_20e0_0_comp_nf; -extern compop_func op_20e8_0_comp_nf; -extern compop_func op_20f0_0_comp_nf; -extern compop_func op_20f8_0_comp_nf; -extern compop_func op_20f9_0_comp_nf; -extern compop_func op_20fa_0_comp_nf; -extern compop_func op_20fb_0_comp_nf; -extern compop_func op_20fc_0_comp_nf; -extern compop_func op_2100_0_comp_nf; -extern compop_func op_2108_0_comp_nf; -extern compop_func op_2110_0_comp_nf; -extern compop_func op_2118_0_comp_nf; -extern compop_func op_2120_0_comp_nf; -extern compop_func op_2128_0_comp_nf; -extern compop_func op_2130_0_comp_nf; -extern compop_func op_2138_0_comp_nf; -extern compop_func op_2139_0_comp_nf; -extern compop_func op_213a_0_comp_nf; -extern compop_func op_213b_0_comp_nf; -extern compop_func op_213c_0_comp_nf; -extern compop_func op_2140_0_comp_nf; -extern compop_func op_2148_0_comp_nf; -extern compop_func op_2150_0_comp_nf; -extern compop_func op_2158_0_comp_nf; -extern compop_func op_2160_0_comp_nf; -extern compop_func op_2168_0_comp_nf; -extern compop_func op_2170_0_comp_nf; -extern compop_func op_2178_0_comp_nf; -extern compop_func op_2179_0_comp_nf; -extern compop_func op_217a_0_comp_nf; -extern compop_func op_217b_0_comp_nf; -extern compop_func op_217c_0_comp_nf; -extern compop_func op_2180_0_comp_nf; -extern compop_func op_2188_0_comp_nf; -extern compop_func op_2190_0_comp_nf; -extern compop_func op_2198_0_comp_nf; -extern compop_func op_21a0_0_comp_nf; -extern compop_func op_21a8_0_comp_nf; -extern compop_func op_21b0_0_comp_nf; -extern compop_func op_21b8_0_comp_nf; -extern compop_func op_21b9_0_comp_nf; -extern compop_func op_21ba_0_comp_nf; -extern compop_func op_21bb_0_comp_nf; -extern compop_func op_21bc_0_comp_nf; -extern compop_func op_21c0_0_comp_nf; -extern compop_func op_21c8_0_comp_nf; -extern compop_func op_21d0_0_comp_nf; -extern compop_func op_21d8_0_comp_nf; -extern compop_func op_21e0_0_comp_nf; -extern compop_func op_21e8_0_comp_nf; -extern compop_func op_21f0_0_comp_nf; -extern compop_func op_21f8_0_comp_nf; -extern compop_func op_21f9_0_comp_nf; -extern compop_func op_21fa_0_comp_nf; -extern compop_func op_21fb_0_comp_nf; -extern compop_func op_21fc_0_comp_nf; -extern compop_func op_23c0_0_comp_nf; -extern compop_func op_23c8_0_comp_nf; -extern compop_func op_23d0_0_comp_nf; -extern compop_func op_23d8_0_comp_nf; -extern compop_func op_23e0_0_comp_nf; -extern compop_func op_23e8_0_comp_nf; -extern compop_func op_23f0_0_comp_nf; -extern compop_func op_23f8_0_comp_nf; -extern compop_func op_23f9_0_comp_nf; -extern compop_func op_23fa_0_comp_nf; -extern compop_func op_23fb_0_comp_nf; -extern compop_func op_23fc_0_comp_nf; -extern compop_func op_3000_0_comp_nf; -extern compop_func op_3008_0_comp_nf; -extern compop_func op_3010_0_comp_nf; -extern compop_func op_3018_0_comp_nf; -extern compop_func op_3020_0_comp_nf; -extern compop_func op_3028_0_comp_nf; -extern compop_func op_3030_0_comp_nf; -extern compop_func op_3038_0_comp_nf; -extern compop_func op_3039_0_comp_nf; -extern compop_func op_303a_0_comp_nf; -extern compop_func op_303b_0_comp_nf; -extern compop_func op_303c_0_comp_nf; -extern compop_func op_3040_0_comp_nf; -extern compop_func op_3048_0_comp_nf; -extern compop_func op_3050_0_comp_nf; -extern compop_func op_3058_0_comp_nf; -extern compop_func op_3060_0_comp_nf; -extern compop_func op_3068_0_comp_nf; -extern compop_func op_3070_0_comp_nf; -extern compop_func op_3078_0_comp_nf; -extern compop_func op_3079_0_comp_nf; -extern compop_func op_307a_0_comp_nf; -extern compop_func op_307b_0_comp_nf; -extern compop_func op_307c_0_comp_nf; -extern compop_func op_3080_0_comp_nf; -extern compop_func op_3088_0_comp_nf; -extern compop_func op_3090_0_comp_nf; -extern compop_func op_3098_0_comp_nf; -extern compop_func op_30a0_0_comp_nf; -extern compop_func op_30a8_0_comp_nf; -extern compop_func op_30b0_0_comp_nf; -extern compop_func op_30b8_0_comp_nf; -extern compop_func op_30b9_0_comp_nf; -extern compop_func op_30ba_0_comp_nf; -extern compop_func op_30bb_0_comp_nf; -extern compop_func op_30bc_0_comp_nf; -extern compop_func op_30c0_0_comp_nf; -extern compop_func op_30c8_0_comp_nf; -extern compop_func op_30d0_0_comp_nf; -extern compop_func op_30d8_0_comp_nf; -extern compop_func op_30e0_0_comp_nf; -extern compop_func op_30e8_0_comp_nf; -extern compop_func op_30f0_0_comp_nf; -extern compop_func op_30f8_0_comp_nf; -extern compop_func op_30f9_0_comp_nf; -extern compop_func op_30fa_0_comp_nf; -extern compop_func op_30fb_0_comp_nf; -extern compop_func op_30fc_0_comp_nf; -extern compop_func op_3100_0_comp_nf; -extern compop_func op_3108_0_comp_nf; -extern compop_func op_3110_0_comp_nf; -extern compop_func op_3118_0_comp_nf; -extern compop_func op_3120_0_comp_nf; -extern compop_func op_3128_0_comp_nf; -extern compop_func op_3130_0_comp_nf; -extern compop_func op_3138_0_comp_nf; -extern compop_func op_3139_0_comp_nf; -extern compop_func op_313a_0_comp_nf; -extern compop_func op_313b_0_comp_nf; -extern compop_func op_313c_0_comp_nf; -extern compop_func op_3140_0_comp_nf; -extern compop_func op_3148_0_comp_nf; -extern compop_func op_3150_0_comp_nf; -extern compop_func op_3158_0_comp_nf; -extern compop_func op_3160_0_comp_nf; -extern compop_func op_3168_0_comp_nf; -extern compop_func op_3170_0_comp_nf; -extern compop_func op_3178_0_comp_nf; -extern compop_func op_3179_0_comp_nf; -extern compop_func op_317a_0_comp_nf; -extern compop_func op_317b_0_comp_nf; -extern compop_func op_317c_0_comp_nf; -extern compop_func op_3180_0_comp_nf; -extern compop_func op_3188_0_comp_nf; -extern compop_func op_3190_0_comp_nf; -extern compop_func op_3198_0_comp_nf; -extern compop_func op_31a0_0_comp_nf; -extern compop_func op_31a8_0_comp_nf; -extern compop_func op_31b0_0_comp_nf; -extern compop_func op_31b8_0_comp_nf; -extern compop_func op_31b9_0_comp_nf; -extern compop_func op_31ba_0_comp_nf; -extern compop_func op_31bb_0_comp_nf; -extern compop_func op_31bc_0_comp_nf; -extern compop_func op_31c0_0_comp_nf; -extern compop_func op_31c8_0_comp_nf; -extern compop_func op_31d0_0_comp_nf; -extern compop_func op_31d8_0_comp_nf; -extern compop_func op_31e0_0_comp_nf; -extern compop_func op_31e8_0_comp_nf; -extern compop_func op_31f0_0_comp_nf; -extern compop_func op_31f8_0_comp_nf; -extern compop_func op_31f9_0_comp_nf; -extern compop_func op_31fa_0_comp_nf; -extern compop_func op_31fb_0_comp_nf; -extern compop_func op_31fc_0_comp_nf; -extern compop_func op_33c0_0_comp_nf; -extern compop_func op_33c8_0_comp_nf; -extern compop_func op_33d0_0_comp_nf; -extern compop_func op_33d8_0_comp_nf; -extern compop_func op_33e0_0_comp_nf; -extern compop_func op_33e8_0_comp_nf; -extern compop_func op_33f0_0_comp_nf; -extern compop_func op_33f8_0_comp_nf; -extern compop_func op_33f9_0_comp_nf; -extern compop_func op_33fa_0_comp_nf; -extern compop_func op_33fb_0_comp_nf; -extern compop_func op_33fc_0_comp_nf; -extern compop_func op_4000_0_comp_nf; -extern compop_func op_4010_0_comp_nf; -extern compop_func op_4018_0_comp_nf; -extern compop_func op_4020_0_comp_nf; -extern compop_func op_4028_0_comp_nf; -extern compop_func op_4030_0_comp_nf; -extern compop_func op_4038_0_comp_nf; -extern compop_func op_4039_0_comp_nf; -extern compop_func op_4040_0_comp_nf; -extern compop_func op_4050_0_comp_nf; -extern compop_func op_4058_0_comp_nf; -extern compop_func op_4060_0_comp_nf; -extern compop_func op_4068_0_comp_nf; -extern compop_func op_4070_0_comp_nf; -extern compop_func op_4078_0_comp_nf; -extern compop_func op_4079_0_comp_nf; -extern compop_func op_4080_0_comp_nf; -extern compop_func op_4090_0_comp_nf; -extern compop_func op_4098_0_comp_nf; -extern compop_func op_40a0_0_comp_nf; -extern compop_func op_40a8_0_comp_nf; -extern compop_func op_40b0_0_comp_nf; -extern compop_func op_40b8_0_comp_nf; -extern compop_func op_40b9_0_comp_nf; -extern compop_func op_41d0_0_comp_nf; -extern compop_func op_41e8_0_comp_nf; -extern compop_func op_41f0_0_comp_nf; -extern compop_func op_41f8_0_comp_nf; -extern compop_func op_41f9_0_comp_nf; -extern compop_func op_41fa_0_comp_nf; -extern compop_func op_41fb_0_comp_nf; -extern compop_func op_4200_0_comp_nf; -extern compop_func op_4210_0_comp_nf; -extern compop_func op_4218_0_comp_nf; -extern compop_func op_4220_0_comp_nf; -extern compop_func op_4228_0_comp_nf; -extern compop_func op_4230_0_comp_nf; -extern compop_func op_4238_0_comp_nf; -extern compop_func op_4239_0_comp_nf; -extern compop_func op_4240_0_comp_nf; -extern compop_func op_4250_0_comp_nf; -extern compop_func op_4258_0_comp_nf; -extern compop_func op_4260_0_comp_nf; -extern compop_func op_4268_0_comp_nf; -extern compop_func op_4270_0_comp_nf; -extern compop_func op_4278_0_comp_nf; -extern compop_func op_4279_0_comp_nf; -extern compop_func op_4280_0_comp_nf; -extern compop_func op_4290_0_comp_nf; -extern compop_func op_4298_0_comp_nf; -extern compop_func op_42a0_0_comp_nf; -extern compop_func op_42a8_0_comp_nf; -extern compop_func op_42b0_0_comp_nf; -extern compop_func op_42b8_0_comp_nf; -extern compop_func op_42b9_0_comp_nf; -extern compop_func op_4400_0_comp_nf; -extern compop_func op_4410_0_comp_nf; -extern compop_func op_4418_0_comp_nf; -extern compop_func op_4420_0_comp_nf; -extern compop_func op_4428_0_comp_nf; -extern compop_func op_4430_0_comp_nf; -extern compop_func op_4438_0_comp_nf; -extern compop_func op_4439_0_comp_nf; -extern compop_func op_4440_0_comp_nf; -extern compop_func op_4450_0_comp_nf; -extern compop_func op_4458_0_comp_nf; -extern compop_func op_4460_0_comp_nf; -extern compop_func op_4468_0_comp_nf; -extern compop_func op_4470_0_comp_nf; -extern compop_func op_4478_0_comp_nf; -extern compop_func op_4479_0_comp_nf; -extern compop_func op_4480_0_comp_nf; -extern compop_func op_4490_0_comp_nf; -extern compop_func op_4498_0_comp_nf; -extern compop_func op_44a0_0_comp_nf; -extern compop_func op_44a8_0_comp_nf; -extern compop_func op_44b0_0_comp_nf; -extern compop_func op_44b8_0_comp_nf; -extern compop_func op_44b9_0_comp_nf; -extern compop_func op_4600_0_comp_nf; -extern compop_func op_4610_0_comp_nf; -extern compop_func op_4618_0_comp_nf; -extern compop_func op_4620_0_comp_nf; -extern compop_func op_4628_0_comp_nf; -extern compop_func op_4630_0_comp_nf; -extern compop_func op_4638_0_comp_nf; -extern compop_func op_4639_0_comp_nf; -extern compop_func op_4640_0_comp_nf; -extern compop_func op_4650_0_comp_nf; -extern compop_func op_4658_0_comp_nf; -extern compop_func op_4660_0_comp_nf; -extern compop_func op_4668_0_comp_nf; -extern compop_func op_4670_0_comp_nf; -extern compop_func op_4678_0_comp_nf; -extern compop_func op_4679_0_comp_nf; -extern compop_func op_4680_0_comp_nf; -extern compop_func op_4690_0_comp_nf; -extern compop_func op_4698_0_comp_nf; -extern compop_func op_46a0_0_comp_nf; -extern compop_func op_46a8_0_comp_nf; -extern compop_func op_46b0_0_comp_nf; -extern compop_func op_46b8_0_comp_nf; -extern compop_func op_46b9_0_comp_nf; -extern compop_func op_4808_0_comp_nf; -extern compop_func op_4840_0_comp_nf; -extern compop_func op_4850_0_comp_nf; -extern compop_func op_4868_0_comp_nf; -extern compop_func op_4870_0_comp_nf; -extern compop_func op_4878_0_comp_nf; -extern compop_func op_4879_0_comp_nf; -extern compop_func op_487a_0_comp_nf; -extern compop_func op_487b_0_comp_nf; -extern compop_func op_4880_0_comp_nf; -extern compop_func op_4890_0_comp_nf; -extern compop_func op_48a0_0_comp_nf; -extern compop_func op_48a8_0_comp_nf; -extern compop_func op_48b0_0_comp_nf; -extern compop_func op_48b8_0_comp_nf; -extern compop_func op_48b9_0_comp_nf; -extern compop_func op_48c0_0_comp_nf; -extern compop_func op_48d0_0_comp_nf; -extern compop_func op_48e0_0_comp_nf; -extern compop_func op_48e8_0_comp_nf; -extern compop_func op_48f0_0_comp_nf; -extern compop_func op_48f8_0_comp_nf; -extern compop_func op_48f9_0_comp_nf; -extern compop_func op_49c0_0_comp_nf; -extern compop_func op_4a00_0_comp_nf; -extern compop_func op_4a10_0_comp_nf; -extern compop_func op_4a18_0_comp_nf; -extern compop_func op_4a20_0_comp_nf; -extern compop_func op_4a28_0_comp_nf; -extern compop_func op_4a30_0_comp_nf; -extern compop_func op_4a38_0_comp_nf; -extern compop_func op_4a39_0_comp_nf; -extern compop_func op_4a3a_0_comp_nf; -extern compop_func op_4a3b_0_comp_nf; -extern compop_func op_4a3c_0_comp_nf; -extern compop_func op_4a40_0_comp_nf; -extern compop_func op_4a48_0_comp_nf; -extern compop_func op_4a50_0_comp_nf; -extern compop_func op_4a58_0_comp_nf; -extern compop_func op_4a60_0_comp_nf; -extern compop_func op_4a68_0_comp_nf; -extern compop_func op_4a70_0_comp_nf; -extern compop_func op_4a78_0_comp_nf; -extern compop_func op_4a79_0_comp_nf; -extern compop_func op_4a7a_0_comp_nf; -extern compop_func op_4a7b_0_comp_nf; -extern compop_func op_4a7c_0_comp_nf; -extern compop_func op_4a80_0_comp_nf; -extern compop_func op_4a88_0_comp_nf; -extern compop_func op_4a90_0_comp_nf; -extern compop_func op_4a98_0_comp_nf; -extern compop_func op_4aa0_0_comp_nf; -extern compop_func op_4aa8_0_comp_nf; -extern compop_func op_4ab0_0_comp_nf; -extern compop_func op_4ab8_0_comp_nf; -extern compop_func op_4ab9_0_comp_nf; -extern compop_func op_4aba_0_comp_nf; -extern compop_func op_4abb_0_comp_nf; -extern compop_func op_4abc_0_comp_nf; -extern compop_func op_4c00_0_comp_nf; -extern compop_func op_4c10_0_comp_nf; -extern compop_func op_4c18_0_comp_nf; -extern compop_func op_4c20_0_comp_nf; -extern compop_func op_4c28_0_comp_nf; -extern compop_func op_4c30_0_comp_nf; -extern compop_func op_4c38_0_comp_nf; -extern compop_func op_4c39_0_comp_nf; -extern compop_func op_4c3a_0_comp_nf; -extern compop_func op_4c3b_0_comp_nf; -extern compop_func op_4c3c_0_comp_nf; -extern compop_func op_4c40_0_comp_nf; -extern compop_func op_4c50_0_comp_nf; -extern compop_func op_4c58_0_comp_nf; -extern compop_func op_4c60_0_comp_nf; -extern compop_func op_4c68_0_comp_nf; -extern compop_func op_4c70_0_comp_nf; -extern compop_func op_4c78_0_comp_nf; -extern compop_func op_4c79_0_comp_nf; -extern compop_func op_4c7a_0_comp_nf; -extern compop_func op_4c7b_0_comp_nf; -extern compop_func op_4c7c_0_comp_nf; -extern compop_func op_4c90_0_comp_nf; -extern compop_func op_4c98_0_comp_nf; -extern compop_func op_4ca8_0_comp_nf; -extern compop_func op_4cb0_0_comp_nf; -extern compop_func op_4cb8_0_comp_nf; -extern compop_func op_4cb9_0_comp_nf; -extern compop_func op_4cba_0_comp_nf; -extern compop_func op_4cbb_0_comp_nf; -extern compop_func op_4cd0_0_comp_nf; -extern compop_func op_4cd8_0_comp_nf; -extern compop_func op_4ce8_0_comp_nf; -extern compop_func op_4cf0_0_comp_nf; -extern compop_func op_4cf8_0_comp_nf; -extern compop_func op_4cf9_0_comp_nf; -extern compop_func op_4cfa_0_comp_nf; -extern compop_func op_4cfb_0_comp_nf; -extern compop_func op_4e50_0_comp_nf; -extern compop_func op_4e58_0_comp_nf; -extern compop_func op_4e71_0_comp_nf; -extern compop_func op_4e74_0_comp_nf; -extern compop_func op_4e75_0_comp_nf; -extern compop_func op_4e90_0_comp_nf; -extern compop_func op_4ea8_0_comp_nf; -extern compop_func op_4eb0_0_comp_nf; -extern compop_func op_4eb8_0_comp_nf; -extern compop_func op_4eb9_0_comp_nf; -extern compop_func op_4eba_0_comp_nf; -extern compop_func op_4ebb_0_comp_nf; -extern compop_func op_4ed0_0_comp_nf; -extern compop_func op_4ee8_0_comp_nf; -extern compop_func op_4ef0_0_comp_nf; -extern compop_func op_4ef8_0_comp_nf; -extern compop_func op_4ef9_0_comp_nf; -extern compop_func op_4efa_0_comp_nf; -extern compop_func op_4efb_0_comp_nf; -extern compop_func op_5000_0_comp_nf; -extern compop_func op_5010_0_comp_nf; -extern compop_func op_5018_0_comp_nf; -extern compop_func op_5020_0_comp_nf; -extern compop_func op_5028_0_comp_nf; -extern compop_func op_5030_0_comp_nf; -extern compop_func op_5038_0_comp_nf; -extern compop_func op_5039_0_comp_nf; -extern compop_func op_5040_0_comp_nf; -extern compop_func op_5048_0_comp_nf; -extern compop_func op_5050_0_comp_nf; -extern compop_func op_5058_0_comp_nf; -extern compop_func op_5060_0_comp_nf; -extern compop_func op_5068_0_comp_nf; -extern compop_func op_5070_0_comp_nf; -extern compop_func op_5078_0_comp_nf; -extern compop_func op_5079_0_comp_nf; -extern compop_func op_5080_0_comp_nf; -extern compop_func op_5088_0_comp_nf; -extern compop_func op_5090_0_comp_nf; -extern compop_func op_5098_0_comp_nf; -extern compop_func op_50a0_0_comp_nf; -extern compop_func op_50a8_0_comp_nf; -extern compop_func op_50b0_0_comp_nf; -extern compop_func op_50b8_0_comp_nf; -extern compop_func op_50b9_0_comp_nf; -extern compop_func op_50c0_0_comp_nf; -extern compop_func op_50c8_0_comp_nf; -extern compop_func op_50d0_0_comp_nf; -extern compop_func op_50d8_0_comp_nf; -extern compop_func op_50e0_0_comp_nf; -extern compop_func op_50e8_0_comp_nf; -extern compop_func op_50f0_0_comp_nf; -extern compop_func op_50f8_0_comp_nf; -extern compop_func op_50f9_0_comp_nf; -extern compop_func op_5100_0_comp_nf; -extern compop_func op_5110_0_comp_nf; -extern compop_func op_5118_0_comp_nf; -extern compop_func op_5120_0_comp_nf; -extern compop_func op_5128_0_comp_nf; -extern compop_func op_5130_0_comp_nf; -extern compop_func op_5138_0_comp_nf; -extern compop_func op_5139_0_comp_nf; -extern compop_func op_5140_0_comp_nf; -extern compop_func op_5148_0_comp_nf; -extern compop_func op_5150_0_comp_nf; -extern compop_func op_5158_0_comp_nf; -extern compop_func op_5160_0_comp_nf; -extern compop_func op_5168_0_comp_nf; -extern compop_func op_5170_0_comp_nf; -extern compop_func op_5178_0_comp_nf; -extern compop_func op_5179_0_comp_nf; -extern compop_func op_5180_0_comp_nf; -extern compop_func op_5188_0_comp_nf; -extern compop_func op_5190_0_comp_nf; -extern compop_func op_5198_0_comp_nf; -extern compop_func op_51a0_0_comp_nf; -extern compop_func op_51a8_0_comp_nf; -extern compop_func op_51b0_0_comp_nf; -extern compop_func op_51b8_0_comp_nf; -extern compop_func op_51b9_0_comp_nf; -extern compop_func op_51c0_0_comp_nf; -extern compop_func op_51c8_0_comp_nf; -extern compop_func op_51d0_0_comp_nf; -extern compop_func op_51d8_0_comp_nf; -extern compop_func op_51e0_0_comp_nf; -extern compop_func op_51e8_0_comp_nf; -extern compop_func op_51f0_0_comp_nf; -extern compop_func op_51f8_0_comp_nf; -extern compop_func op_51f9_0_comp_nf; -extern compop_func op_52c0_0_comp_nf; -extern compop_func op_52c8_0_comp_nf; -extern compop_func op_52d0_0_comp_nf; -extern compop_func op_52d8_0_comp_nf; -extern compop_func op_52e0_0_comp_nf; -extern compop_func op_52e8_0_comp_nf; -extern compop_func op_52f0_0_comp_nf; -extern compop_func op_52f8_0_comp_nf; -extern compop_func op_52f9_0_comp_nf; -extern compop_func op_53c0_0_comp_nf; -extern compop_func op_53c8_0_comp_nf; -extern compop_func op_53d0_0_comp_nf; -extern compop_func op_53d8_0_comp_nf; -extern compop_func op_53e0_0_comp_nf; -extern compop_func op_53e8_0_comp_nf; -extern compop_func op_53f0_0_comp_nf; -extern compop_func op_53f8_0_comp_nf; -extern compop_func op_53f9_0_comp_nf; -extern compop_func op_54c0_0_comp_nf; -extern compop_func op_54c8_0_comp_nf; -extern compop_func op_54d0_0_comp_nf; -extern compop_func op_54d8_0_comp_nf; -extern compop_func op_54e0_0_comp_nf; -extern compop_func op_54e8_0_comp_nf; -extern compop_func op_54f0_0_comp_nf; -extern compop_func op_54f8_0_comp_nf; -extern compop_func op_54f9_0_comp_nf; -extern compop_func op_55c0_0_comp_nf; -extern compop_func op_55c8_0_comp_nf; -extern compop_func op_55d0_0_comp_nf; -extern compop_func op_55d8_0_comp_nf; -extern compop_func op_55e0_0_comp_nf; -extern compop_func op_55e8_0_comp_nf; -extern compop_func op_55f0_0_comp_nf; -extern compop_func op_55f8_0_comp_nf; -extern compop_func op_55f9_0_comp_nf; -extern compop_func op_56c0_0_comp_nf; -extern compop_func op_56c8_0_comp_nf; -extern compop_func op_56d0_0_comp_nf; -extern compop_func op_56d8_0_comp_nf; -extern compop_func op_56e0_0_comp_nf; -extern compop_func op_56e8_0_comp_nf; -extern compop_func op_56f0_0_comp_nf; -extern compop_func op_56f8_0_comp_nf; -extern compop_func op_56f9_0_comp_nf; -extern compop_func op_57c0_0_comp_nf; -extern compop_func op_57c8_0_comp_nf; -extern compop_func op_57d0_0_comp_nf; -extern compop_func op_57d8_0_comp_nf; -extern compop_func op_57e0_0_comp_nf; -extern compop_func op_57e8_0_comp_nf; -extern compop_func op_57f0_0_comp_nf; -extern compop_func op_57f8_0_comp_nf; -extern compop_func op_57f9_0_comp_nf; -extern compop_func op_58c0_0_comp_nf; -extern compop_func op_58c8_0_comp_nf; -extern compop_func op_58d0_0_comp_nf; -extern compop_func op_58d8_0_comp_nf; -extern compop_func op_58e0_0_comp_nf; -extern compop_func op_58e8_0_comp_nf; -extern compop_func op_58f0_0_comp_nf; -extern compop_func op_58f8_0_comp_nf; -extern compop_func op_58f9_0_comp_nf; -extern compop_func op_59c0_0_comp_nf; -extern compop_func op_59c8_0_comp_nf; -extern compop_func op_59d0_0_comp_nf; -extern compop_func op_59d8_0_comp_nf; -extern compop_func op_59e0_0_comp_nf; -extern compop_func op_59e8_0_comp_nf; -extern compop_func op_59f0_0_comp_nf; -extern compop_func op_59f8_0_comp_nf; -extern compop_func op_59f9_0_comp_nf; -extern compop_func op_5ac0_0_comp_nf; -extern compop_func op_5ac8_0_comp_nf; -extern compop_func op_5ad0_0_comp_nf; -extern compop_func op_5ad8_0_comp_nf; -extern compop_func op_5ae0_0_comp_nf; -extern compop_func op_5ae8_0_comp_nf; -extern compop_func op_5af0_0_comp_nf; -extern compop_func op_5af8_0_comp_nf; -extern compop_func op_5af9_0_comp_nf; -extern compop_func op_5bc0_0_comp_nf; -extern compop_func op_5bc8_0_comp_nf; -extern compop_func op_5bd0_0_comp_nf; -extern compop_func op_5bd8_0_comp_nf; -extern compop_func op_5be0_0_comp_nf; -extern compop_func op_5be8_0_comp_nf; -extern compop_func op_5bf0_0_comp_nf; -extern compop_func op_5bf8_0_comp_nf; -extern compop_func op_5bf9_0_comp_nf; -extern compop_func op_5cc0_0_comp_nf; -extern compop_func op_5cc8_0_comp_nf; -extern compop_func op_5cd0_0_comp_nf; -extern compop_func op_5cd8_0_comp_nf; -extern compop_func op_5ce0_0_comp_nf; -extern compop_func op_5ce8_0_comp_nf; -extern compop_func op_5cf0_0_comp_nf; -extern compop_func op_5cf8_0_comp_nf; -extern compop_func op_5cf9_0_comp_nf; -extern compop_func op_5dc0_0_comp_nf; -extern compop_func op_5dc8_0_comp_nf; -extern compop_func op_5dd0_0_comp_nf; -extern compop_func op_5dd8_0_comp_nf; -extern compop_func op_5de0_0_comp_nf; -extern compop_func op_5de8_0_comp_nf; -extern compop_func op_5df0_0_comp_nf; -extern compop_func op_5df8_0_comp_nf; -extern compop_func op_5df9_0_comp_nf; -extern compop_func op_5ec0_0_comp_nf; -extern compop_func op_5ec8_0_comp_nf; -extern compop_func op_5ed0_0_comp_nf; -extern compop_func op_5ed8_0_comp_nf; -extern compop_func op_5ee0_0_comp_nf; -extern compop_func op_5ee8_0_comp_nf; -extern compop_func op_5ef0_0_comp_nf; -extern compop_func op_5ef8_0_comp_nf; -extern compop_func op_5ef9_0_comp_nf; -extern compop_func op_5fc0_0_comp_nf; -extern compop_func op_5fc8_0_comp_nf; -extern compop_func op_5fd0_0_comp_nf; -extern compop_func op_5fd8_0_comp_nf; -extern compop_func op_5fe0_0_comp_nf; -extern compop_func op_5fe8_0_comp_nf; -extern compop_func op_5ff0_0_comp_nf; -extern compop_func op_5ff8_0_comp_nf; -extern compop_func op_5ff9_0_comp_nf; -extern compop_func op_6000_0_comp_nf; -extern compop_func op_6001_0_comp_nf; -extern compop_func op_60ff_0_comp_nf; -extern compop_func op_6100_0_comp_nf; -extern compop_func op_6101_0_comp_nf; -extern compop_func op_61ff_0_comp_nf; -extern compop_func op_6200_0_comp_nf; -extern compop_func op_6201_0_comp_nf; -extern compop_func op_62ff_0_comp_nf; -extern compop_func op_6300_0_comp_nf; -extern compop_func op_6301_0_comp_nf; -extern compop_func op_63ff_0_comp_nf; -extern compop_func op_6400_0_comp_nf; -extern compop_func op_6401_0_comp_nf; -extern compop_func op_64ff_0_comp_nf; -extern compop_func op_6500_0_comp_nf; -extern compop_func op_6501_0_comp_nf; -extern compop_func op_65ff_0_comp_nf; -extern compop_func op_6600_0_comp_nf; -extern compop_func op_6601_0_comp_nf; -extern compop_func op_66ff_0_comp_nf; -extern compop_func op_6700_0_comp_nf; -extern compop_func op_6701_0_comp_nf; -extern compop_func op_67ff_0_comp_nf; -extern compop_func op_6800_0_comp_nf; -extern compop_func op_6801_0_comp_nf; -extern compop_func op_68ff_0_comp_nf; -extern compop_func op_6900_0_comp_nf; -extern compop_func op_6901_0_comp_nf; -extern compop_func op_69ff_0_comp_nf; -extern compop_func op_6a00_0_comp_nf; -extern compop_func op_6a01_0_comp_nf; -extern compop_func op_6aff_0_comp_nf; -extern compop_func op_6b00_0_comp_nf; -extern compop_func op_6b01_0_comp_nf; -extern compop_func op_6bff_0_comp_nf; -extern compop_func op_6c00_0_comp_nf; -extern compop_func op_6c01_0_comp_nf; -extern compop_func op_6cff_0_comp_nf; -extern compop_func op_6d00_0_comp_nf; -extern compop_func op_6d01_0_comp_nf; -extern compop_func op_6dff_0_comp_nf; -extern compop_func op_6e00_0_comp_nf; -extern compop_func op_6e01_0_comp_nf; -extern compop_func op_6eff_0_comp_nf; -extern compop_func op_6f00_0_comp_nf; -extern compop_func op_6f01_0_comp_nf; -extern compop_func op_6fff_0_comp_nf; -extern compop_func op_7000_0_comp_nf; -extern compop_func op_8000_0_comp_nf; -extern compop_func op_8010_0_comp_nf; -extern compop_func op_8018_0_comp_nf; -extern compop_func op_8020_0_comp_nf; -extern compop_func op_8028_0_comp_nf; -extern compop_func op_8030_0_comp_nf; -extern compop_func op_8038_0_comp_nf; -extern compop_func op_8039_0_comp_nf; -extern compop_func op_803a_0_comp_nf; -extern compop_func op_803b_0_comp_nf; -extern compop_func op_803c_0_comp_nf; -extern compop_func op_8040_0_comp_nf; -extern compop_func op_8050_0_comp_nf; -extern compop_func op_8058_0_comp_nf; -extern compop_func op_8060_0_comp_nf; -extern compop_func op_8068_0_comp_nf; -extern compop_func op_8070_0_comp_nf; -extern compop_func op_8078_0_comp_nf; -extern compop_func op_8079_0_comp_nf; -extern compop_func op_807a_0_comp_nf; -extern compop_func op_807b_0_comp_nf; -extern compop_func op_807c_0_comp_nf; -extern compop_func op_8080_0_comp_nf; -extern compop_func op_8090_0_comp_nf; -extern compop_func op_8098_0_comp_nf; -extern compop_func op_80a0_0_comp_nf; -extern compop_func op_80a8_0_comp_nf; -extern compop_func op_80b0_0_comp_nf; -extern compop_func op_80b8_0_comp_nf; -extern compop_func op_80b9_0_comp_nf; -extern compop_func op_80ba_0_comp_nf; -extern compop_func op_80bb_0_comp_nf; -extern compop_func op_80bc_0_comp_nf; -extern compop_func op_80c0_0_comp_nf; -extern compop_func op_80d0_0_comp_nf; -extern compop_func op_80d8_0_comp_nf; -extern compop_func op_80e0_0_comp_nf; -extern compop_func op_80e8_0_comp_nf; -extern compop_func op_80f0_0_comp_nf; -extern compop_func op_80f8_0_comp_nf; -extern compop_func op_80f9_0_comp_nf; -extern compop_func op_80fa_0_comp_nf; -extern compop_func op_80fb_0_comp_nf; -extern compop_func op_80fc_0_comp_nf; -extern compop_func op_8110_0_comp_nf; -extern compop_func op_8118_0_comp_nf; -extern compop_func op_8120_0_comp_nf; -extern compop_func op_8128_0_comp_nf; -extern compop_func op_8130_0_comp_nf; -extern compop_func op_8138_0_comp_nf; -extern compop_func op_8139_0_comp_nf; -extern compop_func op_8150_0_comp_nf; -extern compop_func op_8158_0_comp_nf; -extern compop_func op_8160_0_comp_nf; -extern compop_func op_8168_0_comp_nf; -extern compop_func op_8170_0_comp_nf; -extern compop_func op_8178_0_comp_nf; -extern compop_func op_8179_0_comp_nf; -extern compop_func op_8190_0_comp_nf; -extern compop_func op_8198_0_comp_nf; -extern compop_func op_81a0_0_comp_nf; -extern compop_func op_81a8_0_comp_nf; -extern compop_func op_81b0_0_comp_nf; -extern compop_func op_81b8_0_comp_nf; -extern compop_func op_81b9_0_comp_nf; -extern compop_func op_81c0_0_comp_nf; -extern compop_func op_81d0_0_comp_nf; -extern compop_func op_81d8_0_comp_nf; -extern compop_func op_81e0_0_comp_nf; -extern compop_func op_81e8_0_comp_nf; -extern compop_func op_81f0_0_comp_nf; -extern compop_func op_81f8_0_comp_nf; -extern compop_func op_81f9_0_comp_nf; -extern compop_func op_81fa_0_comp_nf; -extern compop_func op_81fb_0_comp_nf; -extern compop_func op_81fc_0_comp_nf; -extern compop_func op_9000_0_comp_nf; -extern compop_func op_9010_0_comp_nf; -extern compop_func op_9018_0_comp_nf; -extern compop_func op_9020_0_comp_nf; -extern compop_func op_9028_0_comp_nf; -extern compop_func op_9030_0_comp_nf; -extern compop_func op_9038_0_comp_nf; -extern compop_func op_9039_0_comp_nf; -extern compop_func op_903a_0_comp_nf; -extern compop_func op_903b_0_comp_nf; -extern compop_func op_903c_0_comp_nf; -extern compop_func op_9040_0_comp_nf; -extern compop_func op_9048_0_comp_nf; -extern compop_func op_9050_0_comp_nf; -extern compop_func op_9058_0_comp_nf; -extern compop_func op_9060_0_comp_nf; -extern compop_func op_9068_0_comp_nf; -extern compop_func op_9070_0_comp_nf; -extern compop_func op_9078_0_comp_nf; -extern compop_func op_9079_0_comp_nf; -extern compop_func op_907a_0_comp_nf; -extern compop_func op_907b_0_comp_nf; -extern compop_func op_907c_0_comp_nf; -extern compop_func op_9080_0_comp_nf; -extern compop_func op_9088_0_comp_nf; -extern compop_func op_9090_0_comp_nf; -extern compop_func op_9098_0_comp_nf; -extern compop_func op_90a0_0_comp_nf; -extern compop_func op_90a8_0_comp_nf; -extern compop_func op_90b0_0_comp_nf; -extern compop_func op_90b8_0_comp_nf; -extern compop_func op_90b9_0_comp_nf; -extern compop_func op_90ba_0_comp_nf; -extern compop_func op_90bb_0_comp_nf; -extern compop_func op_90bc_0_comp_nf; -extern compop_func op_90c0_0_comp_nf; -extern compop_func op_90c8_0_comp_nf; -extern compop_func op_90d0_0_comp_nf; -extern compop_func op_90d8_0_comp_nf; -extern compop_func op_90e0_0_comp_nf; -extern compop_func op_90e8_0_comp_nf; -extern compop_func op_90f0_0_comp_nf; -extern compop_func op_90f8_0_comp_nf; -extern compop_func op_90f9_0_comp_nf; -extern compop_func op_90fa_0_comp_nf; -extern compop_func op_90fb_0_comp_nf; -extern compop_func op_90fc_0_comp_nf; -extern compop_func op_9100_0_comp_nf; -extern compop_func op_9108_0_comp_nf; -extern compop_func op_9110_0_comp_nf; -extern compop_func op_9118_0_comp_nf; -extern compop_func op_9120_0_comp_nf; -extern compop_func op_9128_0_comp_nf; -extern compop_func op_9130_0_comp_nf; -extern compop_func op_9138_0_comp_nf; -extern compop_func op_9139_0_comp_nf; -extern compop_func op_9140_0_comp_nf; -extern compop_func op_9148_0_comp_nf; -extern compop_func op_9150_0_comp_nf; -extern compop_func op_9158_0_comp_nf; -extern compop_func op_9160_0_comp_nf; -extern compop_func op_9168_0_comp_nf; -extern compop_func op_9170_0_comp_nf; -extern compop_func op_9178_0_comp_nf; -extern compop_func op_9179_0_comp_nf; -extern compop_func op_9180_0_comp_nf; -extern compop_func op_9188_0_comp_nf; -extern compop_func op_9190_0_comp_nf; -extern compop_func op_9198_0_comp_nf; -extern compop_func op_91a0_0_comp_nf; -extern compop_func op_91a8_0_comp_nf; -extern compop_func op_91b0_0_comp_nf; -extern compop_func op_91b8_0_comp_nf; -extern compop_func op_91b9_0_comp_nf; -extern compop_func op_91c0_0_comp_nf; -extern compop_func op_91c8_0_comp_nf; -extern compop_func op_91d0_0_comp_nf; -extern compop_func op_91d8_0_comp_nf; -extern compop_func op_91e0_0_comp_nf; -extern compop_func op_91e8_0_comp_nf; -extern compop_func op_91f0_0_comp_nf; -extern compop_func op_91f8_0_comp_nf; -extern compop_func op_91f9_0_comp_nf; -extern compop_func op_91fa_0_comp_nf; -extern compop_func op_91fb_0_comp_nf; -extern compop_func op_91fc_0_comp_nf; -extern compop_func op_b000_0_comp_nf; -extern compop_func op_b010_0_comp_nf; -extern compop_func op_b018_0_comp_nf; -extern compop_func op_b020_0_comp_nf; -extern compop_func op_b028_0_comp_nf; -extern compop_func op_b030_0_comp_nf; -extern compop_func op_b038_0_comp_nf; -extern compop_func op_b039_0_comp_nf; -extern compop_func op_b03a_0_comp_nf; -extern compop_func op_b03b_0_comp_nf; -extern compop_func op_b03c_0_comp_nf; -extern compop_func op_b040_0_comp_nf; -extern compop_func op_b048_0_comp_nf; -extern compop_func op_b050_0_comp_nf; -extern compop_func op_b058_0_comp_nf; -extern compop_func op_b060_0_comp_nf; -extern compop_func op_b068_0_comp_nf; -extern compop_func op_b070_0_comp_nf; -extern compop_func op_b078_0_comp_nf; -extern compop_func op_b079_0_comp_nf; -extern compop_func op_b07a_0_comp_nf; -extern compop_func op_b07b_0_comp_nf; -extern compop_func op_b07c_0_comp_nf; -extern compop_func op_b080_0_comp_nf; -extern compop_func op_b088_0_comp_nf; -extern compop_func op_b090_0_comp_nf; -extern compop_func op_b098_0_comp_nf; -extern compop_func op_b0a0_0_comp_nf; -extern compop_func op_b0a8_0_comp_nf; -extern compop_func op_b0b0_0_comp_nf; -extern compop_func op_b0b8_0_comp_nf; -extern compop_func op_b0b9_0_comp_nf; -extern compop_func op_b0ba_0_comp_nf; -extern compop_func op_b0bb_0_comp_nf; -extern compop_func op_b0bc_0_comp_nf; -extern compop_func op_b0c0_0_comp_nf; -extern compop_func op_b0c8_0_comp_nf; -extern compop_func op_b0d0_0_comp_nf; -extern compop_func op_b0d8_0_comp_nf; -extern compop_func op_b0e0_0_comp_nf; -extern compop_func op_b0e8_0_comp_nf; -extern compop_func op_b0f0_0_comp_nf; -extern compop_func op_b0f8_0_comp_nf; -extern compop_func op_b0f9_0_comp_nf; -extern compop_func op_b0fa_0_comp_nf; -extern compop_func op_b0fb_0_comp_nf; -extern compop_func op_b0fc_0_comp_nf; -extern compop_func op_b100_0_comp_nf; -extern compop_func op_b108_0_comp_nf; -extern compop_func op_b110_0_comp_nf; -extern compop_func op_b118_0_comp_nf; -extern compop_func op_b120_0_comp_nf; -extern compop_func op_b128_0_comp_nf; -extern compop_func op_b130_0_comp_nf; -extern compop_func op_b138_0_comp_nf; -extern compop_func op_b139_0_comp_nf; -extern compop_func op_b140_0_comp_nf; -extern compop_func op_b148_0_comp_nf; -extern compop_func op_b150_0_comp_nf; -extern compop_func op_b158_0_comp_nf; -extern compop_func op_b160_0_comp_nf; -extern compop_func op_b168_0_comp_nf; -extern compop_func op_b170_0_comp_nf; -extern compop_func op_b178_0_comp_nf; -extern compop_func op_b179_0_comp_nf; -extern compop_func op_b180_0_comp_nf; -extern compop_func op_b188_0_comp_nf; -extern compop_func op_b190_0_comp_nf; -extern compop_func op_b198_0_comp_nf; -extern compop_func op_b1a0_0_comp_nf; -extern compop_func op_b1a8_0_comp_nf; -extern compop_func op_b1b0_0_comp_nf; -extern compop_func op_b1b8_0_comp_nf; -extern compop_func op_b1b9_0_comp_nf; -extern compop_func op_b1c0_0_comp_nf; -extern compop_func op_b1c8_0_comp_nf; -extern compop_func op_b1d0_0_comp_nf; -extern compop_func op_b1d8_0_comp_nf; -extern compop_func op_b1e0_0_comp_nf; -extern compop_func op_b1e8_0_comp_nf; -extern compop_func op_b1f0_0_comp_nf; -extern compop_func op_b1f8_0_comp_nf; -extern compop_func op_b1f9_0_comp_nf; -extern compop_func op_b1fa_0_comp_nf; -extern compop_func op_b1fb_0_comp_nf; -extern compop_func op_b1fc_0_comp_nf; -extern compop_func op_c000_0_comp_nf; -extern compop_func op_c010_0_comp_nf; -extern compop_func op_c018_0_comp_nf; -extern compop_func op_c020_0_comp_nf; -extern compop_func op_c028_0_comp_nf; -extern compop_func op_c030_0_comp_nf; -extern compop_func op_c038_0_comp_nf; -extern compop_func op_c039_0_comp_nf; -extern compop_func op_c03a_0_comp_nf; -extern compop_func op_c03b_0_comp_nf; -extern compop_func op_c03c_0_comp_nf; -extern compop_func op_c040_0_comp_nf; -extern compop_func op_c050_0_comp_nf; -extern compop_func op_c058_0_comp_nf; -extern compop_func op_c060_0_comp_nf; -extern compop_func op_c068_0_comp_nf; -extern compop_func op_c070_0_comp_nf; -extern compop_func op_c078_0_comp_nf; -extern compop_func op_c079_0_comp_nf; -extern compop_func op_c07a_0_comp_nf; -extern compop_func op_c07b_0_comp_nf; -extern compop_func op_c07c_0_comp_nf; -extern compop_func op_c080_0_comp_nf; -extern compop_func op_c090_0_comp_nf; -extern compop_func op_c098_0_comp_nf; -extern compop_func op_c0a0_0_comp_nf; -extern compop_func op_c0a8_0_comp_nf; -extern compop_func op_c0b0_0_comp_nf; -extern compop_func op_c0b8_0_comp_nf; -extern compop_func op_c0b9_0_comp_nf; -extern compop_func op_c0ba_0_comp_nf; -extern compop_func op_c0bb_0_comp_nf; -extern compop_func op_c0bc_0_comp_nf; -extern compop_func op_c0c0_0_comp_nf; -extern compop_func op_c0d0_0_comp_nf; -extern compop_func op_c0d8_0_comp_nf; -extern compop_func op_c0e0_0_comp_nf; -extern compop_func op_c0e8_0_comp_nf; -extern compop_func op_c0f0_0_comp_nf; -extern compop_func op_c0f8_0_comp_nf; -extern compop_func op_c0f9_0_comp_nf; -extern compop_func op_c0fa_0_comp_nf; -extern compop_func op_c0fb_0_comp_nf; -extern compop_func op_c0fc_0_comp_nf; -extern compop_func op_c110_0_comp_nf; -extern compop_func op_c118_0_comp_nf; -extern compop_func op_c120_0_comp_nf; -extern compop_func op_c128_0_comp_nf; -extern compop_func op_c130_0_comp_nf; -extern compop_func op_c138_0_comp_nf; -extern compop_func op_c139_0_comp_nf; -extern compop_func op_c140_0_comp_nf; -extern compop_func op_c148_0_comp_nf; -extern compop_func op_c150_0_comp_nf; -extern compop_func op_c158_0_comp_nf; -extern compop_func op_c160_0_comp_nf; -extern compop_func op_c168_0_comp_nf; -extern compop_func op_c170_0_comp_nf; -extern compop_func op_c178_0_comp_nf; -extern compop_func op_c179_0_comp_nf; -extern compop_func op_c188_0_comp_nf; -extern compop_func op_c190_0_comp_nf; -extern compop_func op_c198_0_comp_nf; -extern compop_func op_c1a0_0_comp_nf; -extern compop_func op_c1a8_0_comp_nf; -extern compop_func op_c1b0_0_comp_nf; -extern compop_func op_c1b8_0_comp_nf; -extern compop_func op_c1b9_0_comp_nf; -extern compop_func op_c1c0_0_comp_nf; -extern compop_func op_c1d0_0_comp_nf; -extern compop_func op_c1d8_0_comp_nf; -extern compop_func op_c1e0_0_comp_nf; -extern compop_func op_c1e8_0_comp_nf; -extern compop_func op_c1f0_0_comp_nf; -extern compop_func op_c1f8_0_comp_nf; -extern compop_func op_c1f9_0_comp_nf; -extern compop_func op_c1fa_0_comp_nf; -extern compop_func op_c1fb_0_comp_nf; -extern compop_func op_c1fc_0_comp_nf; -extern compop_func op_d000_0_comp_nf; -extern compop_func op_d010_0_comp_nf; -extern compop_func op_d018_0_comp_nf; -extern compop_func op_d020_0_comp_nf; -extern compop_func op_d028_0_comp_nf; -extern compop_func op_d030_0_comp_nf; -extern compop_func op_d038_0_comp_nf; -extern compop_func op_d039_0_comp_nf; -extern compop_func op_d03a_0_comp_nf; -extern compop_func op_d03b_0_comp_nf; -extern compop_func op_d03c_0_comp_nf; -extern compop_func op_d040_0_comp_nf; -extern compop_func op_d048_0_comp_nf; -extern compop_func op_d050_0_comp_nf; -extern compop_func op_d058_0_comp_nf; -extern compop_func op_d060_0_comp_nf; -extern compop_func op_d068_0_comp_nf; -extern compop_func op_d070_0_comp_nf; -extern compop_func op_d078_0_comp_nf; -extern compop_func op_d079_0_comp_nf; -extern compop_func op_d07a_0_comp_nf; -extern compop_func op_d07b_0_comp_nf; -extern compop_func op_d07c_0_comp_nf; -extern compop_func op_d080_0_comp_nf; -extern compop_func op_d088_0_comp_nf; -extern compop_func op_d090_0_comp_nf; -extern compop_func op_d098_0_comp_nf; -extern compop_func op_d0a0_0_comp_nf; -extern compop_func op_d0a8_0_comp_nf; -extern compop_func op_d0b0_0_comp_nf; -extern compop_func op_d0b8_0_comp_nf; -extern compop_func op_d0b9_0_comp_nf; -extern compop_func op_d0ba_0_comp_nf; -extern compop_func op_d0bb_0_comp_nf; -extern compop_func op_d0bc_0_comp_nf; -extern compop_func op_d0c0_0_comp_nf; -extern compop_func op_d0c8_0_comp_nf; -extern compop_func op_d0d0_0_comp_nf; -extern compop_func op_d0d8_0_comp_nf; -extern compop_func op_d0e0_0_comp_nf; -extern compop_func op_d0e8_0_comp_nf; -extern compop_func op_d0f0_0_comp_nf; -extern compop_func op_d0f8_0_comp_nf; -extern compop_func op_d0f9_0_comp_nf; -extern compop_func op_d0fa_0_comp_nf; -extern compop_func op_d0fb_0_comp_nf; -extern compop_func op_d0fc_0_comp_nf; -extern compop_func op_d100_0_comp_nf; -extern compop_func op_d108_0_comp_nf; -extern compop_func op_d110_0_comp_nf; -extern compop_func op_d118_0_comp_nf; -extern compop_func op_d120_0_comp_nf; -extern compop_func op_d128_0_comp_nf; -extern compop_func op_d130_0_comp_nf; -extern compop_func op_d138_0_comp_nf; -extern compop_func op_d139_0_comp_nf; -extern compop_func op_d140_0_comp_nf; -extern compop_func op_d148_0_comp_nf; -extern compop_func op_d150_0_comp_nf; -extern compop_func op_d158_0_comp_nf; -extern compop_func op_d160_0_comp_nf; -extern compop_func op_d168_0_comp_nf; -extern compop_func op_d170_0_comp_nf; -extern compop_func op_d178_0_comp_nf; -extern compop_func op_d179_0_comp_nf; -extern compop_func op_d180_0_comp_nf; -extern compop_func op_d188_0_comp_nf; -extern compop_func op_d190_0_comp_nf; -extern compop_func op_d198_0_comp_nf; -extern compop_func op_d1a0_0_comp_nf; -extern compop_func op_d1a8_0_comp_nf; -extern compop_func op_d1b0_0_comp_nf; -extern compop_func op_d1b8_0_comp_nf; -extern compop_func op_d1b9_0_comp_nf; -extern compop_func op_d1c0_0_comp_nf; -extern compop_func op_d1c8_0_comp_nf; -extern compop_func op_d1d0_0_comp_nf; -extern compop_func op_d1d8_0_comp_nf; -extern compop_func op_d1e0_0_comp_nf; -extern compop_func op_d1e8_0_comp_nf; -extern compop_func op_d1f0_0_comp_nf; -extern compop_func op_d1f8_0_comp_nf; -extern compop_func op_d1f9_0_comp_nf; -extern compop_func op_d1fa_0_comp_nf; -extern compop_func op_d1fb_0_comp_nf; -extern compop_func op_d1fc_0_comp_nf; -extern compop_func op_e000_0_comp_nf; -extern compop_func op_e008_0_comp_nf; -extern compop_func op_e010_0_comp_nf; -extern compop_func op_e018_0_comp_nf; -extern compop_func op_e020_0_comp_nf; -extern compop_func op_e028_0_comp_nf; -extern compop_func op_e030_0_comp_nf; -extern compop_func op_e038_0_comp_nf; -extern compop_func op_e040_0_comp_nf; -extern compop_func op_e048_0_comp_nf; -extern compop_func op_e050_0_comp_nf; -extern compop_func op_e058_0_comp_nf; -extern compop_func op_e060_0_comp_nf; -extern compop_func op_e068_0_comp_nf; -extern compop_func op_e070_0_comp_nf; -extern compop_func op_e078_0_comp_nf; -extern compop_func op_e080_0_comp_nf; -extern compop_func op_e088_0_comp_nf; -extern compop_func op_e090_0_comp_nf; -extern compop_func op_e098_0_comp_nf; -extern compop_func op_e0a0_0_comp_nf; -extern compop_func op_e0a8_0_comp_nf; -extern compop_func op_e0b0_0_comp_nf; -extern compop_func op_e0b8_0_comp_nf; -extern compop_func op_e0d0_0_comp_nf; -extern compop_func op_e0d8_0_comp_nf; -extern compop_func op_e0e0_0_comp_nf; -extern compop_func op_e0e8_0_comp_nf; -extern compop_func op_e0f0_0_comp_nf; -extern compop_func op_e0f8_0_comp_nf; -extern compop_func op_e0f9_0_comp_nf; -extern compop_func op_e100_0_comp_nf; -extern compop_func op_e108_0_comp_nf; -extern compop_func op_e110_0_comp_nf; -extern compop_func op_e118_0_comp_nf; -extern compop_func op_e120_0_comp_nf; -extern compop_func op_e128_0_comp_nf; -extern compop_func op_e130_0_comp_nf; -extern compop_func op_e138_0_comp_nf; -extern compop_func op_e140_0_comp_nf; -extern compop_func op_e148_0_comp_nf; -extern compop_func op_e150_0_comp_nf; -extern compop_func op_e158_0_comp_nf; -extern compop_func op_e160_0_comp_nf; -extern compop_func op_e168_0_comp_nf; -extern compop_func op_e170_0_comp_nf; -extern compop_func op_e178_0_comp_nf; -extern compop_func op_e180_0_comp_nf; -extern compop_func op_e188_0_comp_nf; -extern compop_func op_e190_0_comp_nf; -extern compop_func op_e198_0_comp_nf; -extern compop_func op_e1a0_0_comp_nf; -extern compop_func op_e1a8_0_comp_nf; -extern compop_func op_e1b0_0_comp_nf; -extern compop_func op_e1b8_0_comp_nf; -extern compop_func op_e1d0_0_comp_nf; -extern compop_func op_e1d8_0_comp_nf; -extern compop_func op_e1e0_0_comp_nf; -extern compop_func op_e1e8_0_comp_nf; -extern compop_func op_e1f0_0_comp_nf; -extern compop_func op_e1f8_0_comp_nf; -extern compop_func op_e1f9_0_comp_nf; -extern compop_func op_e2d0_0_comp_nf; -extern compop_func op_e2d8_0_comp_nf; -extern compop_func op_e2e0_0_comp_nf; -extern compop_func op_e2e8_0_comp_nf; -extern compop_func op_e2f0_0_comp_nf; -extern compop_func op_e2f8_0_comp_nf; -extern compop_func op_e2f9_0_comp_nf; -extern compop_func op_e3d0_0_comp_nf; -extern compop_func op_e3d8_0_comp_nf; -extern compop_func op_e3e0_0_comp_nf; -extern compop_func op_e3e8_0_comp_nf; -extern compop_func op_e3f0_0_comp_nf; -extern compop_func op_e3f8_0_comp_nf; -extern compop_func op_e3f9_0_comp_nf; -extern compop_func op_e6d0_0_comp_nf; -extern compop_func op_e6d8_0_comp_nf; -extern compop_func op_e6e0_0_comp_nf; -extern compop_func op_e6e8_0_comp_nf; -extern compop_func op_e6f0_0_comp_nf; -extern compop_func op_e6f8_0_comp_nf; -extern compop_func op_e6f9_0_comp_nf; -extern compop_func op_e7d0_0_comp_nf; -extern compop_func op_e7d8_0_comp_nf; -extern compop_func op_e7e0_0_comp_nf; -extern compop_func op_e7e8_0_comp_nf; -extern compop_func op_e7f0_0_comp_nf; -extern compop_func op_e7f8_0_comp_nf; -extern compop_func op_e7f9_0_comp_nf; -extern compop_func op_efc0_0_comp_nf; -extern compop_func op_efd0_0_comp_nf; -extern compop_func op_efe8_0_comp_nf; -extern compop_func op_eff0_0_comp_nf; -extern compop_func op_eff8_0_comp_nf; -extern compop_func op_eff9_0_comp_nf; -extern compop_func op_f200_0_comp_nf; -extern compop_func op_f208_0_comp_nf; -extern compop_func op_f210_0_comp_nf; -extern compop_func op_f218_0_comp_nf; -extern compop_func op_f220_0_comp_nf; -extern compop_func op_f228_0_comp_nf; -extern compop_func op_f230_0_comp_nf; -extern compop_func op_f238_0_comp_nf; -extern compop_func op_f239_0_comp_nf; -extern compop_func op_f23a_0_comp_nf; -extern compop_func op_f23b_0_comp_nf; -extern compop_func op_f23c_0_comp_nf; -extern compop_func op_f240_0_comp_nf; -extern compop_func op_f250_0_comp_nf; -extern compop_func op_f258_0_comp_nf; -extern compop_func op_f260_0_comp_nf; -extern compop_func op_f268_0_comp_nf; -extern compop_func op_f270_0_comp_nf; -extern compop_func op_f278_0_comp_nf; -extern compop_func op_f279_0_comp_nf; -extern compop_func op_f280_0_comp_nf; -extern compop_func op_f2c0_0_comp_nf; -extern compop_func op_f600_0_comp_nf; -extern compop_func op_f608_0_comp_nf; -extern compop_func op_f610_0_comp_nf; -extern compop_func op_f618_0_comp_nf; -extern compop_func op_f620_0_comp_nf; +// +// Created by midwan on 22/12/2023. +// + +#ifndef AMIBERRY_COMPTBL_H +#define AMIBERRY_COMPTBL_H + +#if defined(CPU_arm) || defined(CPU_AARCH64) +#include "arm/comptbl_arm.h" +#elif defined(__x86_64__) || defined(_M_AMD64) +#include "x86/comptbl_x86.h" +#endif + +#endif //AMIBERRY_COMPTBL_H diff --git a/src/jit/codegen_x86.cpp b/src/jit/x86/codegen_x86.cpp similarity index 100% rename from src/jit/codegen_x86.cpp rename to src/jit/x86/codegen_x86.cpp diff --git a/src/jit/codegen_x86.h b/src/jit/x86/codegen_x86.h similarity index 100% rename from src/jit/codegen_x86.h rename to src/jit/x86/codegen_x86.h diff --git a/src/jit/x86/compemu_fpp_x86.cpp b/src/jit/x86/compemu_fpp_x86.cpp new file mode 100644 index 000000000..468be7a83 --- /dev/null +++ b/src/jit/x86/compemu_fpp_x86.cpp @@ -0,0 +1,2115 @@ +/* + * compiler/compemu_fpp.cpp - Dynamic translation of FPU instructions + * + * Copyright (c) 2001-2004 Milan Jurik of ARAnyM dev team (see AUTHORS) + * + * Inspired by Christian Bauer's Basilisk II + * + * This file is part of the ARAnyM project which builds a new and powerful + * TOS/FreeMiNT compatible virtual machine running on almost any hardware. + * + * JIT compiler m68k -> IA-32 and AMD64 + * + * Original 68040 JIT compiler for UAE, copyright 2000-2002 Bernd Meyer + * Adaptation for Basilisk II and improvements, copyright 2000-2004 Gwenole Beauchesne + * Portions related to CPU detection come from linux/arch/i386/kernel/setup.c + * + * ARAnyM is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * ARAnyM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ARAnyM; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* + * UAE - The Un*x Amiga Emulator + * + * MC68881 emulation + * + * Copyright 1996 Herman ten Brugge + * Adapted for JIT compilation (c) Bernd Meyer, 2000 + */ + +#include "sysdeps.h" + +#ifdef JIT + +#include +#include +#include + +#include "memory-uae.h" +#include "readcpu.h" +#include "newcpu.h" +#include "compemu_x86.h" +//#include "fpu/fpu.h" +//#include "fpu/flags.h" +//#include "fpu/exceptions.h" +//#include "fpu/rounding.h" + +//#define DEBUG 0 +#include "debug.h" + +struct jit_disable_opcodes jit_disable; + +#if defined(USE_LONG_DOUBLE) || defined(USE_QUAD_DOUBLE) +#define LD(x) x ## L +#else +#define LD(x) x +#endif + +// gb-- WARNING: get_fpcr() and set_fpcr() support is experimental +#define HANDLE_FPCR 0 + +// - IEEE-based fpu core must be used +#if defined(FPU_IEEE) +# define CAN_HANDLE_FPCR +#endif + +// - Generic rounding mode and precision modes are supported if set together +#if defined(FPU_USE_GENERIC_ROUNDING_MODE) && defined(FPU_USE_GENERIC_ROUNDING_PRECISION) +# define CAN_HANDLE_FPCR +#endif + +// - X86 rounding mode and precision modes are *not* supported but might work (?!) +#if defined(FPU_USE_X86_ROUNDING_MODE) && defined(FPU_USE_X86_ROUNDING_PRECISION) +# define CAN_HANDLE_FPCR +#endif + +#if HANDLE_FPCR && !defined(CAN_HANDLE_FPCR) +# warning "Can't handle FPCR, will FAIL(1) at runtime" +# undef HANDLE_FPCR +# define HANDLE_FPCR 0 +#endif + +//#define STATIC_INLINE static inline +#define MAKE_FPSR(r) do { fmov_rr(FP_RESULT,r); } while (0) + +#if 0 +#define delay nop() ;nop() +#define delay2 nop() ;nop() +#else +#define delay +#define delay2 +#endif + +#define UNKNOWN_EXTRA 0xFFFFFFFF +#if 0 +static void fpuop_illg(uae_u32 opcode, uae_u32 /* extra */) +{ +/* + if (extra == UNKNOWN_EXTRA) + printf("FPU opcode %x, extra UNKNOWN_EXTRA\n",opcode & 0xFFFF); + else + printf("FPU opcode %x, extra %x\n",opcode & 0xFFFF,extra & 0xFFFF); +*/ + op_illg(opcode); +} +#endif + +uae_s32 temp_fp[4]; /* To convert between FP/integer */ + +/* return register number, or -1 for failure */ +STATIC_INLINE int get_fp_value(uae_u32 opcode, uae_u16 extra) +{ + int size; + int mode; + int reg; + uae_u32 ad = 0; + static int const sz1[8] = { 4, 4, 12, 12, 2, 8, 1, 0 }; + static int const sz2[8] = { 4, 4, 12, 12, 2, 8, 2, 0 }; + + if ((extra & 0x4000) == 0) + { + return ((extra >> 10) & 7); + } + + mode = (opcode >> 3) & 7; + reg = opcode & 7; + size = (extra >> 10) & 7; + switch (mode) + { + case 0: /* Dn */ + switch (size) + { + case 6: /* byte */ + sign_extend_8_rr(S1, reg); + mov_l_mr(JITPTR temp_fp, S1); + delay2; + fmovi_rm(FS1, JITPTR temp_fp); + return FS1; + case 4: /* word */ + sign_extend_16_rr(S1, reg); + mov_l_mr(JITPTR temp_fp, S1); + delay2; + fmovi_rm(FS1, JITPTR temp_fp); + return FS1; + case 0: /* long */ + mov_l_mr(JITPTR temp_fp, reg); + delay2; + fmovi_rm(FS1, JITPTR temp_fp); + return FS1; + case 1: /* single precision */ + mov_l_mr(JITPTR temp_fp, reg); + delay2; + fmovs_rm(FS1, JITPTR temp_fp); + return FS1; + default: + return -1; + } + return -1; /* Should be unreachable */ + case 1: /* An */ + return -1; /* Genuine invalid instruction */ + default: + break; + } + + /* OK, we *will* have to load something from an address. Let's make + sure we know how to handle that, or quit early --- i.e. *before* + we do any postincrement/predecrement that we may regret */ + switch (size) + { + case 0: /* long */ + case 1: /* single precision */ + case 2: /* extended precision */ + case 4: /* word */ + case 5: /* double precision */ + case 6: /* byte */ + break; + case 3: /* packed decimal static */ + default: + return -1; + } + + switch (mode) + { + case 2: /* (An) */ + ad = S1; /* We will change it, anyway ;-) */ + mov_l_rr(ad, reg + 8); + break; + case 3: /* (An)+ */ + ad = S1; + mov_l_rr(ad, reg + 8); + lea_l_brr(reg + 8, reg + 8, (reg == 7 ? sz2[size] : sz1[size])); + break; + case 4: /* -(An) */ + ad = S1; + lea_l_brr(reg + 8, reg + 8, -(reg == 7 ? sz2[size] : sz1[size])); + mov_l_rr(ad, reg + 8); + break; + case 5: /* d16(An) */ + { + uae_u32 off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + + ad = S1; + mov_l_rr(ad, reg + 8); + lea_l_brr(ad, ad, off); + } + break; + case 6: /* d8(An,Xn) */ + { + uae_u32 dp = comp_get_iword((m68k_pc_offset += 2) - 2); + + ad = S1; + calc_disp_ea_020(reg + 8, dp, ad, S2); + } + break; + case 7: + switch (reg) + { + case 0: /* abs.w */ + { + uae_u32 off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + + ad = S1; + mov_l_ri(ad, off); + } + break; + case 1: /* abs.l */ + { + uae_u32 off = comp_get_ilong((m68k_pc_offset += 4) - 4); + + ad = S1; + mov_l_ri(ad, off); + } + break; + case 2: /* d16(pc) */ + { + uae_u32 address = (uae_u32)(start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + + ad = S1; + mov_l_ri(ad, address + PC16off); + } + break; + case 3: /* d8(pc,Xn) */ + return -1; + case 4: /* #imm */ + { + uae_u32 address = (uae_u32)(start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset); + + ad = S1; + // Immediate addressing mode && Operation Length == Byte -> + // Use the low-order byte of the extension word. + if (size == 6) + address++; + mov_l_ri(ad, address); + m68k_pc_offset += sz2[size]; + } + break; + default: + return -1; + } + } + + switch (size) + { + case 0: /* long */ + readlong(ad, S2, S3); + mov_l_mr(JITPTR temp_fp, S2); + delay2; + fmovi_rm(FS1, JITPTR temp_fp); + break; + case 1: /* single precision */ + readlong(ad, S2, S3); + mov_l_mr(JITPTR temp_fp, S2); + delay2; + fmovs_rm(FS1, JITPTR temp_fp); + break; + case 2: /* extended precision */ + readword(ad, S2, S3); + mov_w_mr((JITPTR temp_fp) + 8, S2); + add_l_ri(ad, 4); + readlong(ad, S2, S3); + // always set the explicit integer bit. + or_l_ri(S2, 0x80000000); + mov_l_mr(JITPTR (temp_fp) + 4, S2); + add_l_ri(ad, 4); + readlong(ad, S2, S3); + mov_l_mr(JITPTR (temp_fp), S2); + delay2; + fmov_ext_rm(FS1, JITPTR (temp_fp)); + break; + case 3: /* packed decimal static */ + return -1; /* Some silly "packed" stuff */ + case 4: /* word */ + readword(ad, S2, S3); + sign_extend_16_rr(S2, S2); + mov_l_mr(JITPTR temp_fp, S2); + delay2; + fmovi_rm(FS1, JITPTR temp_fp); + break; + case 5: /* double precision */ + readlong(ad, S2, S3); + mov_l_mr((JITPTR temp_fp) + 4, S2); + add_l_ri(ad, 4); + readlong(ad, S2, S3); + mov_l_mr(JITPTR (temp_fp), S2); + delay2; + fmov_rm(FS1, JITPTR (temp_fp)); + break; + case 6: /* byte */ + readbyte(ad, S2, S3); + sign_extend_8_rr(S2, S2); + mov_l_mr(JITPTR temp_fp, S2); + delay2; + fmovi_rm(FS1, JITPTR temp_fp); + break; + default: + return -1; + } + return FS1; +} + +static struct { + fpu_register b[2]; + fpu_register w[2]; + fpu_register l[2]; +} clamp_bounds = { + { -128.0, 127.0 }, + { -32768.0, 32767.0 }, + { -2147483648.0, 2147483647.0 } +}; + +/* return of -1 means failure, >=0 means OK */ +STATIC_INLINE int put_fp_value(int val, uae_u32 opcode, uae_u16 extra) +{ + int size; + int mode; + int reg; + uae_u32 ad; + static int const sz1[8] = { 4, 4, 12, 12, 2, 8, 1, 0 }; + static int const sz2[8] = { 4, 4, 12, 12, 2, 8, 2, 0 }; + + if ((extra & 0x4000) == 0) + { + const int dest_reg = (extra >> 10) & 7; + + fmov_rr(dest_reg, val); + // gb-- status register is affected + MAKE_FPSR(dest_reg); + return 0; + } + + mode = (opcode >> 3) & 7; + reg = opcode & 7; + size = (extra >> 10) & 7; + ad = (uae_u32) -1; + switch (mode) + { + case 0: /* Dn */ + switch (size) + { + case 6: /* byte */ + fmovi_mrb(JITPTR temp_fp, val, clamp_bounds.b); + delay; + mov_b_rm(reg, JITPTR temp_fp); + return 0; + case 4: /* word */ + fmovi_mrb(JITPTR temp_fp, val, clamp_bounds.w); + delay; + mov_w_rm(reg, JITPTR temp_fp); + return 0; + case 0: /* long */ + fmovi_mrb(JITPTR temp_fp, val, clamp_bounds.l); + fmovi_mr(JITPTR temp_fp, val); + delay; + mov_l_rm(reg, JITPTR temp_fp); + return 0; + case 1: /* single precision */ + fmovs_mr(JITPTR temp_fp, val); + delay; + mov_l_rm(reg, JITPTR temp_fp); + return 0; + default: + return -1; + } + case 1: /* An */ + return -1; /* genuine invalid instruction */ + default: + break; + } + + /* Let's make sure we get out *before* doing something silly if + we can't handle the size */ + switch (size) + { + case 0: /* long */ + case 1: /* single precision */ + case 2: /* extended precision */ + case 4: /* word */ + case 5: /* double precision */ + case 6: /* byte */ + break; + case 3: /* packed decimal static */ + default: + return -1; + } + + switch (mode) + { + case 2: /* (An) */ + ad = S1; + mov_l_rr(ad, reg + 8); + break; + case 3: /* (An)+ */ + ad = S1; + mov_l_rr(ad, reg + 8); + lea_l_brr(reg + 8, reg + 8, (reg == 7 ? sz2[size] : sz1[size])); + break; + case 4: /* -(An) */ + ad = S1; + lea_l_brr(reg + 8, reg + 8, -(reg == 7 ? sz2[size] : sz1[size])); + mov_l_rr(ad, reg + 8); + break; + case 5: /* d16(An) */ + { + uae_u32 off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + + ad = S1; + mov_l_rr(ad, reg + 8); + add_l_ri(ad, off); + } + break; + case 6: /* d8(An,Xn) */ + { + uae_u32 dp = comp_get_iword((m68k_pc_offset += 2) - 2); + + ad = S1; + calc_disp_ea_020(reg + 8, dp, ad, S2); + } + break; + case 7: + switch (reg) + { + case 0: /* abs.w */ + { + uae_u32 off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + + ad = S1; + mov_l_ri(ad, off); + } + break; + case 1: /* abs.l */ + { + uae_u32 off = comp_get_ilong((m68k_pc_offset += 4) - 4); + + ad = S1; + mov_l_ri(ad, off); + } + break; + case 2: /* d16(pc) */ + { + uae_u32 address = (uae_u32)(start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + + ad = S1; + mov_l_ri(ad, address + PC16off); + } + break; + case 3: /* d8(pc,Xn) */ + return -1; + case 4: /* #imm */ + { + uae_u32 address = (uae_u32)(start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset); + + ad = S1; + mov_l_ri(ad, address); + m68k_pc_offset += sz2[size]; + } + break; + default: + return -1; + } + } + + switch (size) + { + case 0: /* long */ + fmovi_mrb(JITPTR temp_fp, val, clamp_bounds.l); + delay; + mov_l_rm(S2, JITPTR temp_fp); + writelong_clobber(ad, S2, S3); + break; + case 1: /* single precision */ + fmovs_mr(JITPTR temp_fp, val); + delay; + mov_l_rm(S2, JITPTR temp_fp); + writelong_clobber(ad, S2, S3); + break; + case 2: /* extended precision */ + fmov_ext_mr(JITPTR temp_fp, val); + delay; + mov_w_rm(S2, JITPTR temp_fp + 8); + writeword_clobber(ad, S2, S3); + add_l_ri(ad, 4); + mov_l_rm(S2, JITPTR temp_fp + 4); + writelong_clobber(ad, S2, S3); + add_l_ri(ad, 4); + mov_l_rm(S2, JITPTR temp_fp); + writelong_clobber(ad, S2, S3); + break; + case 3: /* packed decimal static */ + return -1; /* Packed */ + case 4: /* word */ + fmovi_mrb(JITPTR temp_fp, val, clamp_bounds.w); + delay; + mov_l_rm(S2, JITPTR temp_fp); + writeword_clobber(ad, S2, S3); + break; + case 5: /* double precision */ + fmov_mr(JITPTR temp_fp, val); + delay; + mov_l_rm(S2, JITPTR temp_fp + 4); + writelong_clobber(ad, S2, S3); + add_l_ri(ad, 4); + mov_l_rm(S2, JITPTR temp_fp); + writelong_clobber(ad, S2, S3); + break; + case 6: /* byte */ + fmovi_mrb(JITPTR temp_fp, val, clamp_bounds.b); + delay; + mov_l_rm(S2, JITPTR temp_fp); + writebyte(ad, S2, S3); + break; + default: + return -1; + } + return 0; +} + + +/* return -1 for failure, or register number for success */ +STATIC_INLINE int get_fp_ad(uae_u32 opcode) +{ + int mode; + int reg; + uae_s32 off; + + mode = (opcode >> 3) & 7; + reg = opcode & 7; + switch (mode) + { + case 0: /* Dn */ + case 1: /* An */ + return -1; + case 2: /* (An) */ + case 3: /* (An)+ */ + case 4: /* -(An) */ + mov_l_rr(S1, 8 + reg); + return S1; + case 5: /* d16(An) */ + off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_rr(S1, 8 + reg); + add_l_ri(S1, off); + return S1; + case 6: /* d8(An,Xn) */ + return -1; + break; + case 7: + switch (reg) + { + case 0: /* abs.w */ + off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(S1, off); + return S1; + case 1: /* abs.l */ + off = comp_get_ilong((m68k_pc_offset += 4) - 4); + mov_l_ri(S1, off); + return S1; + case 2: /* d16(pc) */ + off = (uae_s32)(start_pc + ((char *) comp_pc_p - (char *) start_pc_p) + m68k_pc_offset); + off += (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + mov_l_ri(S1, off); + return S1; + case 3: /* d8(pc,Xn) */ + return -1; + default: + return -1; + } + } + abort(); +} + + +/* return -1 for failure, or register number for success */ +void comp_fdbcc_opp (uae_u32 /* opcode */, uae_u16 /* extra */) +{ + if (jit_disable.fdbcc) + { + FAIL(1); + return; + } + FAIL(1); + return; +} + + +void comp_fscc_opp(uae_u32 opcode, uae_u16 extra) +{ + int reg; + + if (jit_disable.fscc) + { + FAIL(1); + return; + } + + if (extra & 0x20) + { /* only cc from 00 to 1f are defined */ + FAIL(1); + return; + } + if ((opcode & 0x38) != 0) + { /* We can only do to integer register */ + FAIL(1); + return; + } + + fflags_into_flags(S2); + reg = (opcode & 7); + + mov_l_ri(S1, 255); + mov_l_ri(S4, 0); + switch (extra & 0x0f) + { /* according to fpp.c, the 0x10 bit is ignored + */ + case 0: + break; /* set never */ + case 1: + mov_l_rr(S2, S4); + cmov_l_rr(S4, S1, 4); + cmov_l_rr(S4, S2, 10); + break; + case 2: + cmov_l_rr(S4, S1, 7); + break; + case 3: + cmov_l_rr(S4, S1, 3); + break; + case 4: + mov_l_rr(S2, S4); + cmov_l_rr(S4, S1, 2); + cmov_l_rr(S4, S2, 10); + break; + case 5: + mov_l_rr(S2, S4); + cmov_l_rr(S4, S1, 6); + cmov_l_rr(S4, S2, 10); + break; + case 6: + cmov_l_rr(S4, S1, 5); + break; + case 7: + cmov_l_rr(S4, S1, 11); + break; + case 8: + cmov_l_rr(S4, S1, 10); + break; + case 9: + cmov_l_rr(S4, S1, 4); + break; + case 10: + cmov_l_rr(S4, S1, 10); + cmov_l_rr(S4, S1, 7); + break; + case 11: + cmov_l_rr(S4, S1, 4); + cmov_l_rr(S4, S1, 3); + break; + case 12: + cmov_l_rr(S4, S1, 2); + break; + case 13: + cmov_l_rr(S4, S1, 6); + break; + case 14: + cmov_l_rr(S4, S1, 5); + cmov_l_rr(S4, S1, 10); + break; + case 15: + mov_l_rr(S4, S1); + break; + } + + if ((opcode & 0x38) == 0) + { + mov_b_rr(reg, S4); + } else + { + abort(); +#if 0 + int cc; + + if (get_fp_ad(opcode) < 0) + { + FAIL(1); + } else + { + put_byte(ad, cc ? 0xff : 0x00); + } +#endif + } +} + + +void comp_ftrapcc_opp (uae_u32 /* opcode */, uaecptr /* oldpc */) +{ + FAIL(1); + return; +} + + +void comp_fbcc_opp(uae_u32 opcode) +{ + uae_u32 start_68k_offset = m68k_pc_offset; + uae_u32 off; + uae_u32 v1; + uae_u32 v2; + int cc; + + // comp_pc_p is expected to be bound to 32-bit addresses + assert((uintptr) comp_pc_p <= 0xffffffffUL); + + if (jit_disable.fbcc) + { + FAIL(1); + return; + } + if (opcode & 0x20) + { /* only cc from 00 to 1f are defined */ + FAIL(1); + return; + } + if ((opcode & 0x40) == 0) + { + off = (uae_s32) (uae_s16) comp_get_iword((m68k_pc_offset += 2) - 2); + } else + { + off = comp_get_ilong((m68k_pc_offset += 4) - 4); + } + mov_l_ri(S1, JITPTR (comp_pc_p + off - (m68k_pc_offset - start_68k_offset))); + mov_l_ri(PC_P, JITPTR comp_pc_p); + + /* Now they are both constant. Might as well fold in m68k_pc_offset */ + add_l_ri(S1, m68k_pc_offset); + add_l_ri(PC_P, m68k_pc_offset); + m68k_pc_offset = 0; + + /* according to fpp.c, the 0x10 bit is ignored + (it handles exception handling, which we don't + do, anyway ;-) */ + cc = opcode & 0x0f; + v1 = get_const(PC_P); + v2 = get_const(S1); + fflags_into_flags(S2); + + switch (cc) + { + case 0: + break; /* jump never */ + case 1: + mov_l_rr(S2, PC_P); + cmov_l_rr(PC_P, S1, 4); + cmov_l_rr(PC_P, S2, 10); + break; + case 2: + register_branch(v1, v2, 7); + break; + case 3: + register_branch(v1, v2, 3); + break; + case 4: + mov_l_rr(S2, PC_P); + cmov_l_rr(PC_P, S1, 2); + cmov_l_rr(PC_P, S2, 10); + break; + case 5: + mov_l_rr(S2, PC_P); + cmov_l_rr(PC_P, S1, 6); + cmov_l_rr(PC_P, S2, 10); + break; + case 6: + register_branch(v1, v2, 5); + break; + case 7: + register_branch(v1, v2, 11); + break; + case 8: + register_branch(v1, v2, 10); + break; + case 9: + register_branch(v1, v2, 4); + break; + case 10: + cmov_l_rr(PC_P, S1, 10); + cmov_l_rr(PC_P, S1, 7); + break; + case 11: + cmov_l_rr(PC_P, S1, 4); + cmov_l_rr(PC_P, S1, 3); + break; + case 12: + register_branch(v1, v2, 2); + break; + case 13: + register_branch(v1, v2, 6); + break; + case 14: + cmov_l_rr(PC_P, S1, 5); + cmov_l_rr(PC_P, S1, 10); + break; + case 15: + mov_l_rr(PC_P, S1); + break; + } +} + + + /* Floating point conditions + The "NotANumber" part could be problematic; Howver, when NaN is + encountered, the ftst instruction sets bot N and Z to 1 on the x87, + so quite often things just fall into place. This is probably not + accurate wrt the 68k FPU, but it is *as* accurate as this was before. + However, some more thought should go into fixing this stuff up so + it accurately emulates the 68k FPU. +>==> 13) & 0x7) + { + case 1: /* illegal */ + break; + + case 3: /* FMOVE Fpn, */ + /* 2nd most common */ + if (jit_disable.fmove) + { + FAIL(1); + return; + } + + if (put_fp_value((extra >> 7) & 7, opcode, extra) < 0) + { + FAIL(1); + return; + } + return; + + case 6: /* FMOVEM , */ + case 7: /* FMOVEM , */ + if (jit_disable.fmovem) + { + FAIL(1); + return; + } + + { + int ad; + uae_u32 list = 0; + int incr = 0; + + if (extra & 0x2000) + { + /* FMOVEM FPP->memory */ + switch ((extra >> 11) & 3) + { /* Get out early if failure */ + case 0: /* static pred */ + case 2: /* static postinc */ + break; + case 1: /* dynamic pred */ + case 3: /* dynamic postinc */ + default: + FAIL(1); + return; + } + if ((ad = get_fp_ad(opcode)) < 0) + { + FAIL(1); + return; + } + switch ((extra >> 11) & 3) + { + case 0: /* static pred */ + list = extra & 0xff; + incr = -1; + break; + case 2: /* static postinc */ + list = extra & 0xff; + incr = 1; + break; + case 1: /* dynamic pred */ + case 3: /* dynamic postinc */ + abort(); + } + if (incr < 0) + { /* Predecrement */ + for (reg = 7; reg >= 0; reg--) + { + if (list & 0x80) + { + fmov_ext_mr(JITPTR temp_fp, reg); + delay; + sub_l_ri(ad, 4); + mov_l_rm(S2, JITPTR temp_fp); + writelong_clobber(ad, S2, S3); + sub_l_ri(ad, 4); + mov_l_rm(S2, JITPTR temp_fp + 4); + writelong_clobber(ad, S2, S3); + sub_l_ri(ad, 4); + mov_w_rm(S2, JITPTR temp_fp + 8); + writeword_clobber(ad, S2, S3); + } + list <<= 1; + } + } else + { /* Postincrement */ + for (reg = 0; reg < 8; reg++) + { + if (list & 0x80) + { + fmov_ext_mr(JITPTR temp_fp, reg); + delay; + mov_w_rm(S2, JITPTR temp_fp + 8); + writeword_clobber(ad, S2, S3); + add_l_ri(ad, 4); + mov_l_rm(S2, JITPTR temp_fp + 4); + writelong_clobber(ad, S2, S3); + add_l_ri(ad, 4); + mov_l_rm(S2, JITPTR temp_fp); + writelong_clobber(ad, S2, S3); + add_l_ri(ad, 4); + } + list <<= 1; + } + } + if ((opcode & 0x38) == 0x18) + mov_l_rr((opcode & 7) + 8, ad); + if ((opcode & 0x38) == 0x20) + mov_l_rr((opcode & 7) + 8, ad); + } else + { + /* FMOVEM memory->FPP */ + + int ad; + + switch ((extra >> 11) & 3) + { /* Get out early if failure */ + case 0: /* static pred */ + case 2: /* static postinc */ + break; + case 1: /* dynamic pred */ + case 3: /* dynamic postinc */ + default: + FAIL(1); + return; + } + ad = get_fp_ad(opcode); + if (ad < 0) + { + D(bug("no ad\n")); + FAIL(1); + return; + } + switch ((extra >> 11) & 3) + { + case 0: /* static pred */ + list = extra & 0xff; + incr = -1; + break; + case 2: /* static postinc */ + list = extra & 0xff; + incr = 1; + break; + case 1: /* dynamic pred */ + case 3: /* dynamic postinc */ + abort(); + } + + if (incr < 0) + { + // not reached + for (reg = 7; reg >= 0; reg--) + { + if (list & 0x80) + { + sub_l_ri(ad, 4); + readlong(ad, S2, S3); + mov_l_mr(JITPTR (temp_fp), S2); + sub_l_ri(ad, 4); + readlong(ad, S2, S3); + mov_l_mr(JITPTR (temp_fp) + 4, S2); + sub_l_ri(ad, 4); + readword(ad, S2, S3); + mov_w_mr((JITPTR temp_fp) + 8, S2); + delay2; + fmov_ext_rm(reg, JITPTR (temp_fp)); + } + list <<= 1; + } + } else + { + for (reg = 0; reg < 8; reg++) + { + if (list & 0x80) + { + readword(ad, S2, S3); + mov_w_mr((JITPTR temp_fp) + 8, S2); + add_l_ri(ad, 4); + readlong(ad, S2, S3); + mov_l_mr(JITPTR (temp_fp) + 4, S2); + add_l_ri(ad, 4); + readlong(ad, S2, S3); + mov_l_mr(JITPTR(temp_fp), S2); + add_l_ri(ad, 4); + delay2; + fmov_ext_rm(reg, JITPTR (temp_fp)); + } + list <<= 1; + } + } + if ((opcode & 0x38) == 0x18) + mov_l_rr((opcode & 7) + 8, ad); + if ((opcode & 0x38) == 0x20) + mov_l_rr((opcode & 7) + 8, ad); + } + } + return; + + case 4: /* FMOVEM , */ + case 5: /* FMOVEM , */ + if (jit_disable.fmovec) + { + FAIL(1); + return; + } + + /* rare */ + if ((opcode & 0x30) == 0) + { + /* = Dn or An */ + if (extra & 0x2000) + { + if (extra & 0x1000) + { +#if HANDLE_FPCR + mov_l_rm(opcode & 15, (uintptr) & fpu.fpcr.rounding_mode); + or_l_rm(opcode & 15, (uintptr) & fpu.fpcr.rounding_precision); +#else + FAIL(1); + return; +#endif + } + if (extra & 0x0800) + { + FAIL(1); + return; + } + if (extra & 0x0400) + { + /* FPIAR: fixme; we cannot correctly return the address from compiled code */ +#ifdef UAE + mov_l_rm(opcode & 15, JITPTR ®s.fpiar); +#else + mov_l_rm(opcode & 15, JITPTR &fpu.instruction_address); +#endif + return; + } + } else + { + // gb-- moved here so that we may FAIL() without generating any code + if (extra & 0x0800) + { + // set_fpsr(m68k_dreg (regs, opcode & 15)); + FAIL(1); + return; + } + if (extra & 0x1000) + { +#if HANDLE_FPCR +#if defined(FPU_USE_X86_ROUNDING_MODE) && defined(FPU_USE_X86_ROUNDING_PRECISION) + FAIL(1); + return; +#endif + mov_l_rr(S1, opcode & 15); + mov_l_rr(S2, opcode & 15); + and_l_ri(S1, FPCR_ROUNDING_PRECISION); + and_l_ri(S2, FPCR_ROUNDING_MODE); + mov_l_mr((uintptr) & fpu.fpcr.rounding_precision, S1); + mov_l_mr((uintptr) & fpu.fpcr.rounding_mode, S2); +#else + FAIL(1); + return; +#endif + } + if (extra & 0x0400) + { + /* FPIAR: does that make sense at all? */ +#ifdef UAE + mov_l_mr(JITPTR ®s.fpiar, opcode & 15); +#else + mov_l_mr(JITPTR &fpu.instruction_address, opcode & 15); +#endif + } + return; + } + } else if ((opcode & 0x3f) == 0x3c) + { + /* = #imm */ + if ((extra & 0x2000) == 0) + { + // gb-- moved here so that we may FAIL() without generating any code + if (extra & 0x0800) + { + FAIL(1); + return; + } + if (extra & 0x1000) + { + comp_get_ilong((m68k_pc_offset += 4) - 4); +#if HANDLE_FPCR +#if defined(FPU_USE_X86_ROUNDING_MODE) && defined(FPU_USE_X86_ROUNDING_PRECISION) + FAIL(1); + return; +#endif + // mov_l_mi((uintptr)®s.fpcr,val); + mov_l_ri(S1, val); + mov_l_ri(S2, val); + and_l_ri(S1, FPCR_ROUNDING_PRECISION); + and_l_ri(S2, FPCR_ROUNDING_MODE); + mov_l_mr((uintptr) & fpu.fpcr.rounding_precision, S1); + mov_l_mr((uintptr) & fpu.fpcr.rounding_mode, S2); +#else + FAIL(1); + return; +#endif + } + if (extra & 0x0400) + { + uae_u32 val = comp_get_ilong((m68k_pc_offset += 4) - 4); +#ifdef UAE + mov_l_mi(JITPTR ®s.fpiar, val); +#else + mov_l_mi(JITPTR &fpu.instruction_address, val); +#endif + } + return; + } + FAIL(1); + return; + } else if (extra & 0x2000) + { + FAIL(1); + return; + } else + { + FAIL(1); + return; + } + FAIL(1); + return; + + case 0: + case 2: /* Extremely common */ + reg = (extra >> 7) & 7; + if ((extra & 0xfc00) == 0x5c00) + { + if (jit_disable.fmovecr) + { + FAIL(1); + return; + } + + switch (extra & 0x7f) + { + case 0x00: + fmov_pi(reg); + break; + case 0x0b: + fmov_log10_2(reg); + break; + case 0x0c: +#if defined(USE_LONG_DOUBLE) || defined(USE_QUAD_DOUBLE) + fmov_ext_rm(reg, (uintptr) & const_e); +#else + fmov_rm(reg, (uintptr) & const_e); +#endif + break; + case 0x0d: + fmov_log2_e(reg); + break; + case 0x0e: +#if defined(USE_LONG_DOUBLE) || defined(USE_QUAD_DOUBLE) + fmov_ext_rm(reg, (uintptr) & const_log10_e); +#else + fmov_rm(reg, (uintptr) & const_log10_e); +#endif + break; + case 0x0f: + fmov_0(reg); + break; + case 0x30: + fmov_loge_2(reg); + break; + case 0x31: +#if defined(USE_LONG_DOUBLE) || defined(USE_QUAD_DOUBLE) + fmov_ext_rm(reg, (uintptr) & const_loge_10); +#else + fmov_rm(reg, (uintptr) & const_loge_10); +#endif + break; + case 0x32: + fmov_1(reg); + break; + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3a: + case 0x3b: +#if defined(USE_LONG_DOUBLE) || defined(USE_QUAD_DOUBLE) + case 0x3c: + case 0x3d: + case 0x3e: + case 0x3f: + fmov_ext_rm(reg, (uintptr) (power10 + (extra & 0x7f) - 0x32)); +#else + fmov_rm(reg, (uintptr) (power10 + (extra & 0x7f) - 0x32)); +#endif + break; + default: + /* This is not valid, so we fail */ + FAIL(1); + return; + } + return; + } + + switch (extra & 0x7f) + { + case 0x00: /* FMOVE */ + case 0x40: /* FSMOVE: Explicit rounding. This is just a quick fix. Same + * for all other cases that have three choices */ + case 0x44: /* FDMOVE */ + if (jit_disable.fmove) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fmov_rr(reg, src); + MAKE_FPSR(src); + break; + case 0x01: /* FINT */ + if (jit_disable.fint) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x02: /* FSINH */ + if (jit_disable.fsinh) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x03: /* FINTRZ */ + if (jit_disable.fintrz) + { + FAIL(1); + return; + } +#ifdef USE_X86_FPUCW + /* If we have control over the CW, we can do this */ + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + mov_l_ri(S1, 16); /* Switch to "round to zero" mode */ + fldcw_m_indexed(S1, JITPTR x86_fpucw); + + frndint_rr(reg, src); + + /* restore control word */ + mov_l_rm(S1, JITPTR ®s.fpcr); + and_l_ri(S1, 0x000000f0); + fldcw_m_indexed(S1, JITPTR x86_fpucw); + + MAKE_FPSR(reg); + break; +#endif + FAIL(1); + return; + break; + case 0x04: /* FSQRT */ + case 0x41: /* FSSQRT */ + case 0x45: /* FDSQRT */ + if (jit_disable.fsqrt) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fsqrt_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x06: /* FLOGNP1 */ + if (jit_disable.flognp1) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x08: /* FETOXM1 */ + if (jit_disable.fetoxm1) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x09: /* FTANH */ + if (jit_disable.ftanh) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x0a: /* FATAN */ + if (jit_disable.fatan) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x0c: /* FASIN */ + if (jit_disable.fasin) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x0d: /* FATANH */ + if (jit_disable.fatanh) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x0e: /* FSIN */ + if (jit_disable.fsin) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fsin_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x0f: /* FTAN */ + if (jit_disable.ftan) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x10: /* FETOX */ + if (jit_disable.fetox) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fetox_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x11: /* FTWOTOX */ + if (jit_disable.ftwotox) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + ftwotox_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x12: /* FTENTOX */ + if (jit_disable.ftentox) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x14: /* FLOGN */ + if (jit_disable.flogn) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x15: /* FLOG10 */ + if (jit_disable.flog10) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x16: /* FLOG2 */ + if (jit_disable.flog2) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + flog2_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x18: /* FABS */ + case 0x58: /* FSABS */ + case 0x5c: /* FDABS */ + if (jit_disable.fabs) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fabs_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x19: /* FCOSH */ + if (jit_disable.fcosh) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x1a: /* FNEG */ + case 0x5a: /* FSNEG */ + case 0x5e: /* FDNEG */ + if (jit_disable.fneg) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fneg_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x1c: /* FACOS */ + if (jit_disable.facos) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x1d: /* FCOS */ + if (jit_disable.fcos) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fcos_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x1e: /* FGETEXP */ + if (jit_disable.fgetexp) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x1f: /* FGETMAN */ + if (jit_disable.fgetman) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x20: /* FDIV */ + case 0x60: /* FSDIV */ + case 0x64: /* FDDIV */ + if (jit_disable.fdiv) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fdiv_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x21: /* FMOD */ + if (jit_disable.fmod) + { + FAIL(1); + return; + } + + // FIXME: the quotient byte must be computed + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + frem_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x22: /* FADD */ + case 0x62: /* FSADD */ + case 0x66: /* FDADD */ + if (jit_disable.fadd) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fadd_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x23: /* FMUL */ + case 0x63: /* FSMUL */ + case 0x67: /* FDMUL */ + if (jit_disable.fmul) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fmul_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x24: /* FSGLDIV */ + if (jit_disable.fsgldiv) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fdiv_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x25: /* FREM */ + if (jit_disable.frem) + { + FAIL(1); + return; + } + // gb-- disabled because the quotient byte must be computed + // otherwise, free rotation in ClarisWorks doesn't work. + FAIL(1); + return; + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + frem1_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x26: /* FSCALE */ + if (jit_disable.fscale) + { + FAIL(1); + return; + } + + FAIL(1); + return; + break; + case 0x27: /* FSGLMUL */ + if (jit_disable.fsglmul) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fmul_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x28: /* FSUB */ + case 0x68: /* FSSUB */ + case 0x6c: /* FDSUB */ + if (jit_disable.fsub) + { + FAIL(1); + return; + } + + dont_care_fflags(); + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fsub_rr(reg, src); + MAKE_FPSR(reg); + break; + case 0x30: /* FSINCOS */ + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + if (jit_disable.fsincos) + { + FAIL(1); + return; + } + + FAIL(1); + return; + dont_care_fflags(); + break; + case 0x38: /* FCMP */ + if (jit_disable.fcmp) + { + FAIL(1); + return; + } + + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fmov_rr(FP_RESULT, reg); + fsub_rr(FP_RESULT, src); /* Right way? */ + break; + case 0x3a: /* FTST */ + if (jit_disable.ftst) + { + FAIL(1); + return; + } + + src = get_fp_value(opcode, extra); + if (src < 0) + { + FAIL(1); /* Illegal instruction */ + return; + } + fmov_rr(FP_RESULT, src); + break; + default: + FAIL(1); + return; + break; + } + return; + } + FAIL(1); +} + +#endif \ No newline at end of file diff --git a/src/jit/compemu_midfunc_x86.cpp b/src/jit/x86/compemu_midfunc_x86.cpp similarity index 100% rename from src/jit/compemu_midfunc_x86.cpp rename to src/jit/x86/compemu_midfunc_x86.cpp diff --git a/src/jit/compemu_midfunc_x86.h b/src/jit/x86/compemu_midfunc_x86.h similarity index 100% rename from src/jit/compemu_midfunc_x86.h rename to src/jit/x86/compemu_midfunc_x86.h diff --git a/src/jit/x86/compemu_support_x86.cpp b/src/jit/x86/compemu_support_x86.cpp new file mode 100644 index 000000000..9e14a075b --- /dev/null +++ b/src/jit/x86/compemu_support_x86.cpp @@ -0,0 +1,5466 @@ +/* + * compiler/compemu_support.cpp - Core dynamic translation engine + * + * Copyright (c) 2001-2009 Milan Jurik of ARAnyM dev team (see AUTHORS) + * + * Inspired by Christian Bauer's Basilisk II + * + * This file is part of the ARAnyM project which builds a new and powerful + * TOS/FreeMiNT compatible virtual machine running on almost any hardware. + * + * JIT compiler m68k -> IA-32 and AMD64 / ARM + * + * Original 68040 JIT compiler for UAE, copyright 2000-2002 Bernd Meyer + * Adaptation for Basilisk II and improvements, copyright 2000-2004 Gwenole Beauchesne + * Portions related to CPU detection come from linux/arch/i386/kernel/setup.c + * + * ARAnyM is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * ARAnyM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ARAnyM; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "sysdeps.h" + +#ifdef UAE + +#define writemem_special writemem +#define readmem_special readmem + +#else +#if !FIXED_ADDRESSING +#error "Only Fixed Addressing is supported with the JIT Compiler" +#endif + +#if defined(X86_ASSEMBLY) && !SAHF_SETO_PROFITABLE +#error "Only [LS]AHF scheme to [gs]et flags is supported with the JIT Compiler" +#endif + +/* NOTE: support for AMD64 assumes translation cache and other code + * buffers are allocated into a 32-bit address space because (i) B2/JIT + * code is not 64-bit clean and (ii) it's faster to resolve branches + * that way. + */ +#if !defined(CPU_i386) && !defined(CPU_x86_64) && !defined(CPU_arm) && !defined(CPU_AARCH64) +#error "Only IA-32, X86-64, ARM and ARM64 targets are supported with the JIT Compiler" +#endif +#endif + +#define USE_MATCH 0 + +/* kludge for Brian, so he can compile under MSVC++ */ +#define USE_NORMAL_CALLING_CONVENTION 0 + +#include "sysconfig.h" +#include "sysdeps.h" + +#ifdef JIT + +#ifdef UAE +#define bug write_log +#include "options.h" +#include "events.h" +#include "uae/memory.h" +#include "custom.h" +#else +#include "cpu_emulation.h" +#include "main.h" +#include "vm_alloc.h" + +#include "m68k.h" +#include "memory-uae.h" +#include "readcpu.h" +#endif +#include "newcpu.h" +#include "comptbl_x86.h" +#ifdef UAE +#include "compemu_x86.h" +#ifdef FSUAE +#include "codegen_udis86.h" +#endif +#else +#include "compiler/compemu.h" +#include "fpu/fpu.h" +#include "fpu/flags.h" +#include "parameters.h" +static void build_comp(void); +#endif +#ifndef UAE +#include "verify.h" +#endif + +#ifdef UAE +#ifdef FSUAE +#include "uae/fs.h" +#endif +#include "uae/log.h" + +#if defined(__pie__) || defined (__PIE__) +#error Position-independent code (PIE) cannot be used with JIT +#endif + +#include "uae/vm.h" +#define VM_PAGE_READ UAE_VM_READ +#define VM_PAGE_WRITE UAE_VM_WRITE +#define VM_PAGE_EXECUTE UAE_VM_EXECUTE +#define VM_MAP_FAILED UAE_VM_ALLOC_FAILED +#define VM_MAP_DEFAULT 1 +#define VM_MAP_32BIT 1 +#define vm_protect(address, size, protect) uae_vm_protect(address, size, protect) +#define vm_release(address, size) uae_vm_free(address, size) + +static inline void *vm_acquire(uae_u32 size, int options = VM_MAP_DEFAULT) +{ + assert(options == (VM_MAP_DEFAULT | VM_MAP_32BIT)); + return uae_vm_alloc(size, UAE_VM_32BIT, UAE_VM_READ_WRITE); +} + +#define UNUSED(x) +#include "uae.h" +#include "uae/log.h" +#define jit_log(format, ...) \ + write_log("JIT: " format "\n", ##__VA_ARGS__); +#define jit_log2(format, ...) + +#define MEMBaseDiff uae_p32(NATMEM_OFFSET) + +#ifdef NATMEM_OFFSET +#define FIXED_ADDRESSING 1 +#endif + +// %%% BRIAN KING WAS HERE %%% +extern bool canbang; + +#include "../compemu_prefs.cpp" + +#define uint32 uae_u32 +#define uint8 uae_u8 + +static inline int distrust_check(int value) +{ +#ifdef JIT_ALWAYS_DISTRUST + return 1; +#else + int distrust = value; +#ifdef FSUAE + switch (value) { + case 0: distrust = 0; break; + case 1: distrust = 1; break; + case 2: distrust = ((start_pc & 0xF80000) == 0xF80000); break; + case 3: distrust = !have_done_picasso; break; + default: abort(); + } +#endif + return distrust; +#endif +} + +static inline int distrust_byte(void) +{ + return distrust_check(currprefs.comptrustbyte); +} + +static inline int distrust_word(void) +{ + return distrust_check(currprefs.comptrustword); +} + +static inline int distrust_long(void) +{ + return distrust_check(currprefs.comptrustlong); +} + +static inline int distrust_addr(void) +{ + return distrust_check(currprefs.comptrustnaddr); +} + +#else +#define DEBUG 0 +#include "debug.h" + +#define NATMEM_OFFSET MEMBaseDiff +#define canbang 1 +#define op_illg op_illg_1 + +#ifdef WINUAE_ARANYM +void jit_abort(const char *format, ...) +{ + va_list args; + va_start(args, format); + ndebug::pdbvprintf(format, args); + va_end(args); + abort(); +} +#endif + +#if DEBUG +#define PROFILE_COMPILE_TIME 1 +#define PROFILE_UNTRANSLATED_INSNS 1 +#endif +#endif + +# include +# include +# include +# include + +#if defined(CPU_x86_64) && 0 +#define RECORD_REGISTER_USAGE 1 +#endif + +#ifdef JIT_DEBUG +#undef abort +#define abort() do { \ + fprintf(stderr, "Abort in file %s at line %d\n", __FILE__, __LINE__); \ + compiler_dumpstate(); \ + exit(EXIT_FAILURE); \ +} while (0) +#endif + +#ifdef RECORD_REGISTER_USAGE +static uint64 reg_count[16]; +static uint64 reg_count_local[16]; + +static int reg_count_compare(const void *ap, const void *bp) +{ + const int a = *((int *)ap); + const int b = *((int *)bp); + return reg_count[b] - reg_count[a]; +} +#endif + +#ifdef PROFILE_COMPILE_TIME +#include +static uae_u32 compile_count = 0; +static clock_t compile_time = 0; +static clock_t emul_start_time = 0; +static clock_t emul_end_time = 0; +#endif + +#ifdef PROFILE_UNTRANSLATED_INSNS +static const int untranslated_top_ten = 50; +static uae_u32 raw_cputbl_count[65536] = { 0, }; +static uae_u16 opcode_nums[65536]; + + +static int __cdecl untranslated_compfn(const void *e1, const void *e2) +{ + int v1 = *(const uae_u16*)e1; + int v2 = *(const uae_u16*)e2; + return (int)raw_cputbl_count[v2] - (int)raw_cputbl_count[v1]; +} +#endif + +static compop_func *compfunctbl[65536]; +static compop_func *nfcompfunctbl[65536]; +#ifdef NOFLAGS_SUPPORT_GENCOMP +static cpuop_func *nfcpufunctbl[65536]; +#endif +uae_u8* comp_pc_p; + +#ifdef UAE +/* defined in uae.h */ +#else +// External variables +#endif + +// gb-- Extra data for Basilisk II/JIT +#ifdef JIT_DEBUG +#define JITDebug bx_options.jit.jitdebug // Enable runtime disassemblers through mon? +#else +#define JITDebug false // Don't use JIT debug mode at all +#endif +#if USE_INLINING +#ifdef UAE +#define follow_const_jumps (currprefs.comp_constjump != 0) +#else +static bool follow_const_jumps = true; // Flag: translation through constant jumps +#endif +#else +const bool follow_const_jumps = false; +#endif + +static uae_u32 cache_size = 0; // Size of total cache allocated for compiled blocks +static uae_u32 current_cache_size = 0; // Cache grows upwards: how much has been consumed already +// Flag: compile FPU instructions ? +#ifdef UAE +#ifdef USE_JIT_FPU +#define avoid_fpu (!currprefs.compfpu) +#define lazy_flush (!currprefs.comp_hardflush) +#else +#define avoid_fpu (true) +#define lazy_flush (true) +#endif +#else +#ifdef USE_JIT_FPU +#define avoid_fpu (!bx_options.jit.jitfpu) +#else +#define avoid_fpu (true) +#endif +#endif +static bool have_cmov = false; // target has CMOV instructions ? +static bool have_rat_stall = true; // target has partial register stalls ? +const bool tune_alignment = true; // Tune code alignments for running CPU ? +const bool tune_nop_fillers = true; // Tune no-op fillers for architecture +static bool setzflg_uses_bsf = false; // setzflg virtual instruction can use native BSF instruction correctly? +static int align_loops = 32; // Align the start of loops +static int align_jumps = 32; // Align the start of jumps +static int optcount[10] = { +#ifdef UAE + 4, // How often a block has to be executed before it is translated +#else + 10, // How often a block has to be executed before it is translated +#endif + 0, // How often to use naive translation + 0, 0, 0, 0, + -1, -1, -1, -1 +}; + +#ifdef UAE +op_properties prop[65536]; +#else +static op_properties prop[65536]; + +static inline int end_block(uae_u32 opcode) +{ + return (prop[opcode].cflow & fl_end_block); +} +#endif + +static inline bool is_const_jump(uae_u32 opcode) +{ + return (prop[opcode].cflow == fl_const_jump); +} + +#if 0 +static inline bool may_trap(uae_u32 opcode) +{ + return (prop[opcode].cflow & fl_trap); +} +#endif + +static inline unsigned int cft_map (unsigned int f) +{ +#ifdef UAE +#if !defined(HAVE_GET_WORD_UNSWAPPED) + return f; +#else + return do_byteswap_16(f); +#endif +#else +#if !defined(HAVE_GET_WORD_UNSWAPPED) || defined(FULLMMU) + return f; +#else + return ((f >> 8) & 255) | ((f & 255) << 8); +#endif +#endif +} + +uae_u8* start_pc_p; +uae_u32 start_pc; +uae_u32 current_block_pc_p; +static uintptr current_block_start_target; +uae_u32 needed_flags; +static uintptr next_pc_p; +static uintptr taken_pc_p; +static int branch_cc; +static int redo_current_block; + +#ifdef UAE +int segvcount=0; +#endif +static uae_u8* current_compile_p=NULL; +static uae_u8* max_compile_start; +static uae_u8* compiled_code=NULL; +static uae_s32 reg_alloc_run; +const int POPALLSPACE_SIZE = 2048; /* That should be enough space */ +static uae_u8 *popallspace=NULL; + +void* pushall_call_handler=NULL; +static void* popall_do_nothing=NULL; +static void* popall_exec_nostats=NULL; +static void* popall_execute_normal=NULL; +static void* popall_cache_miss=NULL; +static void* popall_recompile_block=NULL; +static void* popall_check_checksum=NULL; + +/* The 68k only ever executes from even addresses. So right now, we + * waste half the entries in this array + * UPDATE: We now use those entries to store the start of the linked + * lists that we maintain for each hash result. + */ +static cacheline cache_tags[TAGSIZE]; +static int cache_enabled=0; +static blockinfo* hold_bi[MAX_HOLD_BI]; +static blockinfo* active; +static blockinfo* dormant; + +#ifdef NOFLAGS_SUPPORT_GENCOMP +/* 68040 */ +extern const struct cputbl op_smalltbl_0[]; +#endif +extern const struct comptbl op_smalltbl_0_comp_nf[]; +extern const struct comptbl op_smalltbl_0_comp_ff[]; + +static void flush_icache_hard(int); +static void flush_icache_lazy(int); +static void flush_icache_none(int); +//void (*flush_icache)(int) = flush_icache_none; + +static bigstate live; +static smallstate empty_ss; +static smallstate default_ss; +static int optlev; + +static int writereg(int r, int size); +static void unlock2(int r); +static void setlock(int r); +static int readreg_specific(int r, int size, int spec); +static int writereg_specific(int r, int size, int spec); + +static void inline write_jmp_target(uae_u32 *jmpaddr, cpuop_func* a); + +uae_u32 m68k_pc_offset; + +/* Some arithmetic operations can be optimized away if the operands + * are known to be constant. But that's only a good idea when the + * side effects they would have on the flags are not important. This + * variable indicates whether we need the side effects or not + */ +static uae_u32 needflags=0; + +/* Flag handling is complicated. + * + * x86 instructions create flags, which quite often are exactly what we + * want. So at times, the "68k" flags are actually in the x86 flags. + * + * Then again, sometimes we do x86 instructions that clobber the x86 + * flags, but don't represent a corresponding m68k instruction. In that + * case, we have to save them. + * + * We used to save them to the stack, but now store them back directly + * into the regflags.cznv of the traditional emulation. Thus some odd + * names. + * + * So flags can be in either of two places (used to be three; boy were + * things complicated back then!); And either place can contain either + * valid flags or invalid trash (and on the stack, there was also the + * option of "nothing at all", now gone). A couple of variables keep + * track of the respective states. + * + * To make things worse, we might or might not be interested in the flags. + * by default, we are, but a call to dont_care_flags can change that + * until the next call to live_flags. If we are not, pretty much whatever + * is in the register and/or the native flags is seen as valid. + */ + +static inline blockinfo* get_blockinfo(uae_u32 cl) +{ + return cache_tags[cl+1].bi; +} + +static inline blockinfo* get_blockinfo_addr(void* addr) +{ + blockinfo* bi=get_blockinfo(cacheline(addr)); + + while (bi) { + if (bi->pc_p==addr) + return bi; + bi=bi->next_same_cl; + } + return NULL; +} + +#ifdef WINUAE_ARANYM +/******************************************************************* + * Disassembler support * + *******************************************************************/ + +#define TARGET_M68K 0 +#define TARGET_POWERPC 1 +#define TARGET_X86 2 +#define TARGET_X86_64 3 +#define TARGET_ARM 4 +#if defined(CPU_i386) +#define TARGET_NATIVE TARGET_X86 +#endif +#if defined(CPU_powerpc) +#define TARGET_NATIVE TARGET_POWERPC +#endif +#if defined(CPU_x86_64) +#define TARGET_NATIVE TARGET_X86_64 +#endif +#if defined(CPU_arm) +#define TARGET_NATIVE TARGET_ARM +#endif +#include "disasm-glue.h" + +bool disasm_this_inst; + +#if defined(JIT_DEBUG) || (defined(HAVE_DISASM_NATIVE) && defined(HAVE_DISASM_M68K)) +static void disasm_block(int disasm_target, const uint8 *start, size_t length) +{ + UNUSED(start); + UNUSED(length); + switch (disasm_target) + { + case TARGET_M68K: +#if defined(HAVE_DISASM_M68K) + { + char buf[256]; + + disasm_info.memory_vma = ((memptr)((uintptr_t)(start) - MEMBaseDiff)); + while (length > 0) + { + int isize = m68k_disasm_to_buf(&disasm_info, buf, 1); + bug("%s", buf); + if (isize < 0) + break; + if ((uintptr)isize > length) + break; + length -= isize; + } + } +#endif + break; + case TARGET_X86: + case TARGET_X86_64: +#if defined(HAVE_DISASM_X86) + { + const uint8 *end = start + length; + char buf[256]; + + while (start < end) + { + start = x86_disasm(start, buf, 1); + bug("%s", buf); + } + } +#endif + break; + case TARGET_ARM: +#if defined(HAVE_DISASM_ARM) + { + const uint8 *end = start + length; + char buf[256]; + + while (start < end) + { + start = arm_disasm(start, buf, 1); + bug("%s", buf); + } + } +#endif + break; + } +} + +static inline void disasm_native_block(const uint8 *start, size_t length) +{ + disasm_block(TARGET_NATIVE, start, length); +} + +static inline void disasm_m68k_block(const uint8 *start, size_t length) +{ + disasm_block(TARGET_M68K, start, length); +} +#endif +#endif /* WINUAE_ARANYM */ + + +/******************************************************************* + * All sorts of list related functions for all of the lists * + *******************************************************************/ + +static inline void remove_from_cl_list(blockinfo* bi) +{ + uae_u32 cl=cacheline(bi->pc_p); + + if (bi->prev_same_cl_p) + *(bi->prev_same_cl_p)=bi->next_same_cl; + if (bi->next_same_cl) + bi->next_same_cl->prev_same_cl_p=bi->prev_same_cl_p; + if (cache_tags[cl+1].bi) + cache_tags[cl].handler=cache_tags[cl+1].bi->handler_to_use; + else + cache_tags[cl].handler=(cpuop_func*)popall_execute_normal; +} + +static inline void remove_from_list(blockinfo* bi) +{ + if (bi->prev_p) + *(bi->prev_p)=bi->next; + if (bi->next) + bi->next->prev_p=bi->prev_p; +} + +#if 0 +static inline void remove_from_lists(blockinfo* bi) +{ + remove_from_list(bi); + remove_from_cl_list(bi); +} +#endif + +static inline void add_to_cl_list(blockinfo* bi) +{ + uae_u32 cl=cacheline(bi->pc_p); + + if (cache_tags[cl+1].bi) + cache_tags[cl+1].bi->prev_same_cl_p=&(bi->next_same_cl); + bi->next_same_cl=cache_tags[cl+1].bi; + + cache_tags[cl+1].bi=bi; + bi->prev_same_cl_p=&(cache_tags[cl+1].bi); + + cache_tags[cl].handler=bi->handler_to_use; +} + +static inline void raise_in_cl_list(blockinfo* bi) +{ + remove_from_cl_list(bi); + add_to_cl_list(bi); +} + +static inline void add_to_active(blockinfo* bi) +{ + if (active) + active->prev_p=&(bi->next); + bi->next=active; + + active=bi; + bi->prev_p=&active; +} + +static inline void add_to_dormant(blockinfo* bi) +{ + if (dormant) + dormant->prev_p=&(bi->next); + bi->next=dormant; + + dormant=bi; + bi->prev_p=&dormant; +} + +static inline void remove_dep(dependency* d) +{ + if (d->prev_p) + *(d->prev_p)=d->next; + if (d->next) + d->next->prev_p=d->prev_p; + d->prev_p=NULL; + d->next=NULL; +} + +/* This block's code is about to be thrown away, so it no longer + depends on anything else */ +static inline void remove_deps(blockinfo* bi) +{ + remove_dep(&(bi->dep[0])); + remove_dep(&(bi->dep[1])); +} + +static inline void adjust_jmpdep(dependency* d, cpuop_func* a) +{ + write_jmp_target(d->jmp_off, a); +} + +/******************************************************************** + * Soft flush handling support functions * + ********************************************************************/ + +static inline void set_dhtu(blockinfo* bi, cpuop_func *dh) +{ + jit_log2("bi is %p",bi); + if (dh!=bi->direct_handler_to_use) { + dependency* x=bi->deplist; + jit_log2("bi->deplist=%p",bi->deplist); + while (x) { + jit_log2("x is %p",x); + jit_log2("x->next is %p",x->next); + jit_log2("x->prev_p is %p",x->prev_p); + + if (x->jmp_off) { + adjust_jmpdep(x,dh); + } + x=x->next; + } + bi->direct_handler_to_use=dh; + } +} + +static inline void invalidate_block(blockinfo* bi) +{ + int i; + + bi->optlevel=0; + bi->count=optcount[0]-1; + bi->handler=NULL; + bi->handler_to_use=(cpuop_func*)popall_execute_normal; + bi->direct_handler=NULL; + set_dhtu(bi,bi->direct_pen); + bi->needed_flags=0xff; + bi->status=BI_INVALID; + for (i=0;i<2;i++) { + bi->dep[i].jmp_off=NULL; + bi->dep[i].target=NULL; + } + remove_deps(bi); +} + +static inline void create_jmpdep(blockinfo* bi, int i, uae_u32* jmpaddr, uae_u32 target) +{ + blockinfo* tbi=get_blockinfo_addr((void*)(uintptr)target); + + Dif(!tbi) { + jit_abort("Could not create jmpdep!"); + } + bi->dep[i].jmp_off=jmpaddr; + bi->dep[i].source=bi; + bi->dep[i].target=tbi; + bi->dep[i].next=tbi->deplist; + if (bi->dep[i].next) + bi->dep[i].next->prev_p=&(bi->dep[i].next); + bi->dep[i].prev_p=&(tbi->deplist); + tbi->deplist=&(bi->dep[i]); +} + +static inline void block_need_recompile(blockinfo * bi) +{ + uae_u32 cl = cacheline(bi->pc_p); + + set_dhtu(bi, bi->direct_pen); + bi->direct_handler = bi->direct_pen; + + bi->handler_to_use = (cpuop_func *)popall_execute_normal; + bi->handler = (cpuop_func *)popall_execute_normal; + if (bi == cache_tags[cl + 1].bi) + cache_tags[cl].handler = (cpuop_func *)popall_execute_normal; + bi->status = BI_NEED_RECOMP; +} + +#if USE_MATCH +static inline void mark_callers_recompile(blockinfo * bi) +{ + dependency *x = bi->deplist; + + while (x) { + dependency *next = x->next; /* This disappears when we mark for + * recompilation and thus remove the + * blocks from the lists */ + if (x->jmp_off) { + blockinfo *cbi = x->source; + + Dif(cbi->status == BI_INVALID) { + jit_log("invalid block in dependency list"); // FIXME? + // abort(); + } + if (cbi->status == BI_ACTIVE || cbi->status == BI_NEED_CHECK) { + block_need_recompile(cbi); + mark_callers_recompile(cbi); + } + else if (cbi->status == BI_COMPILING) { + redo_current_block = 1; + } + else if (cbi->status == BI_NEED_RECOMP) { + /* nothing */ + } + else { + jit_log2("Status %d in mark_callers",cbi->status); // FIXME? + } + } + x = next; + } +} +#endif + +static inline blockinfo* get_blockinfo_addr_new(void* addr, int /* setstate */) +{ + blockinfo* bi=get_blockinfo_addr(addr); + int i; + + if (!bi) { + for (i=0;ipc_p=(uae_u8*)addr; + invalidate_block(bi); + add_to_active(bi); + add_to_cl_list(bi); + + } + } + } + if (!bi) { + jit_abort("Looking for blockinfo, can't find free one"); + } + return bi; +} + +static void prepare_block(blockinfo* bi); + +/* Management of blockinfos. + + A blockinfo struct is allocated whenever a new block has to be + compiled. If the list of free blockinfos is empty, we allocate a new + pool of blockinfos and link the newly created blockinfos altogether + into the list of free blockinfos. Otherwise, we simply pop a structure + of the free list. + + Blockinfo are lazily deallocated, i.e. chained altogether in the + list of free blockinfos whenvever a translation cache flush (hard or + soft) request occurs. +*/ + +template< class T > +class LazyBlockAllocator +{ + enum { + kPoolSize = 1 + (16384 - sizeof(T) - sizeof(void *)) / sizeof(T) + }; + struct Pool { + T chunk[kPoolSize]; + Pool * next; + }; + Pool * mPools; + T * mChunks; +public: + LazyBlockAllocator() : mPools(0), mChunks(0) { } +#ifdef UAE +#else + ~LazyBlockAllocator(); +#endif + T * acquire(); + void release(T * const); +}; + +#ifdef UAE +/* uae_vm_release may do logging, which isn't safe to do when the application + * is shutting down. Better to release memory manually with a function call + * to a release_all method on shutdown, or even simpler, just let the OS + * handle it (we're shutting down anyway). */ +#else +template< class T > +LazyBlockAllocator::~LazyBlockAllocator() +{ + Pool * currentPool = mPools; + while (currentPool) { + Pool * deadPool = currentPool; + currentPool = currentPool->next; + vm_release(deadPool, sizeof(Pool)); + } +} +#endif + +template< class T > +T * LazyBlockAllocator::acquire() +{ + if (!mChunks) { + // There is no chunk left, allocate a new pool and link the + // chunks into the free list + Pool * newPool = (Pool *)vm_acquire(sizeof(Pool), VM_MAP_DEFAULT | VM_MAP_32BIT); + if (newPool == VM_MAP_FAILED) { + jit_abort("Could not allocate block pool!"); + } + for (T * chunk = &newPool->chunk[0]; chunk < &newPool->chunk[kPoolSize]; chunk++) { + chunk->next = mChunks; + mChunks = chunk; + } + newPool->next = mPools; + mPools = newPool; + } + T * chunk = mChunks; + mChunks = chunk->next; + return chunk; +} + +template< class T > +void LazyBlockAllocator::release(T * const chunk) +{ + chunk->next = mChunks; + mChunks = chunk; +} + +template< class T > +class HardBlockAllocator +{ +public: + T * acquire() { + T * data = (T *)current_compile_p; + current_compile_p += sizeof(T); + return data; + } + + void release(T * const ) { + // Deallocated on invalidation + } +}; + +#if USE_SEPARATE_BIA +static LazyBlockAllocator BlockInfoAllocator; +static LazyBlockAllocator ChecksumInfoAllocator; +#else +static HardBlockAllocator BlockInfoAllocator; +static HardBlockAllocator ChecksumInfoAllocator; +#endif + +static inline checksum_info *alloc_checksum_info(void) +{ + checksum_info *csi = ChecksumInfoAllocator.acquire(); + csi->next = NULL; + return csi; +} + +static inline void free_checksum_info(checksum_info *csi) +{ + csi->next = NULL; + ChecksumInfoAllocator.release(csi); +} + +static inline void free_checksum_info_chain(checksum_info *csi) +{ + while (csi != NULL) { + checksum_info *csi2 = csi->next; + free_checksum_info(csi); + csi = csi2; + } +} + +static inline blockinfo *alloc_blockinfo(void) +{ + blockinfo *bi = BlockInfoAllocator.acquire(); +#if USE_CHECKSUM_INFO + bi->csi = NULL; +#endif + return bi; +} + +static inline void free_blockinfo(blockinfo *bi) +{ +#if USE_CHECKSUM_INFO + free_checksum_info_chain(bi->csi); + bi->csi = NULL; +#endif + BlockInfoAllocator.release(bi); +} + +static inline void alloc_blockinfos(void) +{ + int i; + blockinfo* bi; + + for (i=0;i data_endpos || get_target_noopt() + codesize - data_writepos > DATA_BUFFER_MAXOFFSET) + { + // Start new buffer +#if DEBUG + if(data_writepos < data_endpos) + data_wasted += data_endpos - data_writepos; +#endif + compemu_raw_branch(DATA_BUFFER_SIZE); + data_writepos = get_target_noopt(); + data_endpos = data_writepos + DATA_BUFFER_SIZE; + set_target(get_target_noopt() + DATA_BUFFER_SIZE); + } +} + +static inline long data_word_offs(uae_u16 x) +{ + data_check_end(4, 4); +#ifdef WORDS_BIGENDIAN + *((uae_u16*)data_writepos)=x; + data_writepos += 2; + *((uae_u16*)data_writepos)=0; + data_writepos += 2; +#else + *((uae_u32*)data_writepos)=x; + data_writepos += 4; +#endif + return (long)data_writepos - (long)get_target_noopt() - 12; +} + +static inline long data_long(uae_u32 x, long codesize) +{ + data_check_end(4, codesize); + *((uae_u32*)data_writepos)=x; + data_writepos += 4; + return (long)data_writepos - 4; +} + +static inline long data_long_offs(uae_u32 x) +{ + data_check_end(4, 4); + *((uae_u32*)data_writepos)=x; + data_writepos += 4; + return (long)data_writepos - (long)get_target_noopt() - 12; +} + +static inline long get_data_offset(long t) +{ + return t - (long)get_target_noopt() - 8; +} + +static inline void reset_data_buffer(void) +{ + data_writepos = 0; + data_endpos = 0; +} + +#endif +/******************************************************************** + * Getting the information about the target CPU * + ********************************************************************/ + +#if defined(CPU_arm) +#include "codegen_arm.cpp" +#endif +#if defined(CPU_i386) || defined(CPU_x86_64) +#include "codegen_x86.cpp" +#endif + + +/******************************************************************** + * Flags status handling. EMIT TIME! * + ********************************************************************/ + +static void bt_l_ri_noclobber(RR4 r, IMM i); + +static void make_flags_live_internal(void) +{ + if (live.flags_in_flags==VALID) + return; + Dif (live.flags_on_stack==TRASH) { + jit_abort("Want flags, got something on stack, but it is TRASH"); + } + if (live.flags_on_stack==VALID) { + int tmp; + tmp=readreg_specific(FLAGTMP,4,FLAG_NREG2); + raw_reg_to_flags(tmp); + unlock2(tmp); + + live.flags_in_flags=VALID; + return; + } + jit_abort("Huh? live.flags_in_flags=%d, live.flags_on_stack=%d, but need to make live", + live.flags_in_flags,live.flags_on_stack); +} + +static void flags_to_stack(void) +{ + if (live.flags_on_stack==VALID) + return; + if (!live.flags_are_important) { + live.flags_on_stack=VALID; + return; + } + Dif (live.flags_in_flags!=VALID) + jit_abort("flags_to_stack != VALID"); + else { + int tmp; + tmp=writereg_specific(FLAGTMP,4,FLAG_NREG1); + raw_flags_to_reg(tmp); + unlock2(tmp); + } + live.flags_on_stack=VALID; +} + +static inline void clobber_flags(void) +{ + if (live.flags_in_flags==VALID && live.flags_on_stack!=VALID) + flags_to_stack(); + live.flags_in_flags=TRASH; +} + +/* Prepare for leaving the compiled stuff */ +static inline void flush_flags(void) +{ + flags_to_stack(); + return; +} + +int touchcnt; + +/******************************************************************** + * Partial register flushing for optimized calls * + ********************************************************************/ + +struct regusage { + uae_u16 rmask; + uae_u16 wmask; +}; + +#if 0 +static inline void ru_set(uae_u16 *mask, int reg) +{ +#if USE_OPTIMIZED_CALLS + *mask |= 1 << reg; +#else + UNUSED(mask); + UNUSED(reg); +#endif +} + +static inline bool ru_get(const uae_u16 *mask, int reg) +{ +#if USE_OPTIMIZED_CALLS + return (*mask & (1 << reg)); +#else + UNUSED(mask); + UNUSED(reg); + /* Default: instruction reads & write to register */ + return true; +#endif +} + +static inline void ru_set_read(regusage *ru, int reg) +{ + ru_set(&ru->rmask, reg); +} + +static inline void ru_set_write(regusage *ru, int reg) +{ + ru_set(&ru->wmask, reg); +} + +static inline bool ru_read_p(const regusage *ru, int reg) +{ + return ru_get(&ru->rmask, reg); +} + +static inline bool ru_write_p(const regusage *ru, int reg) +{ + return ru_get(&ru->wmask, reg); +} + +static void ru_fill_ea(regusage *ru, int reg, amodes mode, + wordsizes size, int write_mode) +{ + switch (mode) { + case Areg: + reg += 8; + /* fall through */ + case Dreg: + ru_set(write_mode ? &ru->wmask : &ru->rmask, reg); + break; + case Ad16: + /* skip displacement */ + m68k_pc_offset += 2; + case Aind: + case Aipi: + case Apdi: + ru_set_read(ru, reg+8); + break; + case Ad8r: + ru_set_read(ru, reg+8); + /* fall through */ + case PC8r: { + uae_u16 dp = comp_get_iword((m68k_pc_offset+=2)-2); + reg = (dp >> 12) & 15; + ru_set_read(ru, reg); + if (dp & 0x100) + m68k_pc_offset += (((dp & 0x30) >> 3) & 7) + ((dp & 3) * 2); + break; + } + case PC16: + case absw: + case imm0: + case imm1: + m68k_pc_offset += 2; + break; + case absl: + case imm2: + m68k_pc_offset += 4; + break; + case immi: + m68k_pc_offset += (size == sz_long) ? 4 : 2; + break; + } +} + +/* TODO: split into a static initialization part and a dynamic one + (instructions depending on extension words) */ + +static void ru_fill(regusage *ru, uae_u32 opcode) +{ + m68k_pc_offset += 2; + + /* Default: no register is used or written to */ + ru->rmask = 0; + ru->wmask = 0; + + uae_u32 real_opcode = cft_map(opcode); + struct instr *dp = &table68k[real_opcode]; + + bool rw_dest = true; + bool handled = false; + + /* Handle some instructions specifically */ + uae_u16 ext; + switch (dp->mnemo) { + case i_BFCHG: + case i_BFCLR: + case i_BFEXTS: + case i_BFEXTU: + case i_BFFFO: + case i_BFINS: + case i_BFSET: + case i_BFTST: + ext = comp_get_iword((m68k_pc_offset+=2)-2); + if (ext & 0x800) ru_set_read(ru, (ext >> 6) & 7); + if (ext & 0x020) ru_set_read(ru, ext & 7); + ru_fill_ea(ru, dp->dreg, (amodes)dp->dmode, (wordsizes)dp->size, 1); + if (dp->dmode == Dreg) + ru_set_read(ru, dp->dreg); + switch (dp->mnemo) { + case i_BFEXTS: + case i_BFEXTU: + case i_BFFFO: + ru_set_write(ru, (ext >> 12) & 7); + break; + case i_BFINS: + ru_set_read(ru, (ext >> 12) & 7); + /* fall through */ + case i_BFCHG: + case i_BFCLR: + case i_BSET: + if (dp->dmode == Dreg) + ru_set_write(ru, dp->dreg); + break; + } + handled = true; + rw_dest = false; + break; + + case i_BTST: + rw_dest = false; + break; + + case i_CAS: + { + ext = comp_get_iword((m68k_pc_offset+=2)-2); + int Du = ext & 7; + ru_set_read(ru, Du); + int Dc = (ext >> 6) & 7; + ru_set_read(ru, Dc); + ru_set_write(ru, Dc); + break; + } + case i_CAS2: + { + int Dc1, Dc2, Du1, Du2, Rn1, Rn2; + ext = comp_get_iword((m68k_pc_offset+=2)-2); + Rn1 = (ext >> 12) & 15; + Du1 = (ext >> 6) & 7; + Dc1 = ext & 7; + ru_set_read(ru, Rn1); + ru_set_read(ru, Du1); + ru_set_read(ru, Dc1); + ru_set_write(ru, Dc1); + ext = comp_get_iword((m68k_pc_offset+=2)-2); + Rn2 = (ext >> 12) & 15; + Du2 = (ext >> 6) & 7; + Dc2 = ext & 7; + ru_set_read(ru, Rn2); + ru_set_read(ru, Du2); + ru_set_write(ru, Dc2); + break; + } + case i_DIVL: case i_MULL: + m68k_pc_offset += 2; + break; + case i_LEA: + case i_MOVE: case i_MOVEA: case i_MOVE16: + rw_dest = false; + break; + case i_PACK: case i_UNPK: + rw_dest = false; + m68k_pc_offset += 2; + break; + case i_TRAPcc: + m68k_pc_offset += (dp->size == sz_long) ? 4 : 2; + break; + case i_RTR: + /* do nothing, just for coverage debugging */ + break; + /* TODO: handle EXG instruction */ + } + + /* Handle A-Traps better */ + if ((real_opcode & 0xf000) == 0xa000) { + handled = true; + } + + /* Handle EmulOps better */ + if ((real_opcode & 0xff00) == 0x7100) { + handled = true; + ru->rmask = 0xffff; + ru->wmask = 0; + } + + if (dp->suse && !handled) + ru_fill_ea(ru, dp->sreg, (amodes)dp->smode, (wordsizes)dp->size, 0); + + if (dp->duse && !handled) + ru_fill_ea(ru, dp->dreg, (amodes)dp->dmode, (wordsizes)dp->size, 1); + + if (rw_dest) + ru->rmask |= ru->wmask; + + handled = handled || dp->suse || dp->duse; + + /* Mark all registers as used/written if the instruction may trap */ + if (may_trap(opcode)) { + handled = true; + ru->rmask = 0xffff; + ru->wmask = 0xffff; + } + + if (!handled) { + jit_abort("ru_fill: %04x = { %04x, %04x }", + real_opcode, ru->rmask, ru->wmask); + } +} +#endif + +/******************************************************************** + * register allocation per block logging * + ********************************************************************/ + +static uae_s8 vstate[VREGS]; +static uae_s8 vwritten[VREGS]; +static uae_s8 nstate[N_REGS]; + +#define L_UNKNOWN -127 +#define L_UNAVAIL -1 +#define L_NEEDED -2 +#define L_UNNEEDED -3 + +#if USE_MATCH +static inline void big_to_small_state(bigstate * /* b */, smallstate * s) +{ + int i; + + for (i = 0; i < VREGS; i++) + s->virt[i] = vstate[i]; + for (i = 0; i < N_REGS; i++) + s->nat[i] = nstate[i]; +} + +static inline int callers_need_recompile(bigstate * /* b */, smallstate * s) +{ + int i; + int reverse = 0; + + for (i = 0; i < VREGS; i++) { + if (vstate[i] != L_UNNEEDED && s->virt[i] == L_UNNEEDED) + return 1; + if (vstate[i] == L_UNNEEDED && s->virt[i] != L_UNNEEDED) + reverse++; + } + for (i = 0; i < N_REGS; i++) { + if (nstate[i] >= 0 && nstate[i] != s->nat[i]) + return 1; + if (nstate[i] < 0 && s->nat[i] >= 0) + reverse++; + } + if (reverse >= 2 && USE_MATCH) + return 1; /* In this case, it might be worth recompiling the + * callers */ + return 0; +} +#endif + +static inline void log_startblock(void) +{ + int i; + + for (i = 0; i < VREGS; i++) { + vstate[i] = L_UNKNOWN; + vwritten[i] = 0; + } + for (i = 0; i < N_REGS; i++) + nstate[i] = L_UNKNOWN; +} + +/* Using an n-reg for a temp variable */ +static inline void log_isused(int n) +{ + if (nstate[n] == L_UNKNOWN) + nstate[n] = L_UNAVAIL; +} + +static inline void log_visused(int r) +{ + if (vstate[r] == L_UNKNOWN) + vstate[r] = L_NEEDED; +} + +static inline void do_load_reg(int n, int r) +{ + if (r == FLAGTMP) + raw_load_flagreg(n); + else if (r == FLAGX) + raw_load_flagx(n); + else + compemu_raw_mov_l_rm(n, JITPTR live.state[r].mem); +} + +#if 0 +static inline void check_load_reg(int n, int r) +{ + compemu_raw_mov_l_rm(n, (uintptr) live.state[r].mem); +} +#endif + +static inline void log_vwrite(int r) +{ + vwritten[r] = 1; +} + +/* Using an n-reg to hold a v-reg */ +static inline void log_isreg(int n, int r) +{ + if (nstate[n] == L_UNKNOWN && r < 16 && !vwritten[r] && USE_MATCH) + nstate[n] = r; + else { + do_load_reg(n, r); + if (nstate[n] == L_UNKNOWN) + nstate[n] = L_UNAVAIL; + } + if (vstate[r] == L_UNKNOWN) + vstate[r] = L_NEEDED; +} + +static inline void log_clobberreg(int r) +{ + if (vstate[r] == L_UNKNOWN) + vstate[r] = L_UNNEEDED; +} + +/* This ends all possibility of clever register allocation */ + +static inline void log_flush(void) +{ + int i; + + for (i = 0; i < VREGS; i++) + if (vstate[i] == L_UNKNOWN) + vstate[i] = L_NEEDED; + for (i = 0; i < N_REGS; i++) + if (nstate[i] == L_UNKNOWN) + nstate[i] = L_UNAVAIL; +} + +static inline void log_dump(void) +{ + int i; + + return; + + jit_log("----------------------"); + for (i = 0; i < N_REGS; i++) { + switch (nstate[i]) { + case L_UNKNOWN: + jit_log("Nat %d : UNKNOWN", i); + break; + case L_UNAVAIL: + jit_log("Nat %d : UNAVAIL", i); + break; + default: + jit_log("Nat %d : %d", i, nstate[i]); + break; + } + } + for (i = 0; i < VREGS; i++) { + if (vstate[i] == L_UNNEEDED) { + jit_log("Virt %d: UNNEEDED", i); + } + } +} + +/******************************************************************** + * register status handling. EMIT TIME! * + ********************************************************************/ + +static inline void set_status(int r, int status) +{ + if (status == ISCONST) + log_clobberreg(r); + live.state[r].status=status; +} + +static inline int isinreg(int r) +{ + return live.state[r].status==CLEAN || live.state[r].status==DIRTY; +} + +static inline void adjust_nreg(int r, uae_u32 val) +{ + if (!val) + return; + compemu_raw_lea_l_brr(r,r,val); +} + +static void tomem(int r) +{ + int rr=live.state[r].realreg; + + if (isinreg(r)) { + if (live.state[r].val && live.nat[rr].nholds==1 + && !live.nat[rr].locked) { + jit_log2("RemovingA offset %x from reg %d (%d) at %p", live.state[r].val,r,rr,target); + adjust_nreg(rr,live.state[r].val); + live.state[r].val=0; + live.state[r].dirtysize=4; + set_status(r,DIRTY); + } + } + + if (live.state[r].status==DIRTY) { + switch (live.state[r].dirtysize) { + case 1: compemu_raw_mov_b_mr(JITPTR live.state[r].mem,rr); break; + case 2: compemu_raw_mov_w_mr(JITPTR live.state[r].mem,rr); break; + case 4: compemu_raw_mov_l_mr(JITPTR live.state[r].mem,rr); break; + default: abort(); + } + log_vwrite(r); + set_status(r,CLEAN); + live.state[r].dirtysize=0; + } +} + +static inline int isconst(int r) +{ + return live.state[r].status==ISCONST; +} + +int is_const(int r) +{ + return isconst(r); +} + +static inline void writeback_const(int r) +{ + if (!isconst(r)) + return; + Dif (live.state[r].needflush==NF_HANDLER) { + jit_abort("Trying to write back constant NF_HANDLER!"); + } + + compemu_raw_mov_l_mi(JITPTR live.state[r].mem,live.state[r].val); + log_vwrite(r); + live.state[r].val=0; + set_status(r,INMEM); +} + +static inline void tomem_c(int r) +{ + if (isconst(r)) { + writeback_const(r); + } + else + tomem(r); +} + +static void evict(int r) +{ + int rr; + + if (!isinreg(r)) + return; + tomem(r); + rr=live.state[r].realreg; + + Dif (live.nat[rr].locked && + live.nat[rr].nholds==1) { + jit_abort("register %d in nreg %d is locked!",r,live.state[r].realreg); + } + + live.nat[rr].nholds--; + if (live.nat[rr].nholds!=live.state[r].realind) { /* Was not last */ + int topreg=live.nat[rr].holds[live.nat[rr].nholds]; + int thisind=live.state[r].realind; + + live.nat[rr].holds[thisind]=topreg; + live.state[topreg].realind=thisind; + } + live.state[r].realreg=-1; + set_status(r,INMEM); +} + +static inline void free_nreg(int r) +{ + int i=live.nat[r].nholds; + + while (i) { + int vr; + + --i; + vr=live.nat[r].holds[i]; + evict(vr); + } + Dif (live.nat[r].nholds!=0) { + jit_abort("Failed to free nreg %d, nholds is %d",r,live.nat[r].nholds); + } +} + +/* Use with care! */ +static inline void isclean(int r) +{ + if (!isinreg(r)) + return; + live.state[r].validsize=4; + live.state[r].dirtysize=0; + live.state[r].val=0; + set_status(r,CLEAN); +} + +static inline void disassociate(int r) +{ + isclean(r); + evict(r); +} + +/* XXFIXME: val may be 64bit address for PC_P */ +static inline void set_const(int r, uae_u32 val) +{ + disassociate(r); + live.state[r].val=val; + set_status(r,ISCONST); +} + +static inline uae_u32 get_offset(int r) +{ + return live.state[r].val; +} + +static int alloc_reg_hinted(int r, int size, int willclobber, int hint) +{ + int bestreg; + uae_s32 when; + int i; + uae_s32 badness=0; /* to shut up gcc */ + bestreg=-1; + when=2000000000; + + /* XXX use a regalloc_order table? */ + for (i=0;i0) { + free_nreg(bestreg); + } + if (isinreg(r)) { + int rr=live.state[r].realreg; + /* This will happen if we read a partially dirty register at a + bigger size */ + Dif (willclobber || live.state[r].validsize>=size) + jit_abort("willclobber || live.state[r].validsize>=size"); + Dif (live.nat[rr].nholds!=1) + jit_abort("live.nat[rr].nholds!=1"); + if (size==4 && live.state[r].validsize==2) { + log_isused(bestreg); + log_visused(r); + compemu_raw_mov_l_rm(bestreg, JITPTR live.state[r].mem); + compemu_raw_bswap_32(bestreg); + compemu_raw_zero_extend_16_rr(rr,rr); + compemu_raw_zero_extend_16_rr(bestreg,bestreg); + compemu_raw_bswap_32(bestreg); + compemu_raw_lea_l_rr_indexed(rr, rr, bestreg, 1); + live.state[r].validsize=4; + live.nat[rr].touched=touchcnt++; + return rr; + } + if (live.state[r].validsize==1) { + /* Nothing yet */ + } + evict(r); + } + + if (!willclobber) { + if (live.state[r].status!=UNDEF) { + if (isconst(r)) { + compemu_raw_mov_l_ri(bestreg,live.state[r].val); + live.state[r].val=0; + live.state[r].dirtysize=4; + set_status(r,DIRTY); + log_isused(bestreg); + } + else { + log_isreg(bestreg, r); /* This will also load it! */ + live.state[r].dirtysize=0; + set_status(r,CLEAN); + } + } + else { + live.state[r].val=0; + live.state[r].dirtysize=0; + set_status(r,CLEAN); + log_isused(bestreg); + } + live.state[r].validsize=4; + } + else { /* this is the easiest way, but not optimal. FIXME! */ + /* Now it's trickier, but hopefully still OK */ + if (!isconst(r) || size==4) { + live.state[r].validsize=size; + live.state[r].dirtysize=size; + live.state[r].val=0; + set_status(r,DIRTY); + if (size == 4) { + log_clobberreg(r); + log_isused(bestreg); + } + else { + log_visused(r); + log_isused(bestreg); + } + } + else { + if (live.state[r].status!=UNDEF) + compemu_raw_mov_l_ri(bestreg,live.state[r].val); + live.state[r].val=0; + live.state[r].validsize=4; + live.state[r].dirtysize=4; + set_status(r,DIRTY); + log_isused(bestreg); + } + } + live.state[r].realreg=bestreg; + live.state[r].realind=live.nat[bestreg].nholds; + live.nat[bestreg].touched=touchcnt++; + live.nat[bestreg].holds[live.nat[bestreg].nholds]=r; + live.nat[bestreg].nholds++; + + return bestreg; +} + +/* +static int alloc_reg(int r, int size, int willclobber) +{ + return alloc_reg_hinted(r,size,willclobber,-1); +} +*/ + +static void unlock2(int r) +{ + Dif (!live.nat[r].locked) + jit_abort("unlock2 %d not locked", r); + live.nat[r].locked--; +} + +static void setlock(int r) +{ + live.nat[r].locked++; +} + + +static void mov_nregs(int d, int s) +{ + int nd=live.nat[d].nholds; + int i; + + if (s==d) + return; + + if (nd>0) + free_nreg(d); + + log_isused(d); + compemu_raw_mov_l_rr(d,s); + + for (i=0;i=size) { + n=live.state[r].realreg; + switch(size) { + case 1: + if (live.nat[n].canbyte || spec>=0) { + answer=n; + } + break; + case 2: + if (live.nat[n].canword || spec>=0) { + answer=n; + } + break; + case 4: + answer=n; + break; + default: abort(); + } + if (answer<0) + evict(r); + } + /* either the value was in memory to start with, or it was evicted and + is in memory now */ + if (answer<0) { + answer=alloc_reg_hinted(r,spec>=0?4:size,0,spec); + } + + if (spec>=0 && spec!=answer) { + /* Too bad */ + mov_nregs(spec,answer); + answer=spec; + } + live.nat[answer].locked++; + live.nat[answer].touched=touchcnt++; + return answer; +} + + + +static int readreg(int r, int size) +{ + return readreg_general(r,size,-1,0); +} + +static int readreg_specific(int r, int size, int spec) +{ + return readreg_general(r,size,spec,0); +} + +static int readreg_offset(int r, int size) +{ + return readreg_general(r,size,-1,1); +} + +/* writereg_general(r, size, spec) + * + * INPUT + * - r : mid-layer register + * - size : requested size (1/2/4) + * - spec : -1 if find or make a register free, otherwise specifies + * the physical register to use in any case + * + * OUTPUT + * - hard (physical, x86 here) register allocated to virtual register r + */ +static inline int writereg_general(int r, int size, int spec) +{ + int n; + int answer=-1; + + record_register(r); + if (size<4) { + remove_offset(r,spec); + } + + make_exclusive(r,size,spec); + if (isinreg(r)) { + int nvsize=size>live.state[r].validsize?size:live.state[r].validsize; + int ndsize=size>live.state[r].dirtysize?size:live.state[r].dirtysize; + n=live.state[r].realreg; + + Dif (live.nat[n].nholds!=1) + jit_abort("live.nat[%d].nholds!=1", n); + switch(size) { + case 1: + if (live.nat[n].canbyte || spec>=0) { + live.state[r].dirtysize=ndsize; + live.state[r].validsize=nvsize; + answer=n; + } + break; + case 2: + if (live.nat[n].canword || spec>=0) { + live.state[r].dirtysize=ndsize; + live.state[r].validsize=nvsize; + answer=n; + } + break; + case 4: + live.state[r].dirtysize=ndsize; + live.state[r].validsize=nvsize; + answer=n; + break; + default: abort(); + } + if (answer<0) + evict(r); + } + /* either the value was in memory to start with, or it was evicted and + is in memory now */ + if (answer<0) { + answer=alloc_reg_hinted(r,size,1,spec); + } + if (spec>=0 && spec!=answer) { + mov_nregs(spec,answer); + answer=spec; + } + if (live.state[r].status==UNDEF) + live.state[r].validsize=4; + live.state[r].dirtysize=size>live.state[r].dirtysize?size:live.state[r].dirtysize; + live.state[r].validsize=size>live.state[r].validsize?size:live.state[r].validsize; + + live.nat[answer].locked++; + live.nat[answer].touched=touchcnt++; + if (size==4) { + live.state[r].val=0; + } + else { + Dif (live.state[r].val) { + jit_abort("Problem with val"); + } + } + set_status(r,DIRTY); + return answer; +} + +static int writereg(int r, int size) +{ + return writereg_general(r,size,-1); +} + +static int writereg_specific(int r, int size, int spec) +{ + return writereg_general(r,size,spec); +} + +static inline int rmw_general(int r, int wsize, int rsize, int spec) +{ + int n; + int answer=-1; + + record_register(r); + if (live.state[r].status==UNDEF) { + jit_log("WARNING: Unexpected read of undefined register %d",r); + } + remove_offset(r,spec); + make_exclusive(r,0,spec); + + Dif (wsize=rsize) { + n=live.state[r].realreg; + Dif (live.nat[n].nholds!=1) + jit_abort("live.nat[%d].nholds!=1", n); + + switch(rsize) { + case 1: + if (live.nat[n].canbyte || spec>=0) { + answer=n; + } + break; + case 2: + if (live.nat[n].canword || spec>=0) { + answer=n; + } + break; + case 4: + answer=n; + break; + default: abort(); + } + if (answer<0) + evict(r); + } + /* either the value was in memory to start with, or it was evicted and + is in memory now */ + if (answer<0) { + answer=alloc_reg_hinted(r,spec>=0?4:rsize,0,spec); + } + + if (spec>=0 && spec!=answer) { + /* Too bad */ + mov_nregs(spec,answer); + answer=spec; + } + if (wsize>live.state[r].dirtysize) + live.state[r].dirtysize=wsize; + if (wsize>live.state[r].validsize) + live.state[r].validsize=wsize; + set_status(r,DIRTY); + + live.nat[answer].locked++; + live.nat[answer].touched=touchcnt++; + + Dif (live.state[r].val) { + jit_abort("Problem with val(rmw)"); + } + return answer; +} + +static int rmw(int r, int wsize, int rsize) +{ + return rmw_general(r,wsize,rsize,-1); +} + +static int rmw_specific(int r, int wsize, int rsize, int spec) +{ + return rmw_general(r,wsize,rsize,spec); +} + + +/* needed for restoring the carry flag on non-P6 cores */ +static void bt_l_ri_noclobber(RR4 r, IMM i) +{ + int size=4; + if (i<16) + size=2; + r=readreg(r,size); + compemu_raw_bt_l_ri(r,i); + unlock2(r); +} + +/******************************************************************** + * FPU register status handling. EMIT TIME! * + ********************************************************************/ + +static void f_tomem(int r) +{ + if (live.fate[r].status==DIRTY) { +#ifdef USE_LONG_DOUBLE + if (use_long_double) { + raw_fmov_ext_mr((uintptr)live.fate[r].mem, live.fate[r].realreg); + } else { +#endif + raw_fmov_mr((uintptr)live.fate[r].mem, live.fate[r].realreg); +#ifdef USE_LONG_DOUBLE + } +#endif + live.fate[r].status=CLEAN; + } +} + +static void f_tomem_drop(int r) +{ + if (live.fate[r].status==DIRTY) { +#ifdef USE_LONG_DOUBLE + if (use_long_double) { + raw_fmov_ext_mr_drop((uintptr)live.fate[r].mem, live.fate[r].realreg); + } else { +#endif + raw_fmov_mr_drop((uintptr)live.fate[r].mem,live.fate[r].realreg); +#ifdef USE_LONG_DOUBLE + } +#endif + live.fate[r].status=INMEM; + } +} + + +static inline int f_isinreg(int r) +{ + return live.fate[r].status==CLEAN || live.fate[r].status==DIRTY; +} + +static void f_evict(int r) +{ + int rr; + + if (!f_isinreg(r)) + return; + rr=live.fate[r].realreg; + if (live.fat[rr].nholds==1) + f_tomem_drop(r); + else + f_tomem(r); + + Dif (live.fat[rr].locked && + live.fat[rr].nholds==1) { + jit_abort("FPU register %d in nreg %d is locked!",r,live.fate[r].realreg); + } + + live.fat[rr].nholds--; + if (live.fat[rr].nholds!=live.fate[r].realind) { /* Was not last */ + int topreg=live.fat[rr].holds[live.fat[rr].nholds]; + int thisind=live.fate[r].realind; + live.fat[rr].holds[thisind]=topreg; + live.fate[topreg].realind=thisind; + } + live.fate[r].status=INMEM; + live.fate[r].realreg=-1; +} + +static inline void f_free_nreg(int r) +{ + int i=live.fat[r].nholds; + + while (i) { + int vr; + + --i; + vr=live.fat[r].holds[i]; + f_evict(vr); + } + Dif (live.fat[r].nholds!=0) { + jit_abort("Failed to free nreg %d, nholds is %d",r,live.fat[r].nholds); + } +} + + +/* Use with care! */ +static inline void f_isclean(int r) +{ + if (!f_isinreg(r)) + return; + live.fate[r].status=CLEAN; +} + +static inline void f_disassociate(int r) +{ + f_isclean(r); + f_evict(r); +} + + + +static int f_alloc_reg(int r, int willclobber) +{ + int bestreg; + uae_s32 when; + int i; + uae_s32 badness; + bestreg=-1; + when=2000000000; + for (i=N_FREGS;i--;) { + badness=live.fat[i].touched; + if (live.fat[i].nholds==0) + badness=0; + + if (!live.fat[i].locked && badness0) { + f_free_nreg(bestreg); + } + if (f_isinreg(r)) { + f_evict(r); + } + + if (!willclobber) { + if (live.fate[r].status!=UNDEF) { +#ifdef USE_LONG_DOUBLE + if (use_long_double) { + raw_fmov_ext_rm(bestreg, (uintptr)live.fate[r].mem); + } else { +#endif + raw_fmov_rm(bestreg,(uintptr)live.fate[r].mem); +#ifdef USE_LONG_DOUBLE + } +#endif + } + live.fate[r].status=CLEAN; + } + else { + live.fate[r].status=DIRTY; + } + live.fate[r].realreg=bestreg; + live.fate[r].realind=live.fat[bestreg].nholds; + live.fat[bestreg].touched=touchcnt++; + live.fat[bestreg].holds[live.fat[bestreg].nholds]=r; + live.fat[bestreg].nholds++; + + return bestreg; +} + +static void f_unlock(int r) +{ + Dif (!live.fat[r].locked) + jit_abort ("unlock %d", r); + live.fat[r].locked--; +} + +static void f_setlock(int r) +{ + live.fat[r].locked++; +} + +static inline int f_readreg(int r) +{ + int n; + int answer=-1; + + if (f_isinreg(r)) { + n=live.fate[r].realreg; + answer=n; + } + /* either the value was in memory to start with, or it was evicted and + is in memory now */ + if (answer<0) + answer=f_alloc_reg(r,0); + + live.fat[answer].locked++; + live.fat[answer].touched=touchcnt++; + return answer; +} + +static inline void f_make_exclusive(int r, int clobber) +{ + freg_status oldstate; + int rr=live.fate[r].realreg; + int nr; + int nind; + int ndirt=0; + int i; + + if (!f_isinreg(r)) + return; + if (live.fat[rr].nholds==1) + return; + for (i=0;i= uae_p32(kickmem_bank.baseaddr) && + addr < uae_p32(kickmem_bank.baseaddr + 8 * 65536)); +#else + return ((addr >= (uintptr)ROMBaseHost) && (addr < (uintptr)ROMBaseHost + ROMSize)); +#endif +} + +#if defined(UAE) || defined(FLIGHT_RECORDER) +static void flush_all(void) +{ + int i; + + log_flush(); + for (i=0;i0) + free_nreg(i); + + for (i=0;i0) + f_free_nreg(i); + + live.flags_in_flags=TRASH; /* Note: We assume we already rescued the + flags at the very start of the call_r + functions! */ +} +#endif + +#if defined(CPU_arm) +#include "compemu_midfunc_arm.cpp" + +#if defined(USE_JIT2) +#include "compemu_midfunc_arm2.cpp" +#endif +#endif + +#if defined(CPU_i386) || defined(CPU_x86_64) +#include "compemu_midfunc_x86.cpp" +#endif + + +/******************************************************************** + * Support functions exposed to gencomp. CREATE time * + ********************************************************************/ + +void set_zero(int r, int tmp) +{ + if (setzflg_uses_bsf) + bsf_l_rr(r,r); + else + simulate_bsf(tmp,r); +} + +int kill_rodent(int r) +{ + return KILLTHERAT && + have_rat_stall && + (live.state[r].status==INMEM || + live.state[r].status==CLEAN || + live.state[r].status==ISCONST || + live.state[r].dirtysize==4); +} + +uae_u32 get_const(int r) +{ + Dif (!isconst(r)) { + jit_abort("Register %d should be constant, but isn't",r); + } + return live.state[r].val; +} + +void sync_m68k_pc(void) +{ + if (m68k_pc_offset) { + add_l_ri(PC_P,m68k_pc_offset); + comp_pc_p+=m68k_pc_offset; + m68k_pc_offset=0; + } +} + +/* for building exception frames */ +void compemu_exc_make_frame(int format, int sr, int ret, int nr, int tmp) +{ + lea_l_brr(SP_REG, SP_REG, -2); + mov_l_ri(tmp, (format << 12) + (nr * 4)); /* format | vector */ + writeword(SP_REG, tmp, tmp); + + lea_l_brr(SP_REG, SP_REG, -4); + writelong(SP_REG, ret, tmp); + + lea_l_brr(SP_REG, SP_REG, -2); + writeword_clobber(SP_REG, sr, tmp); + remove_offset(SP_REG, -1); + if (isinreg(SP_REG)) + evict(SP_REG); + else + flush_reg(SP_REG); +} + +void compemu_make_sr(int sr, int tmp) +{ + flush_flags(); /* low level */ + flush_reg(FLAGX); + +#if defined (OPTIMIZED_FLAGS) || defined(UAE) + + /* + * x86 EFLAGS: (!SAHF_SETO_PROFITABLE) + * FEDCBA98 76543210 + * ----V--- NZ-----C + * + * <--AH--> <--AL--> (SAHF_SETO_PROFITABLE) + * FEDCBA98 76543210 + * NZxxxxxC xxxxxxxV + * + * arm RFLAGS: + * FEDCBA98 76543210 FEDCBA98 76543210 + * NZCV---- -------- -------- -------- + * + * -> m68k SR: + * --S--III ---XNZVC + * + * Master-Bit and traceflags are ignored here, + * since they are not emulated in JIT code + */ + mov_l_rm(sr, uae_p32(live.state[FLAGTMP].mem)); + mov_l_ri(tmp, FLAGVAL_N|FLAGVAL_Z|FLAGVAL_V|FLAGVAL_C); + and_l(sr, tmp); + mov_l_rr(tmp, sr); + +#if (defined(CPU_i386) && defined(X86_ASSEMBLY)) || (defined(CPU_x86_64) && defined(X86_64_ASSEMBLY)) +#ifndef SAHF_SETO_PROFITABLE + ror_b_ri(sr, FLAGBIT_N - 3); /* move NZ into position; C->4 */ + shrl_w_ri(tmp, FLAGBIT_V - 1); /* move V into position in tmp */ + or_l(sr, tmp); /* or V flag to SR */ + mov_l_rr(tmp, sr); + shrl_b_ri(tmp, (8 - (FLAGBIT_N - 3)) - FLAGBIT_C); /* move C into position in tmp */ + or_l(sr, tmp); /* or C flag to SR */ +#else + ror_w_ri(sr, FLAGBIT_N - 3); /* move NZ in position; V->4, C->12 */ + shrl_w_ri(tmp, (16 - (FLAGBIT_N - 3)) - FLAGBIT_V - 1); /* move V into position in tmp; C->9 */ + or_l(sr, tmp); /* or V flag to SR */ + shrl_w_ri(tmp, FLAGBIT_C + FLAGBIT_V - 1); /* move C into position in tmp */ + or_l(sr, tmp); /* or C flag to SR */ +#endif + mov_l_ri(tmp, 0x0f); + and_l(sr, tmp); + + mov_b_rm(tmp, uae_p32(®flags.x)); + and_l_ri(tmp, FLAGVAL_X); + shll_l_ri(tmp, 4); + or_l(sr, tmp); + +#elif defined(CPU_arm) && defined(ARM_ASSEMBLY) + shrl_l_ri(sr, FLAGBIT_N - 3); /* move NZ into position */ + ror_l_ri(tmp, FLAGBIT_C - 1); /* move C into position in tmp; V->31 */ + and_l_ri(sr, 0xc); + or_l(sr, tmp); /* or C flag to SR */ + shrl_l_ri(tmp, 31); /* move V into position in tmp */ + or_l(sr, tmp); /* or V flag to SR */ + + mov_b_rm(tmp, uae_p32(®flags.x)); + and_l_ri(tmp, FLAGVAL_X); + shrl_l_ri(tmp, FLAGBIT_X - 4); + or_l(sr, tmp); + +#else +#error "unknown CPU" +#endif + +#else + + xor_l(sr, sr); + xor_l(tmp, tmp); + mov_b_rm(tmp, uae_p32(®s.c)); + shll_l_ri(tmp, 0); + or_l(sr, tmp); + mov_b_rm(tmp, uae_p32(®s.v)); + shll_l_ri(tmp, 1); + or_l(sr, tmp); + mov_b_rm(tmp, uae_p32(®s.z)); + shll_l_ri(tmp, 2); + or_l(sr, tmp); + mov_b_rm(tmp, uae_p32(®s.n)); + shll_l_ri(tmp, 3); + or_l(sr, tmp); + +#endif /* OPTIMIZED_FLAGS */ + + mov_b_rm(tmp, uae_p32(®s.s)); + shll_l_ri(tmp, 13); + or_l(sr, tmp); + mov_l_rm(tmp, uae_p32(®s.intmask)); + shll_l_ri(tmp, 8); + or_l(sr, tmp); + and_l_ri(sr, 0x271f); + mov_w_mr(uae_p32(®s.sr), sr); +} + +void compemu_enter_super(int sr) +{ +#if 0 + fprintf(stderr, "enter_super: isinreg=%d rr=%d nholds=%d\n", isinreg(SP_REG), live.state[SP_REG].realreg, isinreg(SP_REG) ? live.nat[live.state[SP_REG].realreg].nholds : -1); +#endif + remove_offset(SP_REG, -1); + if (isinreg(SP_REG)) + evict(SP_REG); + else + flush_reg(SP_REG); + /* + * equivalent to: + * if (!regs.s) + * { + * regs.usp = m68k_areg(regs, 7); + * m68k_areg(regs, 7) = regs.isp; + * regs.s = 1; + * mmu_set_super(1); + * } + */ + test_l_ri(sr, 0x2000); +#if defined(CPU_i386) || defined(CPU_x86_64) + compemu_raw_jnz_b_oponly(); + uae_u8 *branchadd = get_target(); + skip_byte(); +#elif defined(CPU_arm) + compemu_raw_jnz_b_oponly(); + uae_u8 *branchadd = get_target(); + skip_byte(); +#endif + mov_l_mr(JITPTR ®s.usp, SP_REG); + mov_l_rm(SP_REG, uae_p32(®s.isp)); + mov_b_mi(uae_p32(®s.s), 1); +#if defined(CPU_i386) || defined(CPU_x86_64) + *branchadd = JITPTR get_target() - (JITPTR branchadd + 1); +#elif defined(CPU_arm) + *((uae_u32 *)branchadd - 3) = get_target() - (branchadd + 1); +#endif +} + +/******************************************************************** + * Scratch registers management * + ********************************************************************/ + +struct scratch_t { + uae_u32 regs[VREGS]; + fpu_register fregs[VFREGS]; +}; + +static scratch_t scratch; + +/******************************************************************** + * Support functions exposed to newcpu * + ********************************************************************/ + +static inline const char *str_on_off(bool b) +{ + return b ? "on" : "off"; +} + +void compiler_init(void) +{ + static bool initialized = false; + if (initialized) + return; + + flush_icache = flush_icache_none; + +#ifdef UAE + flush_icache = lazy_flush ? flush_icache_lazy : flush_icache_hard; +#else + jit_log(" : enable runtime disassemblers : %s", JITDebug ? "yes" : "no"); + + jit_log(" : compile FPU instructions : %s", !avoid_fpu ? "yes" : "no"); + + // Get size of the translation cache (in KB) + cache_size = bx_options.jit.jitcachesize; + jit_log(" : requested translation cache size : %d KB", cache_size); + + setzflg_uses_bsf = target_check_bsf(); + jit_log(" : target processor has CMOV instructions : %s", have_cmov ? "yes" : "no"); + jit_log(" : target processor can suffer from partial register stalls : %s", have_rat_stall ? "yes" : "no"); + jit_log(" : alignment for loops, jumps are %d, %d", align_loops, align_jumps); +#if defined(CPU_i386) || defined(CPU_x86_64) + jit_log(" : target processor has SSE2 instructions : %s", cpuinfo.x86_has_xmm2 ? "yes" : "no"); + jit_log(" : cache linesize is %lu", (unsigned long)cpuinfo.x86_clflush_size); +#endif + + // Translation cache flush mechanism + lazy_flush = (bx_options.jit.jitlazyflush == 0) ? false : true; + jit_log(" : lazy translation cache invalidation : %s", str_on_off(lazy_flush)); + flush_icache = lazy_flush ? flush_icache_lazy : flush_icache_hard; + + // Compiler features + jit_log(" : register aliasing : %s", str_on_off(1)); + jit_log(" : FP register aliasing : %s", str_on_off(USE_F_ALIAS)); + jit_log(" : lazy constant offsetting : %s", str_on_off(USE_OFFSET)); +#if USE_INLINING + follow_const_jumps = bx_options.jit.jitinline; +#endif + jit_log(" : block inlining : %s", str_on_off(follow_const_jumps)); + jit_log(" : separate blockinfo allocation : %s", str_on_off(USE_SEPARATE_BIA)); + + // Build compiler tables + init_table68k(); + build_comp(); +#endif + + initialized = true; + +#ifdef PROFILE_UNTRANSLATED_INSNS + jit_log(" : gather statistics on untranslated insns count"); +#endif + +#ifdef PROFILE_COMPILE_TIME + jit_log(" : gather statistics on translation time"); + emul_start_time = clock(); +#endif +} + +void compiler_exit(void) +{ +#ifdef PROFILE_COMPILE_TIME + emul_end_time = clock(); +#endif + +#ifdef UAE +#else +#if DEBUG +#if defined(USE_DATA_BUFFER) + jit_log("data_wasted = %ld bytes", data_wasted); +#endif +#endif + + // Deallocate translation cache + if (compiled_code) { + vm_release(compiled_code, cache_size * 1024); + compiled_code = 0; + } + + // Deallocate popallspace + if (popallspace) { + vm_release(popallspace, POPALLSPACE_SIZE); + popallspace = 0; + } +#endif + +#ifdef PROFILE_COMPILE_TIME + jit_log("### Compile Block statistics"); + jit_log("Number of calls to compile_block : %d", compile_count); + uae_u32 emul_time = emul_end_time - emul_start_time; + jit_log("Total emulation time : %.1f sec", double(emul_time)/double(CLOCKS_PER_SEC)); + jit_log("Total compilation time : %.1f sec (%.1f%%)", double(compile_time)/double(CLOCKS_PER_SEC), 100.0*double(compile_time)/double(emul_time)); +#endif + +#ifdef PROFILE_UNTRANSLATED_INSNS + uae_u64 untranslated_count = 0; + for (int i = 0; i < 65536; i++) { + opcode_nums[i] = i; + untranslated_count += raw_cputbl_count[i]; + } + bug("Sorting out untranslated instructions count, total %llu...\n", untranslated_count); + qsort(opcode_nums, 65536, sizeof(uae_u16), untranslated_compfn); + jit_log("Rank Opc Count Name\n"); + for (int i = 0; i < untranslated_top_ten; i++) { + uae_u32 count = raw_cputbl_count[opcode_nums[i]]; + struct instr *dp; + struct mnemolookup *lookup; + if (!count) + break; + dp = table68k + opcode_nums[i]; + for (lookup = lookuptab; lookup->mnemo != (instrmnem)dp->mnemo; lookup++) + ; + bug(_T("%03d: %04x %10u %s\n"), i, opcode_nums[i], count, lookup->name); + } +#endif + +#ifdef RECORD_REGISTER_USAGE + int reg_count_ids[16]; + uint64 tot_reg_count = 0; + for (int i = 0; i < 16; i++) { + reg_count_ids[i] = i; + tot_reg_count += reg_count[i]; + } + qsort(reg_count_ids, 16, sizeof(int), reg_count_compare); + uint64 cum_reg_count = 0; + for (int i = 0; i < 16; i++) { + int r = reg_count_ids[i]; + cum_reg_count += reg_count[r]; + jit_log("%c%d : %16ld %2.1f%% [%2.1f]", r < 8 ? 'D' : 'A', r % 8, + reg_count[r], + 100.0*double(reg_count[r])/double(tot_reg_count), + 100.0*double(cum_reg_count)/double(tot_reg_count)); + } +#endif + + exit_table68k(); +} + +static void init_comp(void) +{ + int i; + uae_s8* cb=can_byte; + uae_s8* cw=can_word; + uae_s8* au=always_used; + +#ifdef RECORD_REGISTER_USAGE + for (i=0;i<16;i++) + reg_count_local[i] = 0; +#endif + + for (i=0;idirect_handler_to_use; +} + +/* This version assumes that it is writing *real* memory, and *will* fail + * if that assumption is wrong! No branches, no second chances, just + * straight go-for-it attitude */ + +static void writemem_real(int address, int source, int size, int tmp, int clobber) +{ + int f=tmp; + +#ifdef NATMEM_OFFSET + if (canbang) { /* Woohoo! go directly at the memory! */ + if (clobber) + f=source; + + switch(size) { + case 1: mov_b_bRr(address,source,MEMBaseDiff); break; + case 2: mov_w_rr(f,source); mid_bswap_16(f); mov_w_bRr(address,f,MEMBaseDiff); break; + case 4: mov_l_rr(f,source); mid_bswap_32(f); mov_l_bRr(address,f,MEMBaseDiff); break; + } + forget_about(tmp); + forget_about(f); + return; + } +#endif + +#ifdef UAE + mov_l_rr(f,address); + shrl_l_ri(f,16); /* The index into the baseaddr table */ + mov_l_rm_indexed(f,uae_p32(baseaddr),f,SIZEOF_VOID_P); /* FIXME: is SIZEOF_VOID_P correct? */ + + if (address==source) { /* IBrowse does this! */ + if (size > 1) { + add_l(f,address); /* f now holds the final address */ + switch (size) { + case 2: mid_bswap_16(source); mov_w_Rr(f,source,0); + mid_bswap_16(source); return; + case 4: mid_bswap_32(source); mov_l_Rr(f,source,0); + mid_bswap_32(source); return; + } + } + } + switch (size) { /* f now holds the offset */ + case 1: mov_b_mrr_indexed(address,f,1,source); break; + case 2: mid_bswap_16(source); mov_w_mrr_indexed(address,f,1,source); + mid_bswap_16(source); break; /* base, index, source */ + case 4: mid_bswap_32(source); mov_l_mrr_indexed(address,f,1,source); + mid_bswap_32(source); break; + } +#endif +} + +#ifdef UAE +static inline void writemem(int address, int source, int offset, int size, int tmp) +{ + int f=tmp; + + mov_l_rr(f,address); + shrl_l_ri(f,16); /* The index into the mem bank table */ + mov_l_rm_indexed(f,uae_p32(mem_banks),f,SIZEOF_VOID_P); /* FIXME: is SIZEOF_VOID_P correct? */ + /* Now f holds a pointer to the actual membank */ + mov_l_rR(f,f,offset); + /* Now f holds the address of the b/w/lput function */ + call_r_02(f,address,source,4,size); + forget_about(tmp); +} +#endif + +void writebyte(int address, int source, int tmp) +{ +#ifdef UAE + if ((special_mem & S_WRITE) || distrust_byte()) + writemem_special(address, source, 5 * SIZEOF_VOID_P, 1, tmp); + else +#endif + writemem_real(address,source,1,tmp,0); +} + +static inline void writeword_general(int address, int source, int tmp, + int clobber) +{ +#ifdef UAE + if ((special_mem & S_WRITE) || distrust_word()) + writemem_special(address, source, 4 * SIZEOF_VOID_P, 2, tmp); + else +#endif + writemem_real(address,source,2,tmp,clobber); +} + +void writeword_clobber(int address, int source, int tmp) +{ + writeword_general(address,source,tmp,1); +} + +void writeword(int address, int source, int tmp) +{ + writeword_general(address,source,tmp,0); +} + +static inline void writelong_general(int address, int source, int tmp, + int clobber) +{ +#ifdef UAE + if ((special_mem & S_WRITE) || distrust_long()) + writemem_special(address, source, 3 * SIZEOF_VOID_P, 4, tmp); + else +#endif + writemem_real(address,source,4,tmp,clobber); +} + +void writelong_clobber(int address, int source, int tmp) +{ + writelong_general(address,source,tmp,1); +} + +void writelong(int address, int source, int tmp) +{ + writelong_general(address,source,tmp,0); +} + + + +/* This version assumes that it is reading *real* memory, and *will* fail + * if that assumption is wrong! No branches, no second chances, just + * straight go-for-it attitude */ + +static void readmem_real(int address, int dest, int size, int tmp) +{ + int f=tmp; + + if (size==4 && address!=dest) + f=dest; + +#ifdef NATMEM_OFFSET + if (canbang) { /* Woohoo! go directly at the memory! */ + switch(size) { + case 1: mov_b_brR(dest,address,MEMBaseDiff); break; + case 2: mov_w_brR(dest,address,MEMBaseDiff); mid_bswap_16(dest); break; + case 4: mov_l_brR(dest,address,MEMBaseDiff); mid_bswap_32(dest); break; + } + forget_about(tmp); + (void) f; + return; + } +#endif + +#ifdef UAE + mov_l_rr(f,address); + shrl_l_ri(f,16); /* The index into the baseaddr table */ + mov_l_rm_indexed(f,uae_p32(baseaddr),f,SIZEOF_VOID_P); /* FIXME: is SIZEOF_VOID_P correct? */ + /* f now holds the offset */ + + switch(size) { + case 1: mov_b_rrm_indexed(dest,address,f,1); break; + case 2: mov_w_rrm_indexed(dest,address,f,1); mid_bswap_16(dest); break; + case 4: mov_l_rrm_indexed(dest,address,f,1); mid_bswap_32(dest); break; + } + forget_about(tmp); +#endif +} + + + +#ifdef UAE +static inline void readmem(int address, int dest, int offset, int size, int tmp) +{ + int f=tmp; + + mov_l_rr(f,address); + shrl_l_ri(f,16); /* The index into the mem bank table */ + mov_l_rm_indexed(f,uae_p32(mem_banks),f,SIZEOF_VOID_P); /* FIXME: is SIZEOF_VOID_P correct? */ + /* Now f holds a pointer to the actual membank */ + mov_l_rR(f,f,offset); + /* Now f holds the address of the b/w/lget function */ + call_r_11(dest,f,address,size,4); + forget_about(tmp); +} +#endif + +void readbyte(int address, int dest, int tmp) +{ +#ifdef UAE + if ((special_mem & S_READ) || distrust_byte()) + readmem_special(address, dest, 2 * SIZEOF_VOID_P, 1, tmp); + else +#endif + readmem_real(address,dest,1,tmp); +} + +void readword(int address, int dest, int tmp) +{ +#ifdef UAE + if ((special_mem & S_READ) || distrust_word()) + readmem_special(address, dest, 1 * SIZEOF_VOID_P, 2, tmp); + else +#endif + readmem_real(address,dest,2,tmp); +} + +void readlong(int address, int dest, int tmp) +{ +#ifdef UAE + if ((special_mem & S_READ) || distrust_long()) + readmem_special(address, dest, 0 * SIZEOF_VOID_P, 4, tmp); + else +#endif + readmem_real(address,dest,4,tmp); +} + +void get_n_addr(int address, int dest, int tmp) +{ +#ifdef UAE + if (special_mem || distrust_addr()) { + /* This one might appear a bit odd... */ + readmem(address, dest, 6 * SIZEOF_VOID_P, 4, tmp); + return; + } +#endif + + // a is the register containing the virtual address + // after the offset had been fetched + int a=tmp; + + // f is the register that will contain the offset + int f=tmp; + + // a == f == tmp if (address == dest) + if (address!=dest) { + a=address; + f=dest; + } + +#ifdef NATMEM_OFFSET + if (canbang) { +#if FIXED_ADDRESSING + lea_l_brr(dest,address,MEMBaseDiff); +#else +# error "Only fixed addressing mode supported" +#endif + forget_about(tmp); + (void) f; + (void) a; + return; + } +#endif + +#ifdef UAE + mov_l_rr(f,address); + mov_l_rr(dest,address); // gb-- nop if dest==address + shrl_l_ri(f,16); + mov_l_rm_indexed(f,uae_p32(baseaddr),f,SIZEOF_VOID_P); /* FIXME: is SIZEOF_VOID_P correct? */ + add_l(dest,f); + forget_about(tmp); +#endif +} + +void get_n_addr_jmp(int address, int dest, int tmp) +{ +#ifdef WINUAE_ARANYM + /* For this, we need to get the same address as the rest of UAE + would --- otherwise we end up translating everything twice */ + get_n_addr(address,dest,tmp); +#else + int f=tmp; + if (address!=dest) + f=dest; + mov_l_rr(f,address); + shrl_l_ri(f,16); /* The index into the baseaddr bank table */ + mov_l_rm_indexed(dest,uae_p32(baseaddr),f,SIZEOF_VOID_P); /* FIXME: is SIZEOF_VOID_P correct? */ + add_l(dest,address); + and_l_ri (dest, ~1); + forget_about(tmp); +#endif +} + + +/* base is a register, but dp is an actual value. + target is a register, as is tmp */ +void calc_disp_ea_020(int base, uae_u32 dp, int target, int tmp) +{ + int reg = (dp >> 12) & 15; + int regd_shift=(dp >> 9) & 3; + + if (dp & 0x100) { + int ignorebase=(dp&0x80); + int ignorereg=(dp&0x40); + int addbase=0; + int outer=0; + + if ((dp & 0x30) == 0x20) addbase = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + if ((dp & 0x30) == 0x30) addbase = comp_get_ilong((m68k_pc_offset+=4)-4); + + if ((dp & 0x3) == 0x2) outer = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + if ((dp & 0x3) == 0x3) outer = comp_get_ilong((m68k_pc_offset+=4)-4); + + if ((dp & 0x4) == 0) { /* add regd *before* the get_long */ + if (!ignorereg) { + if ((dp & 0x800) == 0) + sign_extend_16_rr(target,reg); + else + mov_l_rr(target,reg); + shll_l_ri(target,regd_shift); + } + else + mov_l_ri(target,0); + + /* target is now regd */ + if (!ignorebase) + add_l(target,base); + add_l_ri(target,addbase); + if (dp&0x03) readlong(target,target,tmp); + } else { /* do the getlong first, then add regd */ + if (!ignorebase) { + mov_l_rr(target,base); + add_l_ri(target,addbase); + } + else + mov_l_ri(target,addbase); + if (dp&0x03) readlong(target,target,tmp); + + if (!ignorereg) { + if ((dp & 0x800) == 0) + sign_extend_16_rr(tmp,reg); + else + mov_l_rr(tmp,reg); + shll_l_ri(tmp,regd_shift); + /* tmp is now regd */ + add_l(target,tmp); + } + } + add_l_ri(target,outer); + } + else { /* 68000 version */ + if ((dp & 0x800) == 0) { /* Sign extend */ + sign_extend_16_rr(target,reg); + lea_l_brr_indexed(target,base,target,1< : actual translation cache size : %d KB at %p-%p", cache_size, compiled_code, compiled_code + cache_size*1024); +#ifdef USE_DATA_BUFFER + max_compile_start = compiled_code + cache_size*1024 - BYTES_PER_INST - DATA_BUFFER_SIZE; +#else + max_compile_start = compiled_code + cache_size*1024 - BYTES_PER_INST; +#endif + current_compile_p = compiled_code; + current_cache_size = 0; +#if defined(USE_DATA_BUFFER) + reset_data_buffer(); +#endif + } +} + +static void calc_checksum(blockinfo* bi, uae_u32* c1, uae_u32* c2) +{ + uae_u32 k1 = 0; + uae_u32 k2 = 0; + +#if USE_CHECKSUM_INFO + checksum_info *csi = bi->csi; + Dif(!csi) abort(); + while (csi) { + uae_s32 len = csi->length; + uintptr tmp = (uintptr)csi->start_p; +#else + uae_s32 len = bi->len; + uintptr tmp = (uintptr)bi->min_pcp; +#endif + uae_u32* pos; + + len += (tmp & 3); + tmp &= ~((uintptr)3); + pos = (uae_u32 *)tmp; + + if (len >= 0 && len <= MAX_CHECKSUM_LEN) { + while (len > 0) { + k1 += *pos; + k2 ^= *pos; + pos++; + len -= 4; + } + } + +#if USE_CHECKSUM_INFO + csi = csi->next; + } +#endif + + *c1 = k1; + *c2 = k2; +} + +#if 0 +static void show_checksum(CSI_TYPE* csi) +{ + uae_u32 k1=0; + uae_u32 k2=0; + uae_s32 len=CSI_LENGTH(csi); + uae_u32 tmp=(uintptr)CSI_START_P(csi); + uae_u32* pos; + + len+=(tmp&3); + tmp&=(~3); + pos=(uae_u32*)tmp; + + if (len<0 || len>MAX_CHECKSUM_LEN) { + return; + } + else { + while (len>0) { + jit_log("%08x ",*pos); + pos++; + len-=4; + } + jit_log(" bla"); + } +} +#endif + + +int check_for_cache_miss(void) +{ + blockinfo* bi=get_blockinfo_addr(regs.pc_p); + + if (bi) { + int cl=cacheline(regs.pc_p); + if (bi!=cache_tags[cl+1].bi) { + raise_in_cl_list(bi); + return 1; + } + } + return 0; +} + + +static void recompile_block(void) +{ + /* An existing block's countdown code has expired. We need to make + sure that execute_normal doesn't refuse to recompile due to a + perceived cache miss... */ + blockinfo* bi=get_blockinfo_addr(regs.pc_p); + + Dif (!bi) + jit_abort("recompile_block"); + raise_in_cl_list(bi); + execute_normal(); + return; +} +static void cache_miss(void) +{ + blockinfo* bi=get_blockinfo_addr(regs.pc_p); +#if COMP_DEBUG + uae_u32 cl=cacheline(regs.pc_p); + blockinfo* bi2=get_blockinfo(cl); +#endif + + if (!bi) { + execute_normal(); /* Compile this block now */ + return; + } + Dif (!bi2 || bi==bi2) { + jit_abort("Unexplained cache miss %p %p",bi,bi2); + } + raise_in_cl_list(bi); + return; +} + +static int called_check_checksum(blockinfo* bi); + +static inline int block_check_checksum(blockinfo* bi) +{ + uae_u32 c1,c2; + bool isgood; + + if (bi->status!=BI_NEED_CHECK) + return 1; /* This block is in a checked state */ + + if (bi->c1 || bi->c2) + calc_checksum(bi,&c1,&c2); + else { + c1=c2=1; /* Make sure it doesn't match */ + } + + isgood=(c1==bi->c1 && c2==bi->c2); + + if (isgood) { + /* This block is still OK. So we reactivate. Of course, that + means we have to move it into the needs-to-be-flushed list */ + bi->handler_to_use=bi->handler; + set_dhtu(bi,bi->direct_handler); + bi->status=BI_CHECKING; + isgood=called_check_checksum(bi) != 0; + } + if (isgood) { + jit_log2("reactivate %p/%p (%x %x/%x %x)",bi,bi->pc_p, c1,c2,bi->c1,bi->c2); + remove_from_list(bi); + add_to_active(bi); + raise_in_cl_list(bi); + bi->status=BI_ACTIVE; + } + else { + /* This block actually changed. We need to invalidate it, + and set it up to be recompiled */ + jit_log2("discard %p/%p (%x %x/%x %x)",bi,bi->pc_p, c1,c2,bi->c1,bi->c2); + invalidate_block(bi); + raise_in_cl_list(bi); + } + return isgood; +} + +static int called_check_checksum(blockinfo* bi) +{ + int isgood=1; + int i; + + for (i=0;i<2 && isgood;i++) { + if (bi->dep[i].jmp_off) { + isgood=block_check_checksum(bi->dep[i].target); + } + } + return isgood; +} + +static void check_checksum(void) +{ + blockinfo* bi=get_blockinfo_addr(regs.pc_p); + uae_u32 cl=cacheline(regs.pc_p); + blockinfo* bi2=get_blockinfo(cl); + + /* These are not the droids you are looking for... */ + if (!bi) { + /* Whoever is the primary target is in a dormant state, but + calling it was accidental, and we should just compile this + new block */ + execute_normal(); + return; + } + if (bi!=bi2) { + /* The block was hit accidentally, but it does exist. Cache miss */ + cache_miss(); + return; + } + + if (!block_check_checksum(bi)) + execute_normal(); +} + +static inline void match_states(blockinfo* bi) +{ + int i; + smallstate* s=&(bi->env); + + if (bi->status==BI_NEED_CHECK) { + block_check_checksum(bi); + } + if (bi->status==BI_ACTIVE || + bi->status==BI_FINALIZING) { /* Deal with the *promises* the + block makes (about not using + certain vregs) */ + for (i=0;i<16;i++) { + if (s->virt[i]==L_UNNEEDED) { + jit_log2("unneeded reg %d at %p",i,target); + COMPCALL(forget_about)(i); // FIXME + } + } + } + flush(1); + + /* And now deal with the *demands* the block makes */ + for (i=0;inat[i]; + if (v>=0) { + // printf("Loading reg %d into %d at %p\n",v,i,target); + readreg_specific(v,4,i); + // do_load_reg(i,v); + // setlock(i); + } + } + for (i=0;inat[i]; + if (v>=0) { + unlock2(i); + } + } +} + +static inline void create_popalls(void) +{ + int i,r; + + if (popallspace == NULL) { + if ((popallspace = alloc_code(POPALLSPACE_SIZE)) == NULL) { + jit_log("WARNING: Could not allocate popallspace!"); +#ifdef UAE + if (currprefs.cachesize > 0) +#endif + { + jit_abort("Could not allocate popallspace!"); + } +#ifdef UAE + /* This is not fatal if JIT is not used. If JIT is + * turned on, it will crash, but it would have crashed + * anyway. */ + return; +#endif + } + } + vm_protect(popallspace, POPALLSPACE_SIZE, VM_PAGE_READ | VM_PAGE_WRITE); + + int stack_space = STACK_OFFSET; + for (i=0;idirect_pen=(cpuop_func*)get_target(); + compemu_raw_mov_l_rm(0, JITPTR &(bi->pc_p)); + compemu_raw_mov_l_mr(JITPTR ®s.pc_p,0); + compemu_raw_jmp(JITPTR popall_execute_normal); + + align_target(align_jumps); + bi->direct_pcc=(cpuop_func*)get_target(); + compemu_raw_mov_l_rm(0, JITPTR &(bi->pc_p)); + compemu_raw_mov_l_mr(JITPTR ®s.pc_p,0); + compemu_raw_jmp(JITPTR popall_check_checksum); + flush_cpu_icache((void *)current_compile_p, (void *)target); + current_compile_p=get_target(); + + bi->deplist=NULL; + for (i=0;i<2;i++) { + bi->dep[i].prev_p=NULL; + bi->dep[i].next=NULL; + } + bi->env=default_ss; + bi->status=BI_INVALID; + bi->havestate=0; + //bi->env=empty_ss; +} + +#ifdef UAE +void compemu_reset(void) +{ + flush_icache = lazy_flush ? flush_icache_lazy : flush_icache_hard; + set_cache_state(0); +} +#endif + +#ifdef UAE +#else +// OPCODE is in big endian format, use cft_map() beforehand, if needed. +#endif +static inline void reset_compop(int opcode) +{ + compfunctbl[opcode] = NULL; + nfcompfunctbl[opcode] = NULL; +} + +static int read_opcode(const char *p) +{ + int opcode = 0; + for (int i = 0; i < 4; i++) { + int op = p[i]; + switch (op) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + opcode = (opcode << 4) | (op - '0'); + break; + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + opcode = (opcode << 4) | ((op - 'a') + 10); + break; + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + opcode = (opcode << 4) | ((op - 'A') + 10); + break; + default: + return -1; + } + } + return opcode; +} + + +#ifdef USE_JIT_FPU +static struct { + const char *name; + bool *const disabled; +} const jit_opcodes[] = { + { "fbcc", &jit_disable.fbcc }, + { "fdbcc", &jit_disable.fdbcc }, + { "fscc", &jit_disable.fscc }, + { "ftrapcc", &jit_disable.ftrapcc }, + { "fsave", &jit_disable.fsave }, + { "frestore", &jit_disable.frestore }, + { "fmove", &jit_disable.fmove }, + { "fmovec", &jit_disable.fmovec }, + { "fmovem", &jit_disable.fmovem }, + { "fmovecr", &jit_disable.fmovecr }, + { "fint", &jit_disable.fint }, + { "fsinh", &jit_disable.fsinh }, + { "fintrz", &jit_disable.fintrz }, + { "fsqrt", &jit_disable.fsqrt }, + { "flognp1", &jit_disable.flognp1 }, + { "fetoxm1", &jit_disable.fetoxm1 }, + { "ftanh", &jit_disable.ftanh }, + { "fatan", &jit_disable.fatan }, + { "fasin", &jit_disable.fasin }, + { "fatanh", &jit_disable.fatanh }, + { "fsin", &jit_disable.fsin }, + { "ftan", &jit_disable.ftan }, + { "fetox", &jit_disable.fetox }, + { "ftwotox", &jit_disable.ftwotox }, + { "ftentox", &jit_disable.ftentox }, + { "flogn", &jit_disable.flogn }, + { "flog10", &jit_disable.flog10 }, + { "flog2", &jit_disable.flog2 }, + { "fabs", &jit_disable.fabs }, + { "fcosh", &jit_disable.fcosh }, + { "fneg", &jit_disable.fneg }, + { "facos", &jit_disable.facos }, + { "fcos", &jit_disable.fcos }, + { "fgetexp", &jit_disable.fgetexp }, + { "fgetman", &jit_disable.fgetman }, + { "fdiv", &jit_disable.fdiv }, + { "fmod", &jit_disable.fmod }, + { "fadd", &jit_disable.fadd }, + { "fmul", &jit_disable.fmul }, + { "fsgldiv", &jit_disable.fsgldiv }, + { "frem", &jit_disable.frem }, + { "fscale", &jit_disable.fscale }, + { "fsglmul", &jit_disable.fsglmul }, + { "fsub", &jit_disable.fsub }, + { "fsincos", &jit_disable.fsincos }, + { "fcmp", &jit_disable.fcmp }, + { "ftst", &jit_disable.ftst }, +}; + +static bool read_fpu_opcode(const char *p, size_t len) +{ + unsigned int i; + + for (i = 0; i < (sizeof(jit_opcodes) / sizeof(jit_opcodes[0])); i++) + { + if (len == strlen(jit_opcodes[i].name) && _tcsnicmp(jit_opcodes[i].name, p, len) == 0) + { + *jit_opcodes[i].disabled = true; + jit_log(" : disabled %s", jit_opcodes[i].name); + return true; + } + } + return false; +} +#endif + +static bool merge_blacklist2(const char *blacklist) +{ +#ifdef USE_JIT_FPU + for (unsigned int i = 0; i < (sizeof(jit_opcodes) / sizeof(jit_opcodes[0])); i++) + *jit_opcodes[i].disabled = false; +#endif + if (blacklist[0] != '\0') { + const char *p = blacklist; + for (;;) { + size_t len; + if (*p == 0) + return true; + + const char *endp = strchr(p, ','); + if (endp) { + len = endp - p; + } else { + len = uaestrlen(p); + } + + TCHAR *s = au(p); + bool found = false; + for (int i = 0; lookuptab[i].name[0]; i++) { + if (!_tcsnicmp(s, lookuptab[i].name, len) && _tcslen(lookuptab[i].name) == len) { + int mnemo = lookuptab[i].mnemo; + for (int opcode = 0; opcode < 0xf000; opcode++) { + struct instr *table = &table68k[opcode]; + if (table->mnemo == mnemo) { + reset_compop(cft_map(opcode)); + if (currprefs.cachesize) { + jit_log(" : blacklist opcode : %04x", opcode); + } + found = true; + } + } + if (found) { + p += len; + if (*p) + p++; + } + } + } + xfree(s); + if (found) + continue; +#ifdef USE_JIT_FPU + if (read_fpu_opcode(p, len)) { + p += len; + if (*p) + p++; + continue; + } +#endif + int opcode1 = read_opcode(p); + if (opcode1 < 0) + { + bug(" : invalid opcode %s", p); + return false; + } + p += 4; + int opcode2 = opcode1; + if (*p == '-') { + p++; + opcode2 = read_opcode(p); + if (opcode2 < 0) + { + bug(" : invalid opcode %s", p); + return false; + } + p += 4; + } + + if (*p == 0 || *p == ',') { + if (currprefs.cachesize) { + jit_log(" : blacklist opcodes : %04x-%04x", opcode1, opcode2); + } + for (int opcode = opcode1; opcode <= opcode2; opcode++) + reset_compop(cft_map(opcode)); + + if (*(p++) == ',') + continue; + + return true; + } + + return false; + } + } + return true; +} + +static bool merge_blacklist(void) +{ + bool ret; +#ifdef UAE + const char *blacklist = ua(currprefs.jitblacklist); + ret = merge_blacklist2(blacklist); + xfree((void*)blacklist); +#else + const char *blacklist = bx_options.jit.jitblacklist; + ret = merge_blacklist2(blacklist); +#endif + return ret; +} + +void build_comp(void) +{ +#ifdef FSUAE + if (!g_fs_uae_jit_compiler) { + jit_log("JIT: JIT compiler is not enabled"); + return; + } +#endif + int i, j; + unsigned long opcode; + const struct comptbl* tbl=op_smalltbl_0_comp_ff; + const struct comptbl* nftbl=op_smalltbl_0_comp_nf; + int count; +#ifdef WINUAE_ARANYM + unsigned int cpu_level = 4; // 68040 + const struct cputbl *nfctbl = op_smalltbl_0_nf; +#else + unsigned int cpu_level = (currprefs.cpu_model - 68000) / 10; + if (cpu_level > 4) + cpu_level--; +#ifdef NOFLAGS_SUPPORT_GENCOMP + extern const struct cputbl *uaegetjitcputbl(void); + const struct cputbl *nfctbl = uaegetjitcputbl(); +#endif +#endif + // Initialize target CPU (check for features, e.g. CMOV, rat stalls) + raw_init_cpu(); + +#ifdef NATMEM_OFFSET +#ifdef UAE +#ifdef JIT_EXCEPTION_HANDLER + install_exception_handler(); +#endif +#endif +#endif + + jit_log(" : building compiler function tables"); + + for (opcode = 0; opcode < 65536; opcode++) { + reset_compop(opcode); +#ifdef NOFLAGS_SUPPORT_GENCOMP + nfcpufunctbl[opcode] = op_illg; +#endif + prop[opcode].use_flags = FLAG_ALL; + prop[opcode].set_flags = FLAG_ALL; + prop[opcode].cflow = fl_trap; // ILLEGAL instructions do trap + } + + for (i = 0; tbl[i].opcode < 65536; i++) { + int cflow = table68k[tbl[i].opcode].cflow; + if (follow_const_jumps && (tbl[i].specific & COMP_OPCODE_ISCJUMP)) + cflow = fl_const_jump; + else + cflow &= ~fl_const_jump; + prop[cft_map(tbl[i].opcode)].cflow = cflow; + + bool uses_fpu = (tbl[i].specific & COMP_OPCODE_USES_FPU) != 0; + if (uses_fpu && avoid_fpu) + compfunctbl[cft_map(tbl[i].opcode)] = NULL; + else + compfunctbl[cft_map(tbl[i].opcode)] = tbl[i].handler; + } + + for (i = 0; nftbl[i].opcode < 65536; i++) { + bool uses_fpu = (tbl[i].specific & COMP_OPCODE_USES_FPU) != 0; + if (uses_fpu && avoid_fpu) + nfcompfunctbl[cft_map(nftbl[i].opcode)] = NULL; + else + nfcompfunctbl[cft_map(nftbl[i].opcode)] = nftbl[i].handler; + for (j = 0; nfctbl[j].handler_ff; j++) { + if (nfctbl[j].opcode == nftbl[i].opcode) { +#ifdef NOFLAGS_SUPPORT_GENCOMP +#ifdef NOFLAGS_SUPPORT_GENCPU + nfcpufunctbl[cft_map(nftbl[i].opcode)] = nfctbl[j].handler_nf; +#else + nfcpufunctbl[cft_map(nftbl[i].opcode)] = nfctbl[j].handler_ff; +#endif +#endif + break; + } + } + if (!nfctbl[j].handler_ff && currprefs.cachesize) { + int mnemo = table68k[nftbl[i].opcode].mnemo; + struct mnemolookup *lookup; + for (lookup = lookuptab; lookup->mnemo != mnemo; lookup++) + ; + char *s = ua(lookup->name); + jit_log("%04x (%s) unavailable", nftbl[i].opcode, s); + xfree(s); + } + } + +#ifdef NOFLAGS_SUPPORT_GENCOMP +#ifdef NOFLAGS_SUPPORT_GENCPU + for (i = 0; nfctbl[i].handler_nf; i++) { + nfcpufunctbl[cft_map(nfctbl[i].opcode)] = nfctbl[i].handler_nf; + } +#else + for (i = 0; nfctbl[i].handler_ff; i++) { + nfcpufunctbl[cft_map(nfctbl[i].opcode)] = nfctbl[i].handler_ff; + } +#endif +#endif + + for (opcode = 0; opcode < 65536; opcode++) { + compop_func *f; + compop_func *nff; +#ifdef NOFLAGS_SUPPORT_GENCOMP + cpuop_func *nfcf; +#endif + int isaddx; + int cflow; + + if (table68k[opcode].mnemo == i_ILLG || table68k[opcode].clev > cpu_level) + continue; + + if (table68k[opcode].handler != -1) { + f = compfunctbl[cft_map(table68k[opcode].handler)]; + nff = nfcompfunctbl[cft_map(table68k[opcode].handler)]; +#ifdef NOFLAGS_SUPPORT_GENCOMP + nfcf = nfcpufunctbl[cft_map(table68k[opcode].handler)]; +#endif + isaddx = prop[cft_map(table68k[opcode].handler)].is_addx; + prop[cft_map(opcode)].is_addx = isaddx; + cflow = prop[cft_map(table68k[opcode].handler)].cflow; + prop[cft_map(opcode)].cflow = cflow; + compfunctbl[cft_map(opcode)] = f; + nfcompfunctbl[cft_map(opcode)] = nff; +#ifdef NOFLAGS_SUPPORT_GENCOMP + Dif (nfcf == op_illg) + abort(); + nfcpufunctbl[cft_map(opcode)] = nfcf; +#endif + } + prop[cft_map(opcode)].set_flags = table68k[opcode].flagdead; + prop[cft_map(opcode)].use_flags = table68k[opcode].flaglive; + /* Unconditional jumps don't evaluate condition codes, so they + * don't actually use any flags themselves */ + if (prop[cft_map(opcode)].cflow & fl_const_jump) + prop[cft_map(opcode)].use_flags = 0; + } +#ifdef NOFLAGS_SUPPORT_GENCOMP +#ifdef NOFLAGS_SUPPORT_GENCPU + for (i = 0; nfctbl[i].handler_nf != NULL; i++) { + if (nfctbl[i].specific) + nfcpufunctbl[cft_map(tbl[i].opcode)] = nfctbl[i].handler_nf; + } +#else + for (i = 0; nfctbl[i].handler_ff != NULL; i++) { + if (nfctbl[i].specific) + nfcpufunctbl[cft_map(tbl[i].opcode)] = nfctbl[i].handler_ff; + } +#endif +#endif + + /* Merge in blacklist */ + if (!merge_blacklist()) + { + jit_log(" : blacklist merge failure!"); + } + + count=0; + for (opcode = 0; opcode < 65536; opcode++) { + if (compfunctbl[cft_map(opcode)]) + count++; + } + jit_log(" : supposedly %d compileable opcodes!",count); + + /* Initialise state */ + create_popalls(); + alloc_cache(); + reset_lists(); + + for (i=0;ipc_p)].handler=(cpuop_func*)popall_execute_normal; + cache_tags[cacheline(bi->pc_p)+1].bi=NULL; + dbi=bi; bi=bi->next; + free_blockinfo(dbi); + } + bi=dormant; + while(bi) { + cache_tags[cacheline(bi->pc_p)].handler=(cpuop_func*)popall_execute_normal; + cache_tags[cacheline(bi->pc_p)+1].bi=NULL; + dbi=bi; bi=bi->next; + free_blockinfo(dbi); + } + + reset_lists(); + if (!compiled_code) + return; + +#if defined(USE_DATA_BUFFER) + reset_data_buffer(); +#endif + + current_compile_p=compiled_code; +#ifdef UAE + set_special(0); /* To get out of compiled code */ +#else + SPCFLAGS_SET( SPCFLAG_JIT_EXEC_RETURN ); /* To get out of compiled code */ +#endif +} + + +/* "Soft flushing" --- instead of actually throwing everything away, + we simply mark everything as "needs to be checked". +*/ + +static inline void flush_icache_lazy(int v) +{ + blockinfo* bi; + blockinfo* bi2; + + if (!active) + return; + + bi=active; + while (bi) { + uae_u32 cl=cacheline(bi->pc_p); + if (bi->status==BI_INVALID || + bi->status==BI_NEED_RECOMP) { + if (bi==cache_tags[cl+1].bi) + cache_tags[cl].handler=(cpuop_func*)popall_execute_normal; + bi->handler_to_use=(cpuop_func*)popall_execute_normal; + set_dhtu(bi,bi->direct_pen); + bi->status=BI_INVALID; + } + else { + if (bi==cache_tags[cl+1].bi) + cache_tags[cl].handler=(cpuop_func*)popall_check_checksum; + bi->handler_to_use=(cpuop_func*)popall_check_checksum; + set_dhtu(bi,bi->direct_pcc); + bi->status=BI_NEED_CHECK; + } + bi2=bi; + bi=bi->next; + } + /* bi2 is now the last entry in the active list */ + bi2->next=dormant; + if (dormant) + dormant->prev_p=&(bi2->next); + + dormant=active; + active->prev_p=&dormant; + active=NULL; +} + + +#if 0 +static void flush_icache_range(uae_u32 start, uae_u32 length) +{ + if (!active) + return; + +#if LAZY_FLUSH_ICACHE_RANGE + uae_u8 *start_p = get_real_address(start); + blockinfo *bi = active; + while (bi) { +#if USE_CHECKSUM_INFO + bool invalidate = false; + for (checksum_info *csi = bi->csi; csi && !invalidate; csi = csi->next) + invalidate = (((start_p - csi->start_p) < csi->length) || + ((csi->start_p - start_p) < length)); +#else + // Assume system is consistent and would invalidate the right range + const bool invalidate = (bi->pc_p - start_p) < length; +#endif + if (invalidate) { + uae_u32 cl = cacheline(bi->pc_p); + if (bi == cache_tags[cl + 1].bi) + cache_tags[cl].handler = (cpuop_func *)popall_execute_normal; + bi->handler_to_use = (cpuop_func *)popall_execute_normal; + set_dhtu(bi, bi->direct_pen); + bi->status = BI_NEED_RECOMP; + } + bi = bi->next; + } + return; +#else + UNUSED(start); + UNUSED(length); +#endif + flush_icache(); +} +#endif + + +int failure; + +#ifdef UAE +#if defined(HAVE_GET_WORD_UNSWAPPED) +#define DO_GET_OPCODE(a) (do_get_mem_word_unswapped((uae_u16*)(a))) +#else +static inline unsigned int get_opcode_cft_map(unsigned int f) +{ + return uae_bswap_16(f); +} +#define DO_GET_OPCODE(a) (get_opcode_cft_map((uae_u16)*(a))) +#endif +#else +#if defined(HAVE_GET_WORD_UNSWAPPED) && !defined(FULLMMU) +# define DO_GET_OPCODE(a) (do_get_mem_word_unswapped((uae_u16 *)(a))) +#else +# define DO_GET_OPCODE(a) (do_get_mem_word((uae_u16 *)(a))) +#endif +#endif + +#ifdef JIT_DEBUG +static uae_u8 *last_regs_pc_p = 0; +static uae_u8 *last_compiled_block_addr = 0; + +void compiler_dumpstate(void) +{ + if (!JITDebug) + return; + + jit_log("### Host addresses"); + jit_log("MEM_BASE : %lx", (unsigned long)MEMBaseDiff); + jit_log("PC_P : %p", ®s.pc_p); + jit_log("SPCFLAGS : %p", ®s.spcflags); + jit_log("D0-D7 : %p-%p", ®s.regs[0], ®s.regs[7]); + jit_log("A0-A7 : %p-%p", ®s.regs[8], ®s.regs[15]); + jit_log(" "); + + jit_log("### M68k processor state"); + m68k_dumpstate(stderr, 0); + jit_log(" "); + + jit_log("### Block in Atari address space"); + jit_log("M68K block : %p", + (void *)(uintptr)last_regs_pc_p); + if (last_regs_pc_p != 0) { + jit_log("Native block : %p (%d bytes)", + (void *)last_compiled_block_addr, + get_blockinfo_addr(last_regs_pc_p)->direct_handler_size); + } + jit_log(" "); +} +#endif + + +#if 0 /* debugging helpers; activate as needed */ +static void print_exc_frame(uae_u32 opcode) +{ + int nr = (opcode & 0x0f) + 32; + if (nr != 0x45 && /* Timer-C */ + nr != 0x1c && /* VBL */ + nr != 0x46) /* ACIA */ + { + memptr sp = m68k_areg(regs, 7); + uae_u16 sr = get_word(sp); + fprintf(stderr, "Exc:%02x SP: %08x USP: %08x SR: %04x PC: %08x Format: %04x", nr, sp, regs.usp, sr, get_long(sp + 2), get_word(sp + 6)); + if (nr >= 32 && nr < 48) + { + fprintf(stderr, " Opcode: $%04x", sr & 0x2000 ? get_word(sp + 8) : get_word(regs.usp)); + } + fprintf(stderr, "\n"); + } +} + +static void push_all_nat(void) +{ + raw_pushfl(); + raw_push_l_r(EAX_INDEX); + raw_push_l_r(ECX_INDEX); + raw_push_l_r(EDX_INDEX); + raw_push_l_r(EBX_INDEX); + raw_push_l_r(EBP_INDEX); + raw_push_l_r(EDI_INDEX); + raw_push_l_r(ESI_INDEX); + raw_push_l_r(R8_INDEX); + raw_push_l_r(R9_INDEX); + raw_push_l_r(R10_INDEX); + raw_push_l_r(R11_INDEX); + raw_push_l_r(R12_INDEX); + raw_push_l_r(R13_INDEX); + raw_push_l_r(R14_INDEX); + raw_push_l_r(R15_INDEX); +} + +static void pop_all_nat(void) +{ + raw_pop_l_r(R15_INDEX); + raw_pop_l_r(R14_INDEX); + raw_pop_l_r(R13_INDEX); + raw_pop_l_r(R12_INDEX); + raw_pop_l_r(R11_INDEX); + raw_pop_l_r(R10_INDEX); + raw_pop_l_r(R9_INDEX); + raw_pop_l_r(R8_INDEX); + raw_pop_l_r(ESI_INDEX); + raw_pop_l_r(EDI_INDEX); + raw_pop_l_r(EBP_INDEX); + raw_pop_l_r(EBX_INDEX); + raw_pop_l_r(EDX_INDEX); + raw_pop_l_r(ECX_INDEX); + raw_pop_l_r(EAX_INDEX); + raw_popfl(); +} +#endif + +#if 0 +static void print_inst(void) +{ + disasm_m68k_block(regs.fault_pc + (uint8 *)MEMBaseDiff, 1); +} +#endif + + +#ifdef UAE +void compile_block(cpu_history *pc_hist, int blocklen, int totcycles) +{ + if (cache_enabled && compiled_code && currprefs.cpu_model >= 68020) { +#else +static void compile_block(cpu_history* pc_hist, int blocklen) +{ + if (cache_enabled && compiled_code) { +#endif +#ifdef PROFILE_COMPILE_TIME + compile_count++; + clock_t start_time = clock(); +#endif +#ifdef JIT_DEBUG + bool disasm_block = false; +#endif + + /* OK, here we need to 'compile' a block */ + int i; + int r; + int was_comp=0; + uae_u8 liveflags[MAXRUN+1]; +#if USE_CHECKSUM_INFO + bool trace_in_rom = isinrom((uintptr)pc_hist[0].location) != 0; + uintptr max_pcp=(uintptr)pc_hist[blocklen - 1].location; + uintptr min_pcp=max_pcp; +#else + uintptr max_pcp=(uintptr)pc_hist[0].location; + uintptr min_pcp=max_pcp; +#endif + uae_u32 cl=cacheline(pc_hist[0].location); + void* specflags=(void*)®s.spcflags; + blockinfo* bi=NULL; + blockinfo* bi2; + int extra_len=0; + + redo_current_block=0; + if (current_compile_p >= MAX_COMPILE_PTR) + flush_icache_hard(3); + + alloc_blockinfos(); + + bi=get_blockinfo_addr_new(pc_hist[0].location,0); + bi2=get_blockinfo(cl); + + optlev=bi->optlevel; + if (bi->status!=BI_INVALID) { + Dif (bi!=bi2) { + /* I don't think it can happen anymore. Shouldn't, in + any case. So let's make sure... */ + jit_abort("WOOOWOO count=%d, ol=%d %p %p", bi->count,bi->optlevel,bi->handler_to_use, cache_tags[cl].handler); + } + + Dif (bi->count!=-1 && bi->status!=BI_NEED_RECOMP) { + jit_abort("bi->count=%d, bi->status=%d,bi->optlevel=%d",bi->count,bi->status,bi->optlevel); + /* What the heck? We are not supposed to be here! */ + } + } + if (bi->count==-1) { + optlev++; + while (!optcount[optlev]) + optlev++; + bi->count=optcount[optlev]-1; + } + current_block_pc_p= JITPTR pc_hist[0].location; + + remove_deps(bi); /* We are about to create new code */ + bi->optlevel=optlev; + bi->pc_p=(uae_u8*)pc_hist[0].location; +#if USE_CHECKSUM_INFO + free_checksum_info_chain(bi->csi); + bi->csi = NULL; +#endif + + liveflags[blocklen]=FLAG_ALL; /* All flags needed afterwards */ + i=blocklen; + while (i--) { + uae_u16* currpcp=pc_hist[i].location; + uae_u32 op=DO_GET_OPCODE(currpcp); + +#if USE_CHECKSUM_INFO + trace_in_rom = trace_in_rom && isinrom((uintptr)currpcp); + if (follow_const_jumps && is_const_jump(op)) { + checksum_info *csi = alloc_checksum_info(); + csi->start_p = (uae_u8 *)min_pcp; + csi->length = JITPTR max_pcp - JITPTR min_pcp + LONGEST_68K_INST; + csi->next = bi->csi; + bi->csi = csi; + max_pcp = (uintptr)currpcp; + } + min_pcp = (uintptr)currpcp; +#else + if ((uintptr)currpcpmax_pcp) + max_pcp=(uintptr)currpcp; +#endif + +#ifdef UAE + if (!currprefs.compnf) { + liveflags[i]=FLAG_ALL; + } + else +#endif + { + liveflags[i] = ((liveflags[i+1] & (~prop[op].set_flags))|prop[op].use_flags); + if (prop[op].is_addx && (liveflags[i+1]&FLAG_Z)==0) + liveflags[i]&= ~FLAG_Z; + } + } + +#if USE_CHECKSUM_INFO + checksum_info *csi = alloc_checksum_info(); + csi->start_p = (uae_u8 *)min_pcp; + csi->length = JITPTR max_pcp - JITPTR min_pcp + LONGEST_68K_INST; + csi->next = bi->csi; + bi->csi = csi; +#endif + + bi->needed_flags=liveflags[0]; + + align_target(align_loops); + was_comp=0; + + bi->direct_handler=(cpuop_func*)get_target(); + set_dhtu(bi,bi->direct_handler); + bi->status=BI_COMPILING; + current_block_start_target= JITPTR get_target(); + + log_startblock(); + + if (bi->count>=0) { /* Need to generate countdown code */ + compemu_raw_mov_l_mi(JITPTR ®s.pc_p, JITPTR pc_hist[0].location); + compemu_raw_sub_l_mi(JITPTR &(bi->count),1); + compemu_raw_jl(JITPTR popall_recompile_block); + } + if (optlev==0) { /* No need to actually translate */ + /* Execute normally without keeping stats */ + compemu_raw_mov_l_mi(JITPTR ®s.pc_p, JITPTR pc_hist[0].location); + compemu_raw_jmp(JITPTR popall_exec_nostats); + } + else { + reg_alloc_run=0; + next_pc_p=0; + taken_pc_p=0; + branch_cc=0; // Only to be initialized. Will be set together with next_pc_p + + comp_pc_p=(uae_u8*)pc_hist[0].location; + init_comp(); + was_comp=1; + +#ifdef USE_CPU_EMUL_SERVICES + compemu_raw_sub_l_mi((uintptr)&emulated_ticks,blocklen); + compemu_raw_jcc_b_oponly(NATIVE_CC_GT); + uae_u8 *branchadd=get_target(); + skip_byte(); + raw_dec_sp(STACK_SHADOW_SPACE); + compemu_raw_call((uintptr)cpu_do_check_ticks); + raw_inc_sp(STACK_SHADOW_SPACE); + *branchadd=get_target()-(branchadd+1); +#endif + +#ifdef JIT_DEBUG + if (JITDebug) { + compemu_raw_mov_l_mi((uintptr)&last_regs_pc_p,(uintptr)pc_hist[0].location); + compemu_raw_mov_l_mi((uintptr)&last_compiled_block_addr,current_block_start_target); + } +#endif + + for (i=0;i1) { + failure=0; + if (!was_comp) { + comp_pc_p=(uae_u8*)pc_hist[i].location; + init_comp(); + } + was_comp=1; + +#if defined(HAVE_DISASM_NATIVE) && defined(HAVE_DISASM_M68K) +/* debugging helpers; activate as needed */ +#if 1 + disasm_this_inst = false; + const uae_u8 *start_m68k_thisinst = (const uae_u8 *)pc_hist[i].location; + uae_u8 *start_native_thisinst = get_target(); +#endif +#endif + +#ifdef WINUAE_ARANYM + bool isnop = do_get_mem_word(pc_hist[i].location) == 0x4e71 || + ((i + 1) < blocklen && do_get_mem_word(pc_hist[i+1].location) == 0x4e71); + + if (isnop) + compemu_raw_mov_l_mi((uintptr)®s.fault_pc, ((uintptr)(pc_hist[i].location)) - MEMBaseDiff); +#endif + + comptbl[opcode](opcode); + freescratch(); + if (!(liveflags[i+1] & FLAG_CZNV)) { + /* We can forget about flags */ + dont_care_flags(); + } +#if INDIVIDUAL_INST + flush(1); + nop(); + flush(1); + was_comp=0; +#endif +#ifdef WINUAE_ARANYM + /* + * workaround for buserror handling: on a "nop", write registers back + */ + if (isnop) + { + flush(1); + nop(); + was_comp=0; + } +#endif +#if defined(HAVE_DISASM_NATIVE) && defined(HAVE_DISASM_M68K) + +/* debugging helpers; activate as needed */ +#if 0 + disasm_m68k_block(start_m68k_thisinst, 1); + push_all_nat(); + compemu_raw_mov_l_mi(uae_p32(®s.fault_pc), (uintptr)start_m68k_thisinst - MEMBaseDiff); + raw_dec_sp(STACK_SHADOW_SPACE); + compemu_raw_call(uae_p32(print_instn)); + raw_inc_sp(STACK_SHADOW_SPACE); + pop_all_nat(); +#endif + + if (disasm_this_inst) + { + disasm_m68k_block(start_m68k_thisinst, 1); +#if 1 + disasm_native_block(start_native_thisinst, get_target() - start_native_thisinst); +#endif + +#if 0 + push_all_nat(); + + raw_dec_sp(STACK_SHADOW_SPACE); + compemu_raw_mov_l_ri(REG_PAR1, (uae_u32)cft_map(opcode)); + compemu_raw_call((uintptr)print_exc_frame); + raw_inc_sp(STACK_SHADOW_SPACE); + + pop_all_nat(); +#endif + + if (failure) + { + bug("(discarded)"); + target = start_native_thisinst; + } + } +#endif + } + + if (failure) { + if (was_comp) { + flush(1); + was_comp=0; + } + compemu_raw_mov_l_ri(REG_PAR1,(uae_u32)opcode); +#if USE_NORMAL_CALLING_CONVENTION + raw_push_l_r(REG_PAR1); +#endif + compemu_raw_mov_l_mi(JITPTR ®s.pc_p, JITPTR pc_hist[i].location); + raw_dec_sp(STACK_SHADOW_SPACE); + compemu_raw_call(JITPTR cputbl[opcode]); + raw_inc_sp(STACK_SHADOW_SPACE); +#ifdef PROFILE_UNTRANSLATED_INSNS + // raw_cputbl_count[] is indexed with plain opcode (in m68k order) + compemu_raw_add_l_mi((uintptr)&raw_cputbl_count[cft_map(opcode)],1); +#endif +#if USE_NORMAL_CALLING_CONVENTION + raw_inc_sp(4); +#endif + + if (i < blocklen - 1) { + uae_u8* branchadd; + + /* if (SPCFLAGS_TEST(SPCFLAG_ALL)) popall_do_nothing() */ + compemu_raw_mov_l_rm(0, JITPTR specflags); + compemu_raw_test_l_rr(0,0); +#if defined(USE_DATA_BUFFER) + data_check_end(8, 64); // just a pessimistic guess... +#endif + compemu_raw_jz_b_oponly(); + branchadd=get_target(); + skip_byte(); +#ifdef UAE + raw_sub_l_mi(uae_p32(&countdown),scaled_cycles(totcycles)); +#endif + compemu_raw_jmp(JITPTR popall_do_nothing); + *branchadd = JITPTR get_target() - (JITPTR branchadd + 1); + } + } + } +#if 1 /* This isn't completely kosher yet; It really needs to be + integrated into a general inter-block-dependency scheme */ + if (next_pc_p && taken_pc_p && + was_comp && taken_pc_p==current_block_pc_p) + { + blockinfo* bi1=get_blockinfo_addr_new((void*)next_pc_p,0); + blockinfo* bi2=get_blockinfo_addr_new((void*)taken_pc_p,0); + uae_u8 x=bi1->needed_flags; + + if (x==0xff || 1) { /* To be on the safe side */ + uae_u16* next=(uae_u16*)next_pc_p; + uae_u32 op=DO_GET_OPCODE(next); + + x=FLAG_ALL; + x&=(~prop[op].set_flags); + x|=prop[op].use_flags; + } + + x|=bi2->needed_flags; + if (!(x & FLAG_CZNV)) { + /* We can forget about flags */ + dont_care_flags(); + extra_len+=2; /* The next instruction now is part of this block */ + } + } +#endif + log_flush(); + + if (next_pc_p) { /* A branch was registered */ + uintptr t1=next_pc_p; + uintptr t2=taken_pc_p; + int cc=branch_cc; + + uae_u32* branchadd; + uae_u32* tba; + bigstate tmp; + blockinfo* tbi; + + if (taken_pc_penv))) { + mark_callers_recompile(bi); + } + + big_to_small_state(&live,&(bi->env)); +#endif + +#if USE_CHECKSUM_INFO + remove_from_list(bi); + if (trace_in_rom) { + // No need to checksum that block trace on cache invalidation + free_checksum_info_chain(bi->csi); + bi->csi = NULL; + add_to_dormant(bi); + } + else { + calc_checksum(bi,&(bi->c1),&(bi->c2)); + add_to_active(bi); + } +#else + if (next_pc_p+extra_len>=max_pcp && + next_pc_p+extra_lenlen=max_pcp-min_pcp; + bi->min_pcp=min_pcp; + + remove_from_list(bi); + if (isinrom(min_pcp) && isinrom(max_pcp)) { + add_to_dormant(bi); /* No need to checksum it on cache flush. + Please don't start changing ROMs in + flight! */ + } + else { + calc_checksum(bi,&(bi->c1),&(bi->c2)); + add_to_active(bi); + } +#endif + + current_cache_size += JITPTR get_target() - JITPTR current_compile_p; + +#ifdef JIT_DEBUG + bi->direct_handler_size = get_target() - (uae_u8 *)current_block_start_target; + + if (JITDebug && disasm_block) { + uaecptr block_addr = start_pc + ((char *)pc_hist[0].location - (char *)start_pc_p); + jit_log("M68K block @ 0x%08x (%d insns)", block_addr, blocklen); + uae_u32 block_size = ((uae_u8 *)pc_hist[blocklen - 1].location - (uae_u8 *)pc_hist[0].location) + 1; +#ifdef WINUAE_ARANYM + disasm_m68k_block((const uae_u8 *)pc_hist[0].location, block_size); +#endif + jit_log("Compiled block @ %p", pc_hist[0].location); +#ifdef WINUAE_ARANYM + disasm_native_block((const uae_u8 *)current_block_start_target, bi->direct_handler_size); +#endif + UNUSED(block_addr); + } +#endif + + log_dump(); + align_target(align_jumps); + +#ifdef UAE +#ifdef USE_UDIS86 + UDISFN(current_block_start_target, target) +#endif +#endif + + /* This is the non-direct handler */ + bi->handler= + bi->handler_to_use=(cpuop_func *)get_target(); + compemu_raw_cmp_l_mi(JITPTR ®s.pc_p, JITPTR pc_hist[0].location); + compemu_raw_jnz(JITPTR popall_cache_miss); + comp_pc_p=(uae_u8*)pc_hist[0].location; + + bi->status=BI_FINALIZING; + init_comp(); + match_states(bi); + flush(1); + + compemu_raw_jmp(JITPTR bi->direct_handler); + + flush_cpu_icache((void *)current_block_start_target, (void *)target); + current_compile_p=get_target(); + raise_in_cl_list(bi); +#ifdef UAE + bi->nexthandler=current_compile_p; +#endif + + /* We will flush soon, anyway, so let's do it now */ + if (current_compile_p >= MAX_COMPILE_PTR) + flush_icache_hard(3); + + bi->status=BI_ACTIVE; + if (redo_current_block) + block_need_recompile(bi); + +#ifdef PROFILE_COMPILE_TIME + compile_time += (clock() - start_time); +#endif +#ifdef UAE + /* Account for compilation time */ + do_extra_cycles(totcycles); +#endif + } + +#ifdef USE_CPU_EMUL_SERVICES + /* Account for compilation time */ + cpu_do_check_ticks(); +#endif +} + +#ifdef UAE + /* Slightly different function defined in newcpu.cpp */ +#else +void do_nothing(void) +{ + /* What did you expect this to do? */ +} +#endif + +#ifdef UAE + /* Different implementation in newcpu.cpp */ +#else +void exec_nostats(void) +{ + for (;;) { + uae_u32 opcode = GET_OPCODE; +#ifdef FLIGHT_RECORDER + m68k_record_step(m68k_getpc(), cft_map(opcode)); +#endif + (*cpufunctbl[opcode])(opcode); + cpu_check_ticks(); + if (end_block(opcode) || SPCFLAGS_TEST(SPCFLAG_ALL)) { + return; /* We will deal with the spcflags in the caller */ + } + } +} +#endif + +#ifdef UAE +/* FIXME: check differences against UAE execute_normal (newcpu.cpp) */ +#else +void execute_normal(void) +{ + if (!check_for_cache_miss()) { + cpu_history pc_hist[MAXRUN]; + int blocklen = 0; +#if 0 && FIXED_ADDRESSING + start_pc_p = regs.pc_p; + start_pc = get_virtual_address(regs.pc_p); +#else + start_pc_p = regs.pc_oldp; + start_pc = regs.pc; +#endif + for (;;) { /* Take note: This is the do-it-normal loop */ + pc_hist[blocklen++].location = (uae_u16 *)regs.pc_p; + uae_u32 opcode = GET_OPCODE; +#ifdef FLIGHT_RECORDER + m68k_record_step(m68k_getpc(), cft_map(opcode)); +#endif + (*cpufunctbl[opcode])(opcode); + cpu_check_ticks(); + if (end_block(opcode) || SPCFLAGS_TEST(SPCFLAG_ALL) || blocklen>=MAXRUN) { + compile_block(pc_hist, blocklen); + return; /* We will deal with the spcflags in the caller */ + } + /* No need to check regs.spcflags, because if they were set, + we'd have ended up inside that "if" */ + } + } +} +#endif + +typedef void (*compiled_handler)(void); + +#ifdef UAE +/* FIXME: check differences against UAE m68k_do_compile_execute */ +#else +void m68k_do_compile_execute(void) +{ + for (;;) { + ((compiled_handler)(pushall_call_handler))(); + /* Whenever we return from that, we should check spcflags */ + if (SPCFLAGS_TEST(SPCFLAG_ALL)) { + if (m68k_do_specialties ()) + return; + } + } +} +#endif + +#ifdef UAE +/* FIXME: check differences against UAE m68k_compile_execute */ +#else +void m68k_compile_execute (void) +{ +setjmpagain: + TRY(prb) { + for (;;) { + if (quit_program > 0) { + if (quit_program == 1) { +#ifdef FLIGHT_RECORDER + dump_flight_recorder(); +#endif + break; + } + quit_program = 0; + m68k_reset (); + } + m68k_do_compile_execute(); + } + } + CATCH(prb) { + jit_log("m68k_compile_execute: exception %d pc=%08x (%08x+%p-%p) fault_pc=%08x addr=%08x -> %08x sp=%08x", + int(prb), + m68k_getpc(), + regs.pc, regs.pc_p, regs.pc_oldp, + regs.fault_pc, + regs.mmu_fault_addr, get_long (regs.vbr + 4*prb), + regs.regs[15]); + flush_icache(); + Exception(prb, 0); + goto setjmpagain; + } +} +#endif + +#endif /* JIT */ diff --git a/src/jit/x86/compemu_x86.cpp b/src/jit/x86/compemu_x86.cpp new file mode 100644 index 000000000..b6a33dee3 --- /dev/null +++ b/src/jit/x86/compemu_x86.cpp @@ -0,0 +1,103735 @@ +#include "sysconfig.h" +#if defined(JIT) +#include "sysdeps.h" +#include "options.h" +#include "uae/memory.h" +#include "readcpu.h" +#include "newcpu.h" +#include "comptbl_x86.h" +#include "debug.h" +#include "compemu_x86.h" + +#include "flags_x86.h" + +#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) +#define PART_1 1 +#define PART_2 1 +#define PART_3 1 +#define PART_4 1 +#define PART_5 1 +#define PART_6 1 +#define PART_7 1 +#define PART_8 1 +#endif + +#ifdef USE_JIT_FPU +extern void comp_fpp_opp(); +extern void comp_fscc_opp(); +extern void comp_fbcc_opp(); +#endif + +#ifdef PART_1 +/* OR.B #.B,Dn */ +uae_u32 REGPARAM2 op_0_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(An) */ +uae_u32 REGPARAM2 op_10_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_18_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,-(An) */ +uae_u32 REGPARAM2 op_20_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_28_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_30_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_38_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_39_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,Dn */ +uae_u32 REGPARAM2 op_40_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(An) */ +uae_u32 REGPARAM2 op_50_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_58_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,-(An) */ +uae_u32 REGPARAM2 op_60_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_68_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_70_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_78_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_79_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,Dn */ +uae_u32 REGPARAM2 op_80_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(An) */ +uae_u32 REGPARAM2 op_90_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_98_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,-(An) */ +uae_u32 REGPARAM2 op_a0_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_a8_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b0_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_b8_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_b9_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.L Dn,Dn */ +uae_u32 REGPARAM2 op_100_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(An) */ +uae_u32 REGPARAM2 op_110_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_118_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,-(An) */ +uae_u32 REGPARAM2 op_120_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_128_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_130_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_138_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_139_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(d16,PC) */ +uae_u32 REGPARAM2 op_13a_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_13b_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,#.B */ +uae_u32 REGPARAM2 op_13c_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = scratchie++; + mov_l_ri(dst, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.L Dn,Dn */ +uae_u32 REGPARAM2 op_140_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(An) */ +uae_u32 REGPARAM2 op_150_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_158_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,-(An) */ +uae_u32 REGPARAM2 op_160_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_168_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_170_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_178_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_179_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.L Dn,Dn */ +uae_u32 REGPARAM2 op_180_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(An) */ +uae_u32 REGPARAM2 op_190_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_198_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1a0_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1a8_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1b0_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_1b8_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_1b9_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.L Dn,Dn */ +uae_u32 REGPARAM2 op_1c0_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(An) */ +uae_u32 REGPARAM2 op_1d0_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_1d8_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1e0_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1e8_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1f0_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_1f8_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_1f9_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,Dn */ +uae_u32 REGPARAM2 op_200_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(An) */ +uae_u32 REGPARAM2 op_210_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_218_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,-(An) */ +uae_u32 REGPARAM2 op_220_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_228_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_230_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_238_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_239_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,Dn */ +uae_u32 REGPARAM2 op_240_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(An) */ +uae_u32 REGPARAM2 op_250_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_258_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,-(An) */ +uae_u32 REGPARAM2 op_260_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_268_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_270_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_278_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_279_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,Dn */ +uae_u32 REGPARAM2 op_280_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(An) */ +uae_u32 REGPARAM2 op_290_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_298_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,-(An) */ +uae_u32 REGPARAM2 op_2a0_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_2a8_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2b0_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_2b8_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_2b9_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,Dn */ +uae_u32 REGPARAM2 op_400_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(An) */ +uae_u32 REGPARAM2 op_410_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_418_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,-(An) */ +uae_u32 REGPARAM2 op_420_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_428_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_430_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_438_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_439_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,Dn */ +uae_u32 REGPARAM2 op_440_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(An) */ +uae_u32 REGPARAM2 op_450_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_458_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,-(An) */ +uae_u32 REGPARAM2 op_460_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_468_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_470_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_478_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_479_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,Dn */ +uae_u32 REGPARAM2 op_480_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(An) */ +uae_u32 REGPARAM2 op_490_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_498_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,-(An) */ +uae_u32 REGPARAM2 op_4a0_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_4a8_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4b0_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_4b8_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_4b9_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,Dn */ +uae_u32 REGPARAM2 op_600_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(An) */ +uae_u32 REGPARAM2 op_610_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_618_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,-(An) */ +uae_u32 REGPARAM2 op_620_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_628_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_630_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_638_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_639_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,Dn */ +uae_u32 REGPARAM2 op_640_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(An) */ +uae_u32 REGPARAM2 op_650_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_658_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,-(An) */ +uae_u32 REGPARAM2 op_660_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_668_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_670_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_678_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_679_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,Dn */ +uae_u32 REGPARAM2 op_680_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(An) */ +uae_u32 REGPARAM2 op_690_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_698_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,-(An) */ +uae_u32 REGPARAM2 op_6a0_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_6a8_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_6b0_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_6b8_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_6b9_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.L #.W,Dn */ +uae_u32 REGPARAM2 op_800_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(An) */ +uae_u32 REGPARAM2 op_810_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_818_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,-(An) */ +uae_u32 REGPARAM2 op_820_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_828_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_830_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_838_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_839_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_83a_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_83b_0_comp_ff(uae_u32 opcode) /* BTST */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.L #.W,Dn */ +uae_u32 REGPARAM2 op_840_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(An) */ +uae_u32 REGPARAM2 op_850_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_858_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,-(An) */ +uae_u32 REGPARAM2 op_860_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_868_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_870_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_878_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_879_0_comp_ff(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.L #.W,Dn */ +uae_u32 REGPARAM2 op_880_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(An) */ +uae_u32 REGPARAM2 op_890_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_898_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,-(An) */ +uae_u32 REGPARAM2 op_8a0_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_8a8_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8b0_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_8b8_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_8b9_0_comp_ff(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.L #.W,Dn */ +uae_u32 REGPARAM2 op_8c0_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(An) */ +uae_u32 REGPARAM2 op_8d0_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_8d8_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,-(An) */ +uae_u32 REGPARAM2 op_8e0_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_8e8_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8f0_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_8f8_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_8f9_0_comp_ff(uae_u32 opcode) /* BSET */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + start_needflags(); + set_zero(s,tmp); + live_flags(); + end_needflags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,Dn */ +uae_u32 REGPARAM2 op_a00_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(An) */ +uae_u32 REGPARAM2 op_a10_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_a18_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,-(An) */ +uae_u32 REGPARAM2 op_a20_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_a28_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_a30_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_a38_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_a39_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,Dn */ +uae_u32 REGPARAM2 op_a40_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(An) */ +uae_u32 REGPARAM2 op_a50_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_a58_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,-(An) */ +uae_u32 REGPARAM2 op_a60_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_a68_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_a70_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_a78_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_a79_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,Dn */ +uae_u32 REGPARAM2 op_a80_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(An) */ +uae_u32 REGPARAM2 op_a90_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_a98_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,-(An) */ +uae_u32 REGPARAM2 op_aa0_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_aa8_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_ab0_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_ab8_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_ab9_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_2 +/* CMP.B #.B,Dn */ +uae_u32 REGPARAM2 op_c00_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(An) */ +uae_u32 REGPARAM2 op_c10_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_c18_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,-(An) */ +uae_u32 REGPARAM2 op_c20_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_c28_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c30_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_c38_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_c39_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(d16,PC) */ +uae_u32 REGPARAM2 op_c3a_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_c3b_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,Dn */ +uae_u32 REGPARAM2 op_c40_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(An) */ +uae_u32 REGPARAM2 op_c50_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_c58_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,-(An) */ +uae_u32 REGPARAM2 op_c60_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_c68_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c70_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_c78_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_c79_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_c7a_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_c7b_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,Dn */ +uae_u32 REGPARAM2 op_c80_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(An) */ +uae_u32 REGPARAM2 op_c90_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_c98_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,-(An) */ +uae_u32 REGPARAM2 op_ca0_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_ca8_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_cb0_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_cb8_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_cb9_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(d16,PC) */ +uae_u32 REGPARAM2 op_cba_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_cbb_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,Dn */ +uae_u32 REGPARAM2 op_1000_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),Dn */ +uae_u32 REGPARAM2 op_1010_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,Dn */ +uae_u32 REGPARAM2 op_1018_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),Dn */ +uae_u32 REGPARAM2 op_1020_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_1028_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_1030_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_1038_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_1039_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_103a_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_103b_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,Dn */ +uae_u32 REGPARAM2 op_103c_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_b_ri(dst,0); + start_needflags(); + or_b(dst,src); + } else { + mov_b_rr(dst,src); + test_b_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(An) */ +uae_u32 REGPARAM2 op_1080_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(An) */ +uae_u32 REGPARAM2 op_1090_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(An) */ +uae_u32 REGPARAM2 op_1098_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(An) */ +uae_u32 REGPARAM2 op_10a0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(An) */ +uae_u32 REGPARAM2 op_10a8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_10b0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(An) */ +uae_u32 REGPARAM2 op_10b8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(An) */ +uae_u32 REGPARAM2 op_10b9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(An) */ +uae_u32 REGPARAM2 op_10ba_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_10bb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(An) */ +uae_u32 REGPARAM2 op_10bc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_10c0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(An)+ */ +uae_u32 REGPARAM2 op_10d0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(An)+ */ +uae_u32 REGPARAM2 op_10d8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(An)+ */ +uae_u32 REGPARAM2 op_10e0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_10e8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_10f0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_10f8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_10f9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_10fa_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_10fb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_10fc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1100_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),-(An) */ +uae_u32 REGPARAM2 op_1110_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,-(An) */ +uae_u32 REGPARAM2 op_1118_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),-(An) */ +uae_u32 REGPARAM2 op_1120_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),-(An) */ +uae_u32 REGPARAM2 op_1128_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_1130_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_1138_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_1139_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_113a_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_113b_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,-(An) */ +uae_u32 REGPARAM2 op_113c_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1140_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(d16,An) */ +uae_u32 REGPARAM2 op_1150_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_1158_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(d16,An) */ +uae_u32 REGPARAM2 op_1160_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_1168_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_1170_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_1178_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_1179_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_117a_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_117b_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_117c_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1180_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1190_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1198_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11a0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11a8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11ba_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11bb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11bc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_11c0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(xxx).W */ +uae_u32 REGPARAM2 op_11d0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_11d8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(xxx).W */ +uae_u32 REGPARAM2 op_11e0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_11e8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_11f0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_11f8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_11f9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_11fa_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_11fb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_11fc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_13c0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(xxx).L */ +uae_u32 REGPARAM2 op_13d0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_13d8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(xxx).L */ +uae_u32 REGPARAM2 op_13e0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_13e8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_13f0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_13f8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_13f9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_13fa_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_13fb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_13fc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,Dn */ +uae_u32 REGPARAM2 op_2000_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,Dn */ +uae_u32 REGPARAM2 op_2008_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),Dn */ +uae_u32 REGPARAM2 op_2010_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,Dn */ +uae_u32 REGPARAM2 op_2018_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),Dn */ +uae_u32 REGPARAM2 op_2020_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_2028_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_2030_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_2038_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_2039_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_203a_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_203b_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,Dn */ +uae_u32 REGPARAM2 op_203c_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L Dn,An */ +uae_u32 REGPARAM2 op_2040_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L An,An */ +uae_u32 REGPARAM2 op_2048_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (An),An */ +uae_u32 REGPARAM2 op_2050_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (An)+,An */ +uae_u32 REGPARAM2 op_2058_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L -(An),An */ +uae_u32 REGPARAM2 op_2060_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (d16,An),An */ +uae_u32 REGPARAM2 op_2068_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_2070_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_2078_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_2079_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_207a_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_207b_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L #.L,An */ +uae_u32 REGPARAM2 op_207c_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(An) */ +uae_u32 REGPARAM2 op_2080_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(An) */ +uae_u32 REGPARAM2 op_2088_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(An) */ +uae_u32 REGPARAM2 op_2090_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(An) */ +uae_u32 REGPARAM2 op_2098_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(An) */ +uae_u32 REGPARAM2 op_20a0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),(An) */ +uae_u32 REGPARAM2 op_20a8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_20b0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(An) */ +uae_u32 REGPARAM2 op_20b8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(An) */ +uae_u32 REGPARAM2 op_20b9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(An) */ +uae_u32 REGPARAM2 op_20ba_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_20bb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(An) */ +uae_u32 REGPARAM2 op_20bc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_20c0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(An)+ */ +uae_u32 REGPARAM2 op_20c8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(An)+ */ +uae_u32 REGPARAM2 op_20d0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_20d8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(An)+ */ +uae_u32 REGPARAM2 op_20e0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_20e8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_20f0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_20f8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_20f9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_20fa_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_20fb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_20fc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,-(An) */ +uae_u32 REGPARAM2 op_2100_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,-(An) */ +uae_u32 REGPARAM2 op_2108_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),-(An) */ +uae_u32 REGPARAM2 op_2110_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,-(An) */ +uae_u32 REGPARAM2 op_2118_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),-(An) */ +uae_u32 REGPARAM2 op_2120_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),-(An) */ +uae_u32 REGPARAM2 op_2128_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_2130_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_2138_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_2139_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_213a_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_213b_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,-(An) */ +uae_u32 REGPARAM2 op_213c_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_2140_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(d16,An) */ +uae_u32 REGPARAM2 op_2148_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(d16,An) */ +uae_u32 REGPARAM2 op_2150_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_2158_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(d16,An) */ +uae_u32 REGPARAM2 op_2160_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_2168_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_2170_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_2178_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_2179_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_217a_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_217b_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_217c_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2180_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2188_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2190_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2198_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21a0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_3 +/* MOVE.L (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21a8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21ba_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21bb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21bc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_21c0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(xxx).W */ +uae_u32 REGPARAM2 op_21c8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(xxx).W */ +uae_u32 REGPARAM2 op_21d0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_21d8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(xxx).W */ +uae_u32 REGPARAM2 op_21e0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_21e8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_21f0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_21f8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_21f9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_21fa_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_21fb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_21fc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_23c0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(xxx).L */ +uae_u32 REGPARAM2 op_23c8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(xxx).L */ +uae_u32 REGPARAM2 op_23d0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_23d8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(xxx).L */ +uae_u32 REGPARAM2 op_23e0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_23e8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_23f0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_23f8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_23f9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_23fa_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_23fb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_23fc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,Dn */ +uae_u32 REGPARAM2 op_3000_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,Dn */ +uae_u32 REGPARAM2 op_3008_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),Dn */ +uae_u32 REGPARAM2 op_3010_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,Dn */ +uae_u32 REGPARAM2 op_3018_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),Dn */ +uae_u32 REGPARAM2 op_3020_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_3028_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_3030_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_3038_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_3039_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_303a_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_303b_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,Dn */ +uae_u32 REGPARAM2 op_303c_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_w_ri(dst,0); + start_needflags(); + or_w(dst,src); + } else { + mov_w_rr(dst,src); + test_w_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W Dn,An */ +uae_u32 REGPARAM2 op_3040_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W An,An */ +uae_u32 REGPARAM2 op_3048_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (An),An */ +uae_u32 REGPARAM2 op_3050_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (An)+,An */ +uae_u32 REGPARAM2 op_3058_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W -(An),An */ +uae_u32 REGPARAM2 op_3060_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (d16,An),An */ +uae_u32 REGPARAM2 op_3068_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_3070_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_3078_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_3079_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_307a_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_307b_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W #.W,An */ +uae_u32 REGPARAM2 op_307c_0_comp_ff(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(An) */ +uae_u32 REGPARAM2 op_3080_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(An) */ +uae_u32 REGPARAM2 op_3088_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(An) */ +uae_u32 REGPARAM2 op_3090_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(An) */ +uae_u32 REGPARAM2 op_3098_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(An) */ +uae_u32 REGPARAM2 op_30a0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(An) */ +uae_u32 REGPARAM2 op_30a8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_30b0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(An) */ +uae_u32 REGPARAM2 op_30b8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(An) */ +uae_u32 REGPARAM2 op_30b9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(An) */ +uae_u32 REGPARAM2 op_30ba_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_30bb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(An) */ +uae_u32 REGPARAM2 op_30bc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_30c0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(An)+ */ +uae_u32 REGPARAM2 op_30c8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(An)+ */ +uae_u32 REGPARAM2 op_30d0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(An)+ */ +uae_u32 REGPARAM2 op_30d8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(An)+ */ +uae_u32 REGPARAM2 op_30e0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_30e8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_30f0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_30f8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_30f9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_30fa_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_30fb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_30fc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,-(An) */ +uae_u32 REGPARAM2 op_3100_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,-(An) */ +uae_u32 REGPARAM2 op_3108_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),-(An) */ +uae_u32 REGPARAM2 op_3110_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,-(An) */ +uae_u32 REGPARAM2 op_3118_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),-(An) */ +uae_u32 REGPARAM2 op_3120_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),-(An) */ +uae_u32 REGPARAM2 op_3128_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_3130_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_3138_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_3139_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_313a_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_313b_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,-(An) */ +uae_u32 REGPARAM2 op_313c_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_3140_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(d16,An) */ +uae_u32 REGPARAM2 op_3148_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(d16,An) */ +uae_u32 REGPARAM2 op_3150_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_3158_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(d16,An) */ +uae_u32 REGPARAM2 op_3160_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_3168_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_3170_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_3178_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_3179_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_317a_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_317b_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_317c_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3180_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3188_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3190_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3198_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31a0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31a8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31ba_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31bb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31bc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_31c0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(xxx).W */ +uae_u32 REGPARAM2 op_31c8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(xxx).W */ +uae_u32 REGPARAM2 op_31d0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_31d8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(xxx).W */ +uae_u32 REGPARAM2 op_31e0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_31e8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_31f0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_31f8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_31f9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_31fa_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_31fb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_31fc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_33c0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(xxx).L */ +uae_u32 REGPARAM2 op_33c8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(xxx).L */ +uae_u32 REGPARAM2 op_33d0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_33d8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(xxx).L */ +uae_u32 REGPARAM2 op_33e0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_33e8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_33f0_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_33f8_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_33f9_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_33fa_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_33fb_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_33fc_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B Dn */ +uae_u32 REGPARAM2 op_4000_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(srcreg != dst) { + mov_b_rr(srcreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (An) */ +uae_u32 REGPARAM2 op_4010_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (An)+ */ +uae_u32 REGPARAM2 op_4018_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B -(An) */ +uae_u32 REGPARAM2 op_4020_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (d16,An) */ +uae_u32 REGPARAM2 op_4028_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4030_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (xxx).W */ +uae_u32 REGPARAM2 op_4038_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (xxx).L */ +uae_u32 REGPARAM2 op_4039_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W Dn */ +uae_u32 REGPARAM2 op_4040_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(srcreg != dst) { + mov_w_rr(srcreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (An) */ +uae_u32 REGPARAM2 op_4050_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (An)+ */ +uae_u32 REGPARAM2 op_4058_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W -(An) */ +uae_u32 REGPARAM2 op_4060_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (d16,An) */ +uae_u32 REGPARAM2 op_4068_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4070_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (xxx).W */ +uae_u32 REGPARAM2 op_4078_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (xxx).L */ +uae_u32 REGPARAM2 op_4079_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L Dn */ +uae_u32 REGPARAM2 op_4080_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (An) */ +uae_u32 REGPARAM2 op_4090_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (An)+ */ +uae_u32 REGPARAM2 op_4098_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L -(An) */ +uae_u32 REGPARAM2 op_40a0_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (d16,An) */ +uae_u32 REGPARAM2 op_40a8_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_40b0_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (xxx).W */ +uae_u32 REGPARAM2 op_40b8_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (xxx).L */ +uae_u32 REGPARAM2 op_40b9_0_comp_ff(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (An),An */ +uae_u32 REGPARAM2 op_41d0_0_comp_ff(uae_u32 opcode) /* LEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (d16,An),An */ +uae_u32 REGPARAM2 op_41e8_0_comp_ff(uae_u32 opcode) /* LEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_41f0_0_comp_ff(uae_u32 opcode) /* LEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_41f8_0_comp_ff(uae_u32 opcode) /* LEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_41f9_0_comp_ff(uae_u32 opcode) /* LEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_41fa_0_comp_ff(uae_u32 opcode) /* LEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_41fb_0_comp_ff(uae_u32 opcode) /* LEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B Dn */ +uae_u32 REGPARAM2 op_4200_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_b_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(srcreg != dst) { + mov_b_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (An) */ +uae_u32 REGPARAM2 op_4210_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_b_rr(dst,dst); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (An)+ */ +uae_u32 REGPARAM2 op_4218_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_b_rr(dst,dst); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B -(An) */ +uae_u32 REGPARAM2 op_4220_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_b_rr(dst,dst); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (d16,An) */ +uae_u32 REGPARAM2 op_4228_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_b_rr(dst,dst); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4230_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_b_rr(dst,dst); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (xxx).W */ +uae_u32 REGPARAM2 op_4238_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_b_rr(dst,dst); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (xxx).L */ +uae_u32 REGPARAM2 op_4239_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_b_rr(dst,dst); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W Dn */ +uae_u32 REGPARAM2 op_4240_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_w_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(srcreg != dst) { + mov_w_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (An) */ +uae_u32 REGPARAM2 op_4250_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_w_rr(dst,dst); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (An)+ */ +uae_u32 REGPARAM2 op_4258_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_w_rr(dst,dst); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W -(An) */ +uae_u32 REGPARAM2 op_4260_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_w_rr(dst,dst); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (d16,An) */ +uae_u32 REGPARAM2 op_4268_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_w_rr(dst,dst); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4270_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_w_rr(dst,dst); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (xxx).W */ +uae_u32 REGPARAM2 op_4278_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_w_rr(dst,dst); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (xxx).L */ +uae_u32 REGPARAM2 op_4279_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_w_rr(dst,dst); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L Dn */ +uae_u32 REGPARAM2 op_4280_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (An) */ +uae_u32 REGPARAM2 op_4290_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (An)+ */ +uae_u32 REGPARAM2 op_4298_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L -(An) */ +uae_u32 REGPARAM2 op_42a0_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (d16,An) */ +uae_u32 REGPARAM2 op_42a8_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_42b0_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (xxx).W */ +uae_u32 REGPARAM2 op_42b8_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (xxx).L */ +uae_u32 REGPARAM2 op_42b9_0_comp_ff(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B Dn */ +uae_u32 REGPARAM2 op_4400_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(srcreg != dst) { + mov_b_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B (An) */ +uae_u32 REGPARAM2 op_4410_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_4 +/* NEG.B (An)+ */ +uae_u32 REGPARAM2 op_4418_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B -(An) */ +uae_u32 REGPARAM2 op_4420_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B (d16,An) */ +uae_u32 REGPARAM2 op_4428_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4430_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B (xxx).W */ +uae_u32 REGPARAM2 op_4438_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B (xxx).L */ +uae_u32 REGPARAM2 op_4439_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W Dn */ +uae_u32 REGPARAM2 op_4440_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(srcreg != dst) { + mov_w_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (An) */ +uae_u32 REGPARAM2 op_4450_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (An)+ */ +uae_u32 REGPARAM2 op_4458_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W -(An) */ +uae_u32 REGPARAM2 op_4460_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (d16,An) */ +uae_u32 REGPARAM2 op_4468_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4470_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (xxx).W */ +uae_u32 REGPARAM2 op_4478_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (xxx).L */ +uae_u32 REGPARAM2 op_4479_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L Dn */ +uae_u32 REGPARAM2 op_4480_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (An) */ +uae_u32 REGPARAM2 op_4490_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (An)+ */ +uae_u32 REGPARAM2 op_4498_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L -(An) */ +uae_u32 REGPARAM2 op_44a0_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (d16,An) */ +uae_u32 REGPARAM2 op_44a8_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_44b0_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (xxx).W */ +uae_u32 REGPARAM2 op_44b8_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (xxx).L */ +uae_u32 REGPARAM2 op_44b9_0_comp_ff(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B Dn */ +uae_u32 REGPARAM2 op_4600_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + if(srcreg != dst) { + mov_b_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (An) */ +uae_u32 REGPARAM2 op_4610_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (An)+ */ +uae_u32 REGPARAM2 op_4618_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B -(An) */ +uae_u32 REGPARAM2 op_4620_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (d16,An) */ +uae_u32 REGPARAM2 op_4628_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4630_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (xxx).W */ +uae_u32 REGPARAM2 op_4638_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (xxx).L */ +uae_u32 REGPARAM2 op_4639_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W Dn */ +uae_u32 REGPARAM2 op_4640_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + if(srcreg != dst) { + mov_w_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (An) */ +uae_u32 REGPARAM2 op_4650_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (An)+ */ +uae_u32 REGPARAM2 op_4658_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W -(An) */ +uae_u32 REGPARAM2 op_4660_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (d16,An) */ +uae_u32 REGPARAM2 op_4668_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4670_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (xxx).W */ +uae_u32 REGPARAM2 op_4678_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (xxx).L */ +uae_u32 REGPARAM2 op_4679_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L Dn */ +uae_u32 REGPARAM2 op_4680_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (An) */ +uae_u32 REGPARAM2 op_4690_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (An)+ */ +uae_u32 REGPARAM2 op_4698_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L -(An) */ +uae_u32 REGPARAM2 op_46a0_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (d16,An) */ +uae_u32 REGPARAM2 op_46a8_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_46b0_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (xxx).W */ +uae_u32 REGPARAM2 op_46b8_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (xxx).L */ +uae_u32 REGPARAM2 op_46b9_0_comp_ff(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LINK.L An,#.L */ +uae_u32 REGPARAM2 op_4808_0_comp_ff(uae_u32 opcode) /* LINK */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int offs = scratchie++; + mov_l_ri(offs, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,src,scratchie); + mov_l_rr(src,SP_REG); + add_l(SP_REG,offs); + if(srcreg + 8 != src) { + mov_l_rr(srcreg + 8, src); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SWAP.W Dn */ +uae_u32 REGPARAM2 op_4840_0_comp_ff(uae_u32 opcode) /* SWAP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + rol_l_ri(src,16); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + if(srcreg != src) { + mov_l_rr(srcreg, src); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (An) */ +uae_u32 REGPARAM2 op_4850_0_comp_ff(uae_u32 opcode) /* PEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if (srcreg==7) dodgy=1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (d16,An) */ +uae_u32 REGPARAM2 op_4868_0_comp_ff(uae_u32 opcode) /* PEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if (srcreg==7) dodgy=1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4870_0_comp_ff(uae_u32 opcode) /* PEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if (srcreg==7) dodgy=1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (xxx).W */ +uae_u32 REGPARAM2 op_4878_0_comp_ff(uae_u32 opcode) /* PEA */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (xxx).L */ +uae_u32 REGPARAM2 op_4879_0_comp_ff(uae_u32 opcode) /* PEA */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (d16,PC) */ +uae_u32 REGPARAM2 op_487a_0_comp_ff(uae_u32 opcode) /* PEA */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_487b_0_comp_ff(uae_u32 opcode) /* PEA */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXT.W Dn */ +uae_u32 REGPARAM2 op_4880_0_comp_ff(uae_u32 opcode) /* EXT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + { + int dst = scratchie++; + sign_extend_8_rr(dst,src); + dont_care_flags(); + { + start_needflags(); + test_w_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(srcreg != dst) { + mov_w_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,(An) */ +uae_u32 REGPARAM2 op_4890_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(srca, dstreg + 8); + } + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + offset+=2; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writeword(tmp,i,scratchie); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,-(An) */ +uae_u32 REGPARAM2 op_48a0_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca=dodgy?scratchie++:dstreg+8; + if (dodgy) { + mov_l_rr(srca,8+dstreg); + } + if (1 && !special_mem && !jit_n_addr_unsafe && !(mask & (1 << (7 - dstreg)))) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + offset-=2; + mov_l_rr(tmp,15-i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + } + } + lea_l_brr(8+dstreg,srca,(uae_s32)offset); + } else { + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + sub_l_ri(srca,2); + writeword(srca,15-i,scratchie); + } + } + mov_l_rr(8+dstreg,srca); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_48a8_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + dstreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + offset+=2; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writeword(tmp,i,scratchie); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_48b0_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + offset+=2; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writeword(tmp,i,scratchie); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_48b8_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + offset+=2; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writeword(tmp,i,scratchie); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_48b9_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + offset+=2; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writeword(tmp,i,scratchie); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXT.L Dn */ +uae_u32 REGPARAM2 op_48c0_0_comp_ff(uae_u32 opcode) /* EXT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + { + int dst = src; + sign_extend_16_rr(src,src); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,(An) */ +uae_u32 REGPARAM2 op_48d0_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(srca, dstreg + 8); + } + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + offset+=4; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writelong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,-(An) */ +uae_u32 REGPARAM2 op_48e0_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(srca, 8 + dstreg); + } + if (1 && !special_mem && !jit_n_addr_unsafe && !(mask & (1 << (7 - dstreg)))) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + offset-=4; + mov_l_rr(tmp,15-i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + } + } + lea_l_brr(8+dstreg,srca,(uae_s32)offset); + } else { + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + sub_l_ri(srca,4); + writelong(srca,15-i,scratchie); + } + } + mov_l_rr(8+dstreg,srca); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_48e8_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + dstreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + offset+=4; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writelong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_48f0_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + offset+=4; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writelong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_48f8_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + offset+=4; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writelong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_48f9_0_comp_ff(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + offset+=4; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writelong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXT.B Dn */ +uae_u32 REGPARAM2 op_49c0_0_comp_ff(uae_u32 opcode) /* EXT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + { + int dst = src; + sign_extend_8_rr(src,src); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B Dn */ +uae_u32 REGPARAM2 op_4a00_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (An) */ +uae_u32 REGPARAM2 op_4a10_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (An)+ */ +uae_u32 REGPARAM2 op_4a18_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B -(An) */ +uae_u32 REGPARAM2 op_4a20_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (d16,An) */ +uae_u32 REGPARAM2 op_4a28_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4a30_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (xxx).W */ +uae_u32 REGPARAM2 op_4a38_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (xxx).L */ +uae_u32 REGPARAM2 op_4a39_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (d16,PC) */ +uae_u32 REGPARAM2 op_4a3a_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4a3b_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B #.B */ +uae_u32 REGPARAM2 op_4a3c_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_b_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W Dn */ +uae_u32 REGPARAM2 op_4a40_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W An */ +uae_u32 REGPARAM2 op_4a48_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (An) */ +uae_u32 REGPARAM2 op_4a50_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (An)+ */ +uae_u32 REGPARAM2 op_4a58_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W -(An) */ +uae_u32 REGPARAM2 op_4a60_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (d16,An) */ +uae_u32 REGPARAM2 op_4a68_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4a70_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (xxx).W */ +uae_u32 REGPARAM2 op_4a78_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (xxx).L */ +uae_u32 REGPARAM2 op_4a79_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (d16,PC) */ +uae_u32 REGPARAM2 op_4a7a_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4a7b_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W #.W */ +uae_u32 REGPARAM2 op_4a7c_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + dont_care_flags(); + { + start_needflags(); + test_w_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L Dn */ +uae_u32 REGPARAM2 op_4a80_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L An */ +uae_u32 REGPARAM2 op_4a88_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (An) */ +uae_u32 REGPARAM2 op_4a90_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (An)+ */ +uae_u32 REGPARAM2 op_4a98_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L -(An) */ +uae_u32 REGPARAM2 op_4aa0_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (d16,An) */ +uae_u32 REGPARAM2 op_4aa8_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4ab0_0_comp_ff(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (xxx).W */ +uae_u32 REGPARAM2 op_4ab8_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (xxx).L */ +uae_u32 REGPARAM2 op_4ab9_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (d16,PC) */ +uae_u32 REGPARAM2 op_4aba_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4abb_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L #.L */ +uae_u32 REGPARAM2 op_4abc_0_comp_ff(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + dont_care_flags(); + { + start_needflags(); + test_l_rr(src,src); + live_flags(); + end_needflags(); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(An) */ +uae_u32 REGPARAM2 op_4c90_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(srca, dstreg + 8); + } + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_4c98_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, dstreg + 8); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + lea_l_brr(8+dstreg,srca,offset); + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + mov_l_rr(8+dstreg,tmp); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4ca8_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + dstreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4cb0_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4cb8_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4cb9_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4cba_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4cbb_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(An) */ +uae_u32 REGPARAM2 op_4cd0_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(srca, dstreg + 8); + } + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_4cd8_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, dstreg + 8); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + lea_l_brr(8+dstreg,srca,offset); + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + mov_l_rr(8+dstreg,tmp); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4ce8_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + dstreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4cf0_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4cf8_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4cf9_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4cfa_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4cfb_0_comp_ff(uae_u32 opcode) /* MVMEL */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LINK.W An,#.W */ +uae_u32 REGPARAM2 op_4e50_0_comp_ff(uae_u32 opcode) /* LINK */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,src,scratchie); + mov_l_rr(src,SP_REG); + sign_extend_16_rr(offs,offs); + add_l(SP_REG,offs); + if(srcreg + 8 != src) { + mov_l_rr(srcreg + 8, src); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* UNLK.L An */ +uae_u32 REGPARAM2 op_4e58_0_comp_ff(uae_u32 opcode) /* UNLK */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + mov_l_rr(SP_REG,src); + readlong(SP_REG,src,scratchie); + add_l_ri(SP_REG,4); + if(srcreg + 8 != src) { + mov_l_rr(srcreg + 8, src); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOP.L */ +uae_u32 REGPARAM2 op_4e71_0_comp_ff(uae_u32 opcode) /* NOP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* RTD.L #.W */ +uae_u32 REGPARAM2 op_4e74_0_comp_ff(uae_u32 opcode) /* RTD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + add_l_ri(offs,4); + { + int newad=scratchie++; + readlong(SP_REG,newad,scratchie); + mov_l_mr(JITPTR ®s.pc,newad); + get_n_addr_jmp(newad,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + add_l(SP_REG,offs); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* RTS.L */ +uae_u32 REGPARAM2 op_4e75_0_comp_ff(uae_u32 opcode) /* RTS */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int newad=scratchie++; + readlong(SP_REG,newad,scratchie); + mov_l_mr(JITPTR ®s.pc,newad); + get_n_addr_jmp(newad,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + lea_l_brr(SP_REG,SP_REG,4); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (An) */ +uae_u32 REGPARAM2 op_4e90_0_comp_ff(uae_u32 opcode) /* JSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (d16,An) */ +uae_u32 REGPARAM2 op_4ea8_0_comp_ff(uae_u32 opcode) /* JSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4eb0_0_comp_ff(uae_u32 opcode) /* JSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (xxx).W */ +uae_u32 REGPARAM2 op_4eb8_0_comp_ff(uae_u32 opcode) /* JSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (xxx).L */ +uae_u32 REGPARAM2 op_4eb9_0_comp_ff(uae_u32 opcode) /* JSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (d16,PC) */ +uae_u32 REGPARAM2 op_4eba_0_comp_ff(uae_u32 opcode) /* JSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4ebb_0_comp_ff(uae_u32 opcode) /* JSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (An) */ +uae_u32 REGPARAM2 op_4ed0_0_comp_ff(uae_u32 opcode) /* JMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (d16,An) */ +uae_u32 REGPARAM2 op_4ee8_0_comp_ff(uae_u32 opcode) /* JMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4ef0_0_comp_ff(uae_u32 opcode) /* JMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (xxx).W */ +uae_u32 REGPARAM2 op_4ef8_0_comp_ff(uae_u32 opcode) /* JMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (xxx).L */ +uae_u32 REGPARAM2 op_4ef9_0_comp_ff(uae_u32 opcode) /* JMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (d16,PC) */ +uae_u32 REGPARAM2 op_4efa_0_comp_ff(uae_u32 opcode) /* JMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4efb_0_comp_ff(uae_u32 opcode) /* JMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,Dn */ +uae_u32 REGPARAM2 op_5000_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(An) */ +uae_u32 REGPARAM2 op_5010_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(An)+ */ +uae_u32 REGPARAM2 op_5018_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,-(An) */ +uae_u32 REGPARAM2 op_5020_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(d16,An) */ +uae_u32 REGPARAM2 op_5028_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5030_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(xxx).W */ +uae_u32 REGPARAM2 op_5038_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(xxx).L */ +uae_u32 REGPARAM2 op_5039_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,Dn */ +uae_u32 REGPARAM2 op_5040_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDAQ.W #,An */ +uae_u32 REGPARAM2 op_5048_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(An) */ +uae_u32 REGPARAM2 op_5050_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(An)+ */ +uae_u32 REGPARAM2 op_5058_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,-(An) */ +uae_u32 REGPARAM2 op_5060_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(d16,An) */ +uae_u32 REGPARAM2 op_5068_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5070_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(xxx).W */ +uae_u32 REGPARAM2 op_5078_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(xxx).L */ +uae_u32 REGPARAM2 op_5079_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,Dn */ +uae_u32 REGPARAM2 op_5080_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDAQ.L #,An */ +uae_u32 REGPARAM2 op_5088_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(An) */ +uae_u32 REGPARAM2 op_5090_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(An)+ */ +uae_u32 REGPARAM2 op_5098_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_5 +/* ADDQ.L #,-(An) */ +uae_u32 REGPARAM2 op_50a0_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(d16,An) */ +uae_u32 REGPARAM2 op_50a8_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_50b0_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(xxx).W */ +uae_u32 REGPARAM2 op_50b8_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(xxx).L */ +uae_u32 REGPARAM2 op_50b9_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_50c0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_50c8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_50d0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_50d8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_50e0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_50e8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_50f0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_50f8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_50f9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,Dn */ +uae_u32 REGPARAM2 op_5100_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(An) */ +uae_u32 REGPARAM2 op_5110_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(An)+ */ +uae_u32 REGPARAM2 op_5118_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,-(An) */ +uae_u32 REGPARAM2 op_5120_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(d16,An) */ +uae_u32 REGPARAM2 op_5128_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5130_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(xxx).W */ +uae_u32 REGPARAM2 op_5138_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(xxx).L */ +uae_u32 REGPARAM2 op_5139_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,Dn */ +uae_u32 REGPARAM2 op_5140_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBAQ.W #,An */ +uae_u32 REGPARAM2 op_5148_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(An) */ +uae_u32 REGPARAM2 op_5150_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(An)+ */ +uae_u32 REGPARAM2 op_5158_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,-(An) */ +uae_u32 REGPARAM2 op_5160_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(d16,An) */ +uae_u32 REGPARAM2 op_5168_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5170_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(xxx).W */ +uae_u32 REGPARAM2 op_5178_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(xxx).L */ +uae_u32 REGPARAM2 op_5179_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,Dn */ +uae_u32 REGPARAM2 op_5180_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBAQ.L #,An */ +uae_u32 REGPARAM2 op_5188_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(An) */ +uae_u32 REGPARAM2 op_5190_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(An)+ */ +uae_u32 REGPARAM2 op_5198_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,-(An) */ +uae_u32 REGPARAM2 op_51a0_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(d16,An) */ +uae_u32 REGPARAM2 op_51a8_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_51b0_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(xxx).W */ +uae_u32 REGPARAM2 op_51b8_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(xxx).L */ +uae_u32 REGPARAM2 op_51b9_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_51c0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_51c8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + start_needflags(); + sub_w_ri(src,1); + end_needflags(); + { + uae_u32 v2; + uae_u32 v1=get_const(PC_P); + v2=get_const(offs); + register_branch(v1,v2,3); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_51d0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_51d8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_51e0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_51e8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_51f0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_51f8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_51f9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_52c0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_52c8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,7); + cmov_l_rr(src,nsrc,7); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_52d0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_52d8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_52e0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_52e8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_52f0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_52f8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_52f9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_53c0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_53c8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,6); + cmov_l_rr(src,nsrc,6); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_53d0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_53d8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_53e0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_53e8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_53f0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_53f8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_53f9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_54c0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_54c8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,3); + cmov_l_rr(src,nsrc,3); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_54d0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_54d8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_54e0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_54e8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_54f0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_54f8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_54f9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_55c0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_55c8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,2); + cmov_l_rr(src,nsrc,2); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_55d0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_55d8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_55e0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_55e8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_55f0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_55f8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_55f9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_56c0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_56c8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,5); + cmov_l_rr(src,nsrc,5); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_56d0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_56d8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_56e0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_56e8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_56f0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_56f8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_56f9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_57c0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_57c8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,4); + cmov_l_rr(src,nsrc,4); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_57d0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_57d8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_57e0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_57e8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_57f0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_57f8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_57f9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5ac0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5ac8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,9); + cmov_l_rr(src,nsrc,9); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5ad0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5ad8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ae0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ae8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5af0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5af8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5af9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5bc0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5bc8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,8); + cmov_l_rr(src,nsrc,8); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5bd0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5bd8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5be0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5be8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5bf0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5bf8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5bf9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5cc0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5cc8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,13); + cmov_l_rr(src,nsrc,13); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5cd0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5cd8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ce0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ce8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5cf0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5cf8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5cf9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5dc0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5dc8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,12); + cmov_l_rr(src,nsrc,12); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5dd0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5dd8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5de0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5de8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5df0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5df8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5df9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5ec0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5ec8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,15); + cmov_l_rr(src,nsrc,15); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5ed0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5ed8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ee0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ee8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5ef0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5ef8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5ef9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5fc0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5fc8_0_comp_ff(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,14); + cmov_l_rr(src,nsrc,14); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5fd0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5fd8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5fe0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5fe8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5ff0_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5ff8_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5ff9_0_comp_ff(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6000_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + mov_l_rr(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6001_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + mov_l_rr(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_60ff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + mov_l_rr(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSR.W #.W */ +uae_u32 REGPARAM2 op_6100_0_comp_ff(uae_u32 opcode) /* BSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + add_l_ri(src,m68k_pc_offset_thisinst+2); + m68k_pc_offset=0; + add_l(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSRQ.B # */ +uae_u32 REGPARAM2 op_6101_0_comp_ff(uae_u32 opcode) /* BSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + add_l_ri(src,m68k_pc_offset_thisinst+2); + m68k_pc_offset=0; + add_l(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSR.L #.L */ +uae_u32 REGPARAM2 op_61ff_0_comp_ff(uae_u32 opcode) /* BSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + add_l_ri(src,m68k_pc_offset_thisinst+2); + m68k_pc_offset=0; + add_l(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6200_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,7); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6201_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,7); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_62ff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,7); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6300_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,6); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6301_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,6); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_6 +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_63ff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,6); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6400_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,3); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6401_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,3); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_64ff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,3); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6500_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,2); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6501_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,2); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_65ff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,2); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6600_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,5); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6601_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,5); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_66ff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,5); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6700_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,4); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6701_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,4); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_67ff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,4); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6a00_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,9); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6a01_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,9); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6aff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,9); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6b00_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,8); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6b01_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,8); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6bff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,8); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6c00_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,13); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6c01_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,13); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6cff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,13); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6d00_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,12); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6d01_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,12); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6dff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,12); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6e00_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,15); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6e01_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,15); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6eff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,15); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6f00_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,14); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6f01_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,14); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6fff_0_comp_ff(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,14); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEQ.L #,Dn */ +uae_u32 REGPARAM2 op_7000_0_comp_ff(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + { + if (src!=dst) { + mov_l_ri(dst,0); + start_needflags(); + or_l(dst,src); + } else { + mov_l_rr(dst,src); + test_l_rr(dst,dst); + } + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,Dn */ +uae_u32 REGPARAM2 op_8000_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (An),Dn */ +uae_u32 REGPARAM2 op_8010_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (An)+,Dn */ +uae_u32 REGPARAM2 op_8018_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B -(An),Dn */ +uae_u32 REGPARAM2 op_8020_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_8028_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_8030_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_8038_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_8039_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_803a_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_803b_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,Dn */ +uae_u32 REGPARAM2 op_803c_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,Dn */ +uae_u32 REGPARAM2 op_8040_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (An),Dn */ +uae_u32 REGPARAM2 op_8050_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (An)+,Dn */ +uae_u32 REGPARAM2 op_8058_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W -(An),Dn */ +uae_u32 REGPARAM2 op_8060_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_8068_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_8070_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_8078_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_8079_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_807a_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_807b_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,Dn */ +uae_u32 REGPARAM2 op_807c_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,Dn */ +uae_u32 REGPARAM2 op_8080_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (An),Dn */ +uae_u32 REGPARAM2 op_8090_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (An)+,Dn */ +uae_u32 REGPARAM2 op_8098_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L -(An),Dn */ +uae_u32 REGPARAM2 op_80a0_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_80a8_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_80b0_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_80b8_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_80b9_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_80ba_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_80bb_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,Dn */ +uae_u32 REGPARAM2 op_80bc_0_comp_ff(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(An) */ +uae_u32 REGPARAM2 op_8110_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_8118_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_8120_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_8128_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8130_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_8138_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_8139_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(An) */ +uae_u32 REGPARAM2 op_8150_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_8158_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,-(An) */ +uae_u32 REGPARAM2 op_8160_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_8168_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8170_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_8178_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_8179_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + or_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(An) */ +uae_u32 REGPARAM2 op_8190_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_8198_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,-(An) */ +uae_u32 REGPARAM2 op_81a0_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_81a8_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_81b0_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_81b8_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_81b9_0_comp_ff(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + or_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,Dn */ +uae_u32 REGPARAM2 op_9000_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (An),Dn */ +uae_u32 REGPARAM2 op_9010_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (An)+,Dn */ +uae_u32 REGPARAM2 op_9018_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B -(An),Dn */ +uae_u32 REGPARAM2 op_9020_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_9028_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_9030_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_9038_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_9039_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_903a_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_903b_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,Dn */ +uae_u32 REGPARAM2 op_903c_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,Dn */ +uae_u32 REGPARAM2 op_9040_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W An,Dn */ +uae_u32 REGPARAM2 op_9048_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (An),Dn */ +uae_u32 REGPARAM2 op_9050_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (An)+,Dn */ +uae_u32 REGPARAM2 op_9058_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W -(An),Dn */ +uae_u32 REGPARAM2 op_9060_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_9068_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_9070_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_9078_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_9079_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_907a_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_907b_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,Dn */ +uae_u32 REGPARAM2 op_907c_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,Dn */ +uae_u32 REGPARAM2 op_9080_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L An,Dn */ +uae_u32 REGPARAM2 op_9088_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (An),Dn */ +uae_u32 REGPARAM2 op_9090_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (An)+,Dn */ +uae_u32 REGPARAM2 op_9098_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L -(An),Dn */ +uae_u32 REGPARAM2 op_90a0_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_90a8_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_90b0_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_90b8_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_90b9_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_90ba_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_90bb_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,Dn */ +uae_u32 REGPARAM2 op_90bc_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W Dn,An */ +uae_u32 REGPARAM2 op_90c0_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W An,An */ +uae_u32 REGPARAM2 op_90c8_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (An),An */ +uae_u32 REGPARAM2 op_90d0_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (An)+,An */ +uae_u32 REGPARAM2 op_90d8_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W -(An),An */ +uae_u32 REGPARAM2 op_90e0_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (d16,An),An */ +uae_u32 REGPARAM2 op_90e8_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_90f0_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_90f8_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_90f9_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_90fa_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_90fb_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W #.W,An */ +uae_u32 REGPARAM2 op_90fc_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.B Dn,Dn */ +uae_u32 REGPARAM2 op_9100_0_comp_ff(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.B -(An),-(An) */ +uae_u32 REGPARAM2 op_9108_0_comp_ff(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(An) */ +uae_u32 REGPARAM2 op_9110_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_9118_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,-(An) */ +uae_u32 REGPARAM2 op_9120_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_9128_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_9130_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_9138_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_9139_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.W Dn,Dn */ +uae_u32 REGPARAM2 op_9140_0_comp_ff(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.W -(An),-(An) */ +uae_u32 REGPARAM2 op_9148_0_comp_ff(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(An) */ +uae_u32 REGPARAM2 op_9150_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_9158_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,-(An) */ +uae_u32 REGPARAM2 op_9160_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_9168_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_9170_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_9178_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_9179_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + sub_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.L Dn,Dn */ +uae_u32 REGPARAM2 op_9180_0_comp_ff(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.L -(An),-(An) */ +uae_u32 REGPARAM2 op_9188_0_comp_ff(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + sbb_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(An) */ +uae_u32 REGPARAM2 op_9190_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_9198_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,-(An) */ +uae_u32 REGPARAM2 op_91a0_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_91a8_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_91b0_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_91b8_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_91b9_0_comp_ff(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + sub_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L Dn,An */ +uae_u32 REGPARAM2 op_91c0_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L An,An */ +uae_u32 REGPARAM2 op_91c8_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (An),An */ +uae_u32 REGPARAM2 op_91d0_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (An)+,An */ +uae_u32 REGPARAM2 op_91d8_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L -(An),An */ +uae_u32 REGPARAM2 op_91e0_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (d16,An),An */ +uae_u32 REGPARAM2 op_91e8_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_91f0_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_91f8_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_91f9_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_91fa_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_91fb_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L #.L,An */ +uae_u32 REGPARAM2 op_91fc_0_comp_ff(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B Dn,Dn */ +uae_u32 REGPARAM2 op_b000_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (An),Dn */ +uae_u32 REGPARAM2 op_b010_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (An)+,Dn */ +uae_u32 REGPARAM2 op_b018_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B -(An),Dn */ +uae_u32 REGPARAM2 op_b020_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_b028_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b030_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b038_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b039_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b03a_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b03b_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,Dn */ +uae_u32 REGPARAM2 op_b03c_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W Dn,Dn */ +uae_u32 REGPARAM2 op_b040_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W An,Dn */ +uae_u32 REGPARAM2 op_b048_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (An),Dn */ +uae_u32 REGPARAM2 op_b050_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (An)+,Dn */ +uae_u32 REGPARAM2 op_b058_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W -(An),Dn */ +uae_u32 REGPARAM2 op_b060_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_b068_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b070_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b078_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b079_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b07a_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b07b_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,Dn */ +uae_u32 REGPARAM2 op_b07c_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L Dn,Dn */ +uae_u32 REGPARAM2 op_b080_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L An,Dn */ +uae_u32 REGPARAM2 op_b088_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (An),Dn */ +uae_u32 REGPARAM2 op_b090_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (An)+,Dn */ +uae_u32 REGPARAM2 op_b098_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L -(An),Dn */ +uae_u32 REGPARAM2 op_b0a0_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_7 +/* CMP.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_b0a8_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b0b0_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b0b8_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b0b9_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b0ba_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b0bb_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,Dn */ +uae_u32 REGPARAM2 op_b0bc_0_comp_ff(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W Dn,An */ +uae_u32 REGPARAM2 op_b0c0_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W An,An */ +uae_u32 REGPARAM2 op_b0c8_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (An),An */ +uae_u32 REGPARAM2 op_b0d0_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (An)+,An */ +uae_u32 REGPARAM2 op_b0d8_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W -(An),An */ +uae_u32 REGPARAM2 op_b0e0_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (d16,An),An */ +uae_u32 REGPARAM2 op_b0e8_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_b0f0_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_b0f8_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_b0f9_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_b0fa_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_b0fb_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W #.W,An */ +uae_u32 REGPARAM2 op_b0fc_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,Dn */ +uae_u32 REGPARAM2 op_b100_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPM.B (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b108_0_comp_ff(uae_u32 opcode) /* CMPM */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + dont_care_flags(); + start_needflags(); + cmp_b(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(An) */ +uae_u32 REGPARAM2 op_b110_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_b118_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_b120_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b128_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b130_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b138_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b139_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,Dn */ +uae_u32 REGPARAM2 op_b140_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPM.W (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b148_0_comp_ff(uae_u32 opcode) /* CMPM */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + { + dont_care_flags(); + start_needflags(); + cmp_w(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(An) */ +uae_u32 REGPARAM2 op_b150_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_b158_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,-(An) */ +uae_u32 REGPARAM2 op_b160_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b168_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b170_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b178_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b179_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + xor_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,Dn */ +uae_u32 REGPARAM2 op_b180_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPM.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b188_0_comp_ff(uae_u32 opcode) /* CMPM */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + { + dont_care_flags(); + start_needflags(); + cmp_l(dst,src); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(An) */ +uae_u32 REGPARAM2 op_b190_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_b198_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,-(An) */ +uae_u32 REGPARAM2 op_b1a0_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b1a8_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b1b0_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b1b8_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b1b9_0_comp_ff(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + xor_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L Dn,An */ +uae_u32 REGPARAM2 op_b1c0_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L An,An */ +uae_u32 REGPARAM2 op_b1c8_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (An),An */ +uae_u32 REGPARAM2 op_b1d0_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (An)+,An */ +uae_u32 REGPARAM2 op_b1d8_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L -(An),An */ +uae_u32 REGPARAM2 op_b1e0_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (d16,An),An */ +uae_u32 REGPARAM2 op_b1e8_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_b1f0_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_b1f8_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_b1f9_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_b1fa_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_b1fb_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L #.L,An */ +uae_u32 REGPARAM2 op_b1fc_0_comp_ff(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + start_needflags(); + cmp_l(dst,tmps); + live_flags(); + end_needflags(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,Dn */ +uae_u32 REGPARAM2 op_c000_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (An),Dn */ +uae_u32 REGPARAM2 op_c010_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (An)+,Dn */ +uae_u32 REGPARAM2 op_c018_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B -(An),Dn */ +uae_u32 REGPARAM2 op_c020_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_c028_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c030_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c038_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c039_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c03a_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c03b_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,Dn */ +uae_u32 REGPARAM2 op_c03c_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,Dn */ +uae_u32 REGPARAM2 op_c040_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (An),Dn */ +uae_u32 REGPARAM2 op_c050_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c058_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W -(An),Dn */ +uae_u32 REGPARAM2 op_c060_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c068_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c070_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c078_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c079_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c07a_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c07b_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,Dn */ +uae_u32 REGPARAM2 op_c07c_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,Dn */ +uae_u32 REGPARAM2 op_c080_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (An),Dn */ +uae_u32 REGPARAM2 op_c090_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (An)+,Dn */ +uae_u32 REGPARAM2 op_c098_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L -(An),Dn */ +uae_u32 REGPARAM2 op_c0a0_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_c0a8_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c0b0_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c0b8_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c0b9_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c0ba_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c0bb_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,Dn */ +uae_u32 REGPARAM2 op_c0bc_0_comp_ff(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W Dn,Dn */ +uae_u32 REGPARAM2 op_c0c0_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int src = srcreg; + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (An),Dn */ +uae_u32 REGPARAM2 op_c0d0_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c0d8_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W -(An),Dn */ +uae_u32 REGPARAM2 op_c0e0_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c0e8_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c0f0_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c0f8_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c0f9_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c0fa_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c0fb_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W #.W,Dn */ +uae_u32 REGPARAM2 op_c0fc_0_comp_ff(uae_u32 opcode) /* MULU */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(An) */ +uae_u32 REGPARAM2 op_c110_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_c118_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,-(An) */ +uae_u32 REGPARAM2 op_c120_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c128_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c130_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c138_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c139_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_b(dst,src); + live_flags(); + end_needflags(); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXG.L Dn,Dn */ +uae_u32 REGPARAM2 op_c140_0_comp_ff(uae_u32 opcode) /* EXG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + int tmp=scratchie++; + mov_l_rr(tmp,src); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + if(dstreg != tmp) { + mov_l_rr(dstreg, tmp); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXG.L An,An */ +uae_u32 REGPARAM2 op_c148_0_comp_ff(uae_u32 opcode) /* EXG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + mov_l_rr(tmp,src); + if(srcreg + 8 != dst) { + mov_l_rr(srcreg + 8, dst); + } + if(dstreg + 8 != tmp) { + mov_l_rr(dstreg + 8, tmp); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(An) */ +uae_u32 REGPARAM2 op_c150_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_c158_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,-(An) */ +uae_u32 REGPARAM2 op_c160_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c168_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c170_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c178_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c179_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + start_needflags(); + and_w(dst,src); + live_flags(); + end_needflags(); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXG.L Dn,An */ +uae_u32 REGPARAM2 op_c188_0_comp_ff(uae_u32 opcode) /* EXG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + mov_l_rr(tmp,src); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + if(dstreg + 8 != tmp) { + mov_l_rr(dstreg + 8, tmp); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(An) */ +uae_u32 REGPARAM2 op_c190_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_c198_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,-(An) */ +uae_u32 REGPARAM2 op_c1a0_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c1a8_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c1b0_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c1b8_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c1b9_0_comp_ff(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + start_needflags(); + and_l(dst,src); + live_flags(); + end_needflags(); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W Dn,Dn */ +uae_u32 REGPARAM2 op_c1c0_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int src = srcreg; + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (An),Dn */ +uae_u32 REGPARAM2 op_c1d0_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c1d8_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W -(An),Dn */ +uae_u32 REGPARAM2 op_c1e0_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c1e8_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c1f0_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c1f8_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c1f9_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c1fa_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c1fb_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W #.W,Dn */ +uae_u32 REGPARAM2 op_c1fc_0_comp_ff(uae_u32 opcode) /* MULS */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + dont_care_flags(); + { + start_needflags(); + test_l_rr(dst,dst); + live_flags(); + end_needflags(); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,Dn */ +uae_u32 REGPARAM2 op_d000_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (An),Dn */ +uae_u32 REGPARAM2 op_d010_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (An)+,Dn */ +uae_u32 REGPARAM2 op_d018_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B -(An),Dn */ +uae_u32 REGPARAM2 op_d020_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_d028_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d030_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d038_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d039_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d03a_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d03b_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,Dn */ +uae_u32 REGPARAM2 op_d03c_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,Dn */ +uae_u32 REGPARAM2 op_d040_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W An,Dn */ +uae_u32 REGPARAM2 op_d048_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (An),Dn */ +uae_u32 REGPARAM2 op_d050_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (An)+,Dn */ +uae_u32 REGPARAM2 op_d058_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W -(An),Dn */ +uae_u32 REGPARAM2 op_d060_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_d068_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d070_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d078_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d079_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d07a_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d07b_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,Dn */ +uae_u32 REGPARAM2 op_d07c_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,Dn */ +uae_u32 REGPARAM2 op_d080_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L An,Dn */ +uae_u32 REGPARAM2 op_d088_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (An),Dn */ +uae_u32 REGPARAM2 op_d090_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (An)+,Dn */ +uae_u32 REGPARAM2 op_d098_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L -(An),Dn */ +uae_u32 REGPARAM2 op_d0a0_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_d0a8_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d0b0_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d0b8_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d0b9_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d0ba_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d0bb_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,Dn */ +uae_u32 REGPARAM2 op_d0bc_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W Dn,An */ +uae_u32 REGPARAM2 op_d0c0_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W An,An */ +uae_u32 REGPARAM2 op_d0c8_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (An),An */ +uae_u32 REGPARAM2 op_d0d0_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (An)+,An */ +uae_u32 REGPARAM2 op_d0d8_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W -(An),An */ +uae_u32 REGPARAM2 op_d0e0_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (d16,An),An */ +uae_u32 REGPARAM2 op_d0e8_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_d0f0_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_d0f8_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_d0f9_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_d0fa_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_d0fb_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W #.W,An */ +uae_u32 REGPARAM2 op_d0fc_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.B Dn,Dn */ +uae_u32 REGPARAM2 op_d100_0_comp_ff(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + adc_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.B -(An),-(An) */ +uae_u32 REGPARAM2 op_d108_0_comp_ff(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + adc_b(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(An) */ +uae_u32 REGPARAM2 op_d110_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_d118_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,-(An) */ +uae_u32 REGPARAM2 op_d120_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d128_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d130_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d138_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d139_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_b(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.W Dn,Dn */ +uae_u32 REGPARAM2 op_d140_0_comp_ff(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + adc_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.W -(An),-(An) */ +uae_u32 REGPARAM2 op_d148_0_comp_ff(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + adc_w(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(An) */ +uae_u32 REGPARAM2 op_d150_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_d158_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,-(An) */ +uae_u32 REGPARAM2 op_d160_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d168_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d170_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d178_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d179_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + start_needflags(); + add_w(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.L Dn,Dn */ +uae_u32 REGPARAM2 op_d180_0_comp_ff(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + adc_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.L -(An),-(An) */ +uae_u32 REGPARAM2 op_d188_0_comp_ff(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + { + int zero=scratchie++; + int one=scratchie++; + if (needed_flags&FLAG_Z) { + mov_l_ri(zero,0); + mov_l_ri(one,-1); + make_flags_live(); + cmov_l_rr(zero,one,5); + } + restore_carry(); + start_needflags(); + adc_l(dst,src); + live_flags(); + if (needed_flags&FLAG_Z) { + cmov_l_rr(zero,one,5); + set_zero(zero, one); + live_flags(); + } + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(An) */ +uae_u32 REGPARAM2 op_d190_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_d198_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,-(An) */ +uae_u32 REGPARAM2 op_d1a0_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d1a8_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d1b0_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d1b8_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d1b9_0_comp_ff(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + start_needflags(); + add_l(dst,src); + live_flags(); + end_needflags(); + if (needed_flags&FLAG_X) { + duplicate_carry(); + } + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L Dn,An */ +uae_u32 REGPARAM2 op_d1c0_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L An,An */ +uae_u32 REGPARAM2 op_d1c8_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (An),An */ +uae_u32 REGPARAM2 op_d1d0_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (An)+,An */ +uae_u32 REGPARAM2 op_d1d8_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L -(An),An */ +uae_u32 REGPARAM2 op_d1e0_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (d16,An),An */ +uae_u32 REGPARAM2 op_d1e8_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_d1f0_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_d1f8_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_d1f9_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_d1fa_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_d1fb_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L #.L,An */ +uae_u32 REGPARAM2 op_d1fc_0_comp_ff(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ASRQ.B #,Dn */ +uae_u32 REGPARAM2 op_e000_0_comp_ff(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shra_b_ri(data,srcreg); + live_flags(); + end_needflags(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSRQ.B #,Dn */ +uae_u32 REGPARAM2 op_e008_0_comp_ff(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shrl_b_ri(data,srcreg); + live_flags(); + end_needflags(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* RORQ.B #,Dn */ +uae_u32 REGPARAM2 op_e018_0_comp_ff(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + ror_b_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_b_rr(data,data); + } + bt_l_ri(cdata,0x07); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e020_0_comp_ff(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int setval = scratchie++; + int odata = scratchie++; + mov_l_ri(cdata, 0); + mov_l_ri(setval, 0xffffffff); + test_l_ri(data, 0x00000080); + cmov_l_rr(setval, cdata, NATIVE_CC_EQ); + mov_l_rr(cdata, setval); + mov_l_rr(odata, setval); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, tmpcnt, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x08); + cmov_l_rr(cdata, setval, NATIVE_CC_HI); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shra_b_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 0, 0, 0); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_b_rr(data, cdata); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e028_0_comp_ff(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int odata = scratchie++; + mov_l_rr(odata, data); + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, cdata, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x08); + cmov_l_rr(odata, cdata, NATIVE_CC_HI); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shrl_b_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 7, 0, 1); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_b_rr(data, cdata); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e038_0_comp_ff(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + ror_b_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_b_rr(data,data); + } + bt_l_ri(cdata,0x07); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASRQ.W #,Dn */ +uae_u32 REGPARAM2 op_e040_0_comp_ff(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shra_w_ri(data,srcreg); + live_flags(); + end_needflags(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +#endif + +#ifdef PART_8 +/* LSRQ.W #,Dn */ +uae_u32 REGPARAM2 op_e048_0_comp_ff(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shrl_w_ri(data,srcreg); + live_flags(); + end_needflags(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* RORQ.W #,Dn */ +uae_u32 REGPARAM2 op_e058_0_comp_ff(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + ror_w_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_w_rr(data,data); + } + bt_l_ri(cdata,0x0f); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e060_0_comp_ff(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int setval = scratchie++; + int odata = scratchie++; + mov_l_ri(cdata, 0); + mov_l_ri(setval, 0xffffffff); + test_l_ri(data, 0x00008000); + cmov_l_rr(setval, cdata, NATIVE_CC_EQ); + mov_l_rr(cdata, setval); + mov_l_rr(odata, setval); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, tmpcnt, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x10); + cmov_l_rr(cdata, setval, NATIVE_CC_HI); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shra_w_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 0, 1, 0); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_w_rr(data, cdata); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e068_0_comp_ff(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int odata = scratchie++; + mov_l_rr(odata, data); + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, cdata, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x10); + cmov_l_rr(odata, cdata, NATIVE_CC_HI); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shrl_w_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 15, 1, 1); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_w_rr(data, cdata); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e078_0_comp_ff(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + ror_w_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_w_rr(data,data); + } + bt_l_ri(cdata,0x0f); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASRQ.L #,Dn */ +uae_u32 REGPARAM2 op_e080_0_comp_ff(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shra_l_ri(data,srcreg); + live_flags(); + end_needflags(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSRQ.L #,Dn */ +uae_u32 REGPARAM2 op_e088_0_comp_ff(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shrl_l_ri(data,srcreg); + live_flags(); + end_needflags(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* RORQ.L #,Dn */ +uae_u32 REGPARAM2 op_e098_0_comp_ff(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + ror_l_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_l_rr(data,data); + } + bt_l_ri(cdata,0x1f); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0a0_0_comp_ff(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int setval = scratchie++; + int odata = scratchie++; + mov_l_ri(cdata, 0); + mov_l_ri(setval, 0xffffffff); + test_l_ri(data, 0x80000000); + cmov_l_rr(setval, cdata, NATIVE_CC_EQ); + mov_l_rr(cdata, setval); + mov_l_rr(odata, setval); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, tmpcnt, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x20); + cmov_l_rr(cdata, setval, NATIVE_CC_HI); + cmov_l_rr(data, setval, NATIVE_CC_EQ); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shra_l_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 0, 2, 0); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_l_rr(data, cdata); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0a8_0_comp_ff(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int odata = scratchie++; + mov_l_rr(odata, data); + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, cdata, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x20); + cmov_l_rr(odata, cdata, NATIVE_CC_HI); + cmov_l_rr(data, cdata, NATIVE_CC_EQ); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shrl_l_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 31, 2, 1); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_l_rr(data, cdata); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0b8_0_comp_ff(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + ror_l_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_l_rr(data,data); + } + bt_l_ri(cdata,0x1f); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e100_0_comp_ff(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shll_b_ri(data,srcreg); + live_flags(); + end_needflags(); + clear_overflow(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e108_0_comp_ff(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shll_b_ri(data,srcreg); + live_flags(); + end_needflags(); + clear_overflow(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e118_0_comp_ff(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + rol_b_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_b_rr(data,data); + } + bt_l_ri(cdata,0x00); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e120_0_comp_ff(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int odata = scratchie++; + mov_l_rr(odata, data); + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, cdata, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x08); + cmov_l_rr(odata, cdata, NATIVE_CC_HI); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_b_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 0, 0, 1); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_b_rr(data, cdata); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e128_0_comp_ff(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int odata = scratchie++; + mov_l_rr(odata, data); + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, cdata, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x08); + cmov_l_rr(odata, cdata, NATIVE_CC_HI); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_b_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 0, 0, 1); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_b_rr(data, cdata); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e138_0_comp_ff(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + rol_b_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_b_rr(data,data); + } + bt_l_ri(cdata,0x00); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e140_0_comp_ff(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shll_w_ri(data,srcreg); + live_flags(); + end_needflags(); + clear_overflow(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e148_0_comp_ff(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shll_w_ri(data,srcreg); + live_flags(); + end_needflags(); + clear_overflow(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e158_0_comp_ff(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + rol_w_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_w_rr(data,data); + } + bt_l_ri(cdata,0x00); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e160_0_comp_ff(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int odata = scratchie++; + mov_l_rr(odata, data); + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, cdata, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x10); + cmov_l_rr(odata, cdata, NATIVE_CC_HI); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_w_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 0, 1, 1); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_w_rr(data, cdata); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e168_0_comp_ff(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int odata = scratchie++; + mov_l_rr(odata, data); + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, cdata, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x10); + cmov_l_rr(odata, cdata, NATIVE_CC_HI); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_w_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 0, 1, 1); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_w_rr(data, cdata); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e178_0_comp_ff(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + rol_w_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_w_rr(data,data); + } + bt_l_ri(cdata,0x00); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e180_0_comp_ff(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shll_l_ri(data,srcreg); + live_flags(); + end_needflags(); + clear_overflow(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e188_0_comp_ff(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + start_needflags(); + shll_l_ri(data,srcreg); + live_flags(); + end_needflags(); + clear_overflow(); + duplicate_carry(); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e198_0_comp_ff(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + rol_l_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_l_rr(data,data); + } + bt_l_ri(cdata,0x00); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1a0_0_comp_ff(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int odata = scratchie++; + mov_l_rr(odata, data); + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, cdata, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x20); + cmov_l_rr(odata, cdata, NATIVE_CC_HI); + cmov_l_rr(data, cdata, NATIVE_CC_EQ); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_l_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 0, 2, 1); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_l_rr(data, cdata); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1a8_0_comp_ff(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + start_needflags(); + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int odata = scratchie++; + mov_l_rr(odata, data); + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmov_l_rr(odata, cdata, NATIVE_CC_EQ); + cmp_b_ri(tmpcnt, 0x20); + cmov_l_rr(odata, cdata, NATIVE_CC_HI); + cmov_l_rr(data, cdata, NATIVE_CC_EQ); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_l_rr(cdata, tmpcnt); + live_flags(); + end_needflags(); + setcc_for_cntzero(tmpcnt, cdata, odata, 0, 2, 1); + if (!(needed_flags & FLAG_CZNV)) dont_care_flags(); + mov_l_rr(data, cdata); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1b8_0_comp_ff(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + rol_l_rr(data,cnt); + start_needflags(); + int cdata = scratchie++; + int zero = scratchie++; + int tmpcnt = scratchie++; + mov_l_rr(cdata,data); + mov_l_rr(tmpcnt,cnt); + mov_l_ri(zero,0); + and_l_ri(tmpcnt,63); + cmov_l_rr(cdata,zero,NATIVE_CC_EQ); + if (needed_flags & FLAG_ZNV) { + test_l_rr(data,data); + } + bt_l_ri(cdata,0x00); + live_flags(); + end_needflags(); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,Dn */ +uae_u32 REGPARAM2 op_f200_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,An */ +uae_u32 REGPARAM2 op_f208_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(An) */ +uae_u32 REGPARAM2 op_f210_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_f218_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,-(An) */ +uae_u32 REGPARAM2 op_f220_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_f228_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_f230_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_f238_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_f239_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_f23a_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_f23b_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,#.L */ +uae_u32 REGPARAM2 op_f23c_0_comp_ff(uae_u32 opcode) /* FPP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,Dn */ +uae_u32 REGPARAM2 op_f240_0_comp_ff(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(An) */ +uae_u32 REGPARAM2 op_f250_0_comp_ff(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_f258_0_comp_ff(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,-(An) */ +uae_u32 REGPARAM2 op_f260_0_comp_ff(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_f268_0_comp_ff(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_f270_0_comp_ff(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_f278_0_comp_ff(uae_u32 opcode) /* FScc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_f279_0_comp_ff(uae_u32 opcode) /* FScc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FBccQ.L #,#.W */ +uae_u32 REGPARAM2 op_f280_0_comp_ff(uae_u32 opcode) /* FBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 63); + #else + uae_s32 srcreg = (opcode & 63); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + comp_fbcc_opp(opcode); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FBccQ.L #,#.L */ +uae_u32 REGPARAM2 op_f2c0_0_comp_ff(uae_u32 opcode) /* FBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 63); + #else + uae_s32 srcreg = (opcode & 63); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + comp_fbcc_opp(opcode); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* MOVE16.L (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_f600_0_comp_ff(uae_u32 opcode) /* MOVE16 */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int src=scratchie++; + int dst=scratchie++; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + mov_l_rr(src,srca); + mov_l_rr(dst,dsta); + and_l_ri(src,~15); + and_l_ri(dst,~15); + add_l_ri(srcreg+8,16); + if (special_mem || jit_n_addr_unsafe) { + int tmp=scratchie; + scratchie+=4; + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + } else + { + int tmp=scratchie; + scratchie+=4; + get_n_addr(src,src,scratchie); + get_n_addr(dst,dst,scratchie); + mov_l_rR(tmp+0,src,0); + mov_l_rR(tmp+1,src,4); + mov_l_rR(tmp+2,src,8); + mov_l_rR(tmp+3,src,12); + mov_l_Rr(dst,tmp+0,0); + forget_about(tmp+0); + mov_l_Rr(dst,tmp+1,4); + forget_about(tmp+1); + mov_l_Rr(dst,tmp+2,8); + forget_about(tmp+2); + mov_l_Rr(dst,tmp+3,12); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE16.L (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_f608_0_comp_ff(uae_u32 opcode) /* MOVE16 */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int src=scratchie++; + int dst=scratchie++; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + mov_l_rr(src,srca); + mov_l_rr(dst,dsta); + and_l_ri(src,~15); + and_l_ri(dst,~15); + add_l_ri(dstreg+8,16); + if (special_mem || jit_n_addr_unsafe) { + int tmp=scratchie; + scratchie+=4; + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + } else + { + int tmp=scratchie; + scratchie+=4; + get_n_addr(src,src,scratchie); + get_n_addr(dst,dst,scratchie); + mov_l_rR(tmp+0,src,0); + mov_l_rR(tmp+1,src,4); + mov_l_rR(tmp+2,src,8); + mov_l_rR(tmp+3,src,12); + mov_l_Rr(dst,tmp+0,0); + forget_about(tmp+0); + mov_l_Rr(dst,tmp+1,4); + forget_about(tmp+1); + mov_l_Rr(dst,tmp+2,8); + forget_about(tmp+2); + mov_l_Rr(dst,tmp+3,12); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE16.L (An),(xxx).L */ +uae_u32 REGPARAM2 op_f610_0_comp_ff(uae_u32 opcode) /* MOVE16 */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int src=scratchie++; + int dst=scratchie++; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + mov_l_rr(src,srca); + mov_l_rr(dst,dsta); + and_l_ri(src,~15); + and_l_ri(dst,~15); + if (special_mem || jit_n_addr_unsafe) { + int tmp=scratchie; + scratchie+=4; + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + } else + { + int tmp=scratchie; + scratchie+=4; + get_n_addr(src,src,scratchie); + get_n_addr(dst,dst,scratchie); + mov_l_rR(tmp+0,src,0); + mov_l_rR(tmp+1,src,4); + mov_l_rR(tmp+2,src,8); + mov_l_rR(tmp+3,src,12); + mov_l_Rr(dst,tmp+0,0); + forget_about(tmp+0); + mov_l_Rr(dst,tmp+1,4); + forget_about(tmp+1); + mov_l_Rr(dst,tmp+2,8); + forget_about(tmp+2); + mov_l_Rr(dst,tmp+3,12); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE16.L (xxx).L,(An) */ +uae_u32 REGPARAM2 op_f618_0_comp_ff(uae_u32 opcode) /* MOVE16 */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int src=scratchie++; + int dst=scratchie++; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + mov_l_rr(src,srca); + mov_l_rr(dst,dsta); + and_l_ri(src,~15); + and_l_ri(dst,~15); + if (special_mem || jit_n_addr_unsafe) { + int tmp=scratchie; + scratchie+=4; + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + } else + { + int tmp=scratchie; + scratchie+=4; + get_n_addr(src,src,scratchie); + get_n_addr(dst,dst,scratchie); + mov_l_rR(tmp+0,src,0); + mov_l_rR(tmp+1,src,4); + mov_l_rR(tmp+2,src,8); + mov_l_rR(tmp+3,src,12); + mov_l_Rr(dst,tmp+0,0); + forget_about(tmp+0); + mov_l_Rr(dst,tmp+1,4); + forget_about(tmp+1); + mov_l_Rr(dst,tmp+2,8); + forget_about(tmp+2); + mov_l_Rr(dst,tmp+3,12); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE16.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_f620_0_comp_ff(uae_u32 opcode) /* MOVE16 */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_s32 dstreg = 0; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int src=scratchie++; + int dst=scratchie++; + uae_u16 dstreg=((comp_get_iword((m68k_pc_offset+=2)-2))>>12)&0x07; + mov_l_rr(src,8+srcreg); + mov_l_rr(dst,8+dstreg); + and_l_ri(src,~15); + and_l_ri(dst,~15); + if (srcreg != dstreg) { + add_l_ri(srcreg+8,16); + } + add_l_ri(dstreg+8,16); + if (special_mem || jit_n_addr_unsafe) { + int tmp=scratchie; + scratchie+=4; + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + } else + { + int tmp=scratchie; + scratchie+=4; + get_n_addr(src,src,scratchie); + get_n_addr(dst,dst,scratchie); + mov_l_rR(tmp+0,src,0); + mov_l_rR(tmp+1,src,4); + mov_l_rR(tmp+2,src,8); + mov_l_rR(tmp+3,src,12); + mov_l_Rr(dst,tmp+0,0); + forget_about(tmp+0); + mov_l_Rr(dst,tmp+1,4); + forget_about(tmp+1); + mov_l_Rr(dst,tmp+2,8); + forget_about(tmp+2); + mov_l_Rr(dst,tmp+3,12); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + + +#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) +#define PART_1 1 +#define PART_2 1 +#define PART_3 1 +#define PART_4 1 +#define PART_5 1 +#define PART_6 1 +#define PART_7 1 +#define PART_8 1 +#endif + +#ifdef USE_JIT_FPU +extern void comp_fpp_opp(); +extern void comp_fscc_opp(); +extern void comp_fbcc_opp(); +#endif + +#ifdef PART_1 +/* OR.B #.B,Dn */ +uae_u32 REGPARAM2 op_0_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(An) */ +uae_u32 REGPARAM2 op_10_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_18_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,-(An) */ +uae_u32 REGPARAM2 op_20_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_28_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_30_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_38_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_39_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,Dn */ +uae_u32 REGPARAM2 op_40_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(An) */ +uae_u32 REGPARAM2 op_50_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_58_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,-(An) */ +uae_u32 REGPARAM2 op_60_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_68_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_70_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_78_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_79_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,Dn */ +uae_u32 REGPARAM2 op_80_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(An) */ +uae_u32 REGPARAM2 op_90_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_98_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,-(An) */ +uae_u32 REGPARAM2 op_a0_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_a8_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b0_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_b8_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_b9_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.L Dn,Dn */ +uae_u32 REGPARAM2 op_100_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(An) */ +uae_u32 REGPARAM2 op_110_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_118_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,-(An) */ +uae_u32 REGPARAM2 op_120_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_128_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_130_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_138_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_139_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(d16,PC) */ +uae_u32 REGPARAM2 op_13a_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_13b_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B Dn,#.B */ +uae_u32 REGPARAM2 op_13c_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = scratchie++; + mov_l_ri(dst, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.L Dn,Dn */ +uae_u32 REGPARAM2 op_140_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(An) */ +uae_u32 REGPARAM2 op_150_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_158_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,-(An) */ +uae_u32 REGPARAM2 op_160_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_168_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_170_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_178_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_179_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.L Dn,Dn */ +uae_u32 REGPARAM2 op_180_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(An) */ +uae_u32 REGPARAM2 op_190_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_198_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1a0_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1a8_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1b0_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_1b8_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_1b9_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.L Dn,Dn */ +uae_u32 REGPARAM2 op_1c0_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(An) */ +uae_u32 REGPARAM2 op_1d0_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_1d8_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1e0_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1e8_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1f0_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_1f8_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_1f9_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,Dn */ +uae_u32 REGPARAM2 op_200_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(An) */ +uae_u32 REGPARAM2 op_210_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_218_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,-(An) */ +uae_u32 REGPARAM2 op_220_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_228_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_230_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_238_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_239_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,Dn */ +uae_u32 REGPARAM2 op_240_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(An) */ +uae_u32 REGPARAM2 op_250_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_258_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,-(An) */ +uae_u32 REGPARAM2 op_260_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_268_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_270_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_278_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_279_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,Dn */ +uae_u32 REGPARAM2 op_280_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(An) */ +uae_u32 REGPARAM2 op_290_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_298_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,-(An) */ +uae_u32 REGPARAM2 op_2a0_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_2a8_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2b0_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_2b8_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_2b9_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,Dn */ +uae_u32 REGPARAM2 op_400_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(An) */ +uae_u32 REGPARAM2 op_410_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_418_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,-(An) */ +uae_u32 REGPARAM2 op_420_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_428_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_430_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_438_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_439_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,Dn */ +uae_u32 REGPARAM2 op_440_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(An) */ +uae_u32 REGPARAM2 op_450_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_458_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,-(An) */ +uae_u32 REGPARAM2 op_460_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_468_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_470_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_478_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_479_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,Dn */ +uae_u32 REGPARAM2 op_480_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(An) */ +uae_u32 REGPARAM2 op_490_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_498_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,-(An) */ +uae_u32 REGPARAM2 op_4a0_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_4a8_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4b0_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_4b8_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_4b9_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,Dn */ +uae_u32 REGPARAM2 op_600_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(An) */ +uae_u32 REGPARAM2 op_610_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_618_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,-(An) */ +uae_u32 REGPARAM2 op_620_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_628_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_630_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_638_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_639_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,Dn */ +uae_u32 REGPARAM2 op_640_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(An) */ +uae_u32 REGPARAM2 op_650_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_658_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,-(An) */ +uae_u32 REGPARAM2 op_660_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_668_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_670_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_678_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_679_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,Dn */ +uae_u32 REGPARAM2 op_680_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(An) */ +uae_u32 REGPARAM2 op_690_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_698_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,-(An) */ +uae_u32 REGPARAM2 op_6a0_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_6a8_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_6b0_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_6b8_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_6b9_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.L #.W,Dn */ +uae_u32 REGPARAM2 op_800_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(An) */ +uae_u32 REGPARAM2 op_810_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_818_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,-(An) */ +uae_u32 REGPARAM2 op_820_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_828_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_830_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_838_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_839_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_83a_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BTST.B #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_83b_0_comp_nf(uae_u32 opcode) /* BTST */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bt_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.L #.W,Dn */ +uae_u32 REGPARAM2 op_840_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(An) */ +uae_u32 REGPARAM2 op_850_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_858_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,-(An) */ +uae_u32 REGPARAM2 op_860_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_868_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_870_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_878_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCHG.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_879_0_comp_nf(uae_u32 opcode) /* BCHG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btc_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.L #.W,Dn */ +uae_u32 REGPARAM2 op_880_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(An) */ +uae_u32 REGPARAM2 op_890_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_898_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,-(An) */ +uae_u32 REGPARAM2 op_8a0_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_8a8_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8b0_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_8b8_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BCLR.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_8b9_0_comp_nf(uae_u32 opcode) /* BCLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + btr_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.L #.W,Dn */ +uae_u32 REGPARAM2 op_8c0_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,31); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(An) */ +uae_u32 REGPARAM2 op_8d0_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(An)+ */ +uae_u32 REGPARAM2 op_8d8_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,-(An) */ +uae_u32 REGPARAM2 op_8e0_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(d16,An) */ +uae_u32 REGPARAM2 op_8e8_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8f0_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(xxx).W */ +uae_u32 REGPARAM2 op_8f8_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSET.B #.W,(xxx).L */ +uae_u32 REGPARAM2 op_8f9_0_comp_nf(uae_u32 opcode) /* BSET */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + int s=scratchie++; + int tmp=scratchie++; + mov_l_rr(s,src); + and_l_ri(s,7); + bts_l_rr(dst,s); + sbb_l(s,s); + make_flags_live(); + dont_care_flags(); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,Dn */ +uae_u32 REGPARAM2 op_a00_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(An) */ +uae_u32 REGPARAM2 op_a10_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_a18_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,-(An) */ +uae_u32 REGPARAM2 op_a20_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_a28_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_a30_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_a38_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_a39_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,Dn */ +uae_u32 REGPARAM2 op_a40_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(An) */ +uae_u32 REGPARAM2 op_a50_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_a58_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,-(An) */ +uae_u32 REGPARAM2 op_a60_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_a68_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_a70_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_a78_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_a79_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,Dn */ +uae_u32 REGPARAM2 op_a80_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + { + xor_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(An) */ +uae_u32 REGPARAM2 op_a90_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_a98_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,-(An) */ +uae_u32 REGPARAM2 op_aa0_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_aa8_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_ab0_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_ab8_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_ab9_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_2 +/* CMP.B #.B,Dn */ +uae_u32 REGPARAM2 op_c00_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(An) */ +uae_u32 REGPARAM2 op_c10_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_c18_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,-(An) */ +uae_u32 REGPARAM2 op_c20_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_c28_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c30_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_c38_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_c39_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(d16,PC) */ +uae_u32 REGPARAM2 op_c3a_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_c3b_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,Dn */ +uae_u32 REGPARAM2 op_c40_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(An) */ +uae_u32 REGPARAM2 op_c50_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_c58_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,-(An) */ +uae_u32 REGPARAM2 op_c60_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_c68_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c70_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_c78_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_c79_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_c7a_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_c7b_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,Dn */ +uae_u32 REGPARAM2 op_c80_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(An) */ +uae_u32 REGPARAM2 op_c90_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_c98_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,-(An) */ +uae_u32 REGPARAM2 op_ca0_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_ca8_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_cb0_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_cb8_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_cb9_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(d16,PC) */ +uae_u32 REGPARAM2 op_cba_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_cbb_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,Dn */ +uae_u32 REGPARAM2 op_1000_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),Dn */ +uae_u32 REGPARAM2 op_1010_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,Dn */ +uae_u32 REGPARAM2 op_1018_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),Dn */ +uae_u32 REGPARAM2 op_1020_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_1028_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_1030_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_1038_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_1039_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_103a_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_103b_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,Dn */ +uae_u32 REGPARAM2 op_103c_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + and_l_ri(dst,0xffffff00); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_b_rr(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(An) */ +uae_u32 REGPARAM2 op_1080_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(An) */ +uae_u32 REGPARAM2 op_1090_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(An) */ +uae_u32 REGPARAM2 op_1098_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(An) */ +uae_u32 REGPARAM2 op_10a0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(An) */ +uae_u32 REGPARAM2 op_10a8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_10b0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(An) */ +uae_u32 REGPARAM2 op_10b8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(An) */ +uae_u32 REGPARAM2 op_10b9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(An) */ +uae_u32 REGPARAM2 op_10ba_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_10bb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(An) */ +uae_u32 REGPARAM2 op_10bc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_10c0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(An)+ */ +uae_u32 REGPARAM2 op_10d0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(An)+ */ +uae_u32 REGPARAM2 op_10d8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(An)+ */ +uae_u32 REGPARAM2 op_10e0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_10e8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_10f0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_10f8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_10f9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_10fa_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_10fb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(An)+ */ +uae_u32 REGPARAM2 op_10fc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,-(An) */ +uae_u32 REGPARAM2 op_1100_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),-(An) */ +uae_u32 REGPARAM2 op_1110_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,-(An) */ +uae_u32 REGPARAM2 op_1118_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),-(An) */ +uae_u32 REGPARAM2 op_1120_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),-(An) */ +uae_u32 REGPARAM2 op_1128_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_1130_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_1138_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_1139_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_113a_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_113b_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,-(An) */ +uae_u32 REGPARAM2 op_113c_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_1140_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(d16,An) */ +uae_u32 REGPARAM2 op_1150_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_1158_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(d16,An) */ +uae_u32 REGPARAM2 op_1160_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_1168_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_1170_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_1178_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_1179_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_117a_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_117b_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(d16,An) */ +uae_u32 REGPARAM2 op_117c_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1180_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1190_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_1198_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11a0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11a8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11b9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11ba_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11bb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_11bc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_11c0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(xxx).W */ +uae_u32 REGPARAM2 op_11d0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_11d8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(xxx).W */ +uae_u32 REGPARAM2 op_11e0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_11e8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_11f0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_11f8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_11f9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_11fa_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_11fb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(xxx).W */ +uae_u32 REGPARAM2 op_11fc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_13c0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An),(xxx).L */ +uae_u32 REGPARAM2 op_13d0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_13d8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B -(An),(xxx).L */ +uae_u32 REGPARAM2 op_13e0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_13e8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_13f0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_13f8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_13f9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_13fa_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_13fb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.B #.B,(xxx).L */ +uae_u32 REGPARAM2 op_13fc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writebyte(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,Dn */ +uae_u32 REGPARAM2 op_2000_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,Dn */ +uae_u32 REGPARAM2 op_2008_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),Dn */ +uae_u32 REGPARAM2 op_2010_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,Dn */ +uae_u32 REGPARAM2 op_2018_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),Dn */ +uae_u32 REGPARAM2 op_2020_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_2028_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_2030_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_2038_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_2039_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_203a_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_203b_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,Dn */ +uae_u32 REGPARAM2 op_203c_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L Dn,An */ +uae_u32 REGPARAM2 op_2040_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L An,An */ +uae_u32 REGPARAM2 op_2048_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (An),An */ +uae_u32 REGPARAM2 op_2050_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (An)+,An */ +uae_u32 REGPARAM2 op_2058_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L -(An),An */ +uae_u32 REGPARAM2 op_2060_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (d16,An),An */ +uae_u32 REGPARAM2 op_2068_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_2070_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_2078_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_2079_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_207a_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_207b_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.L #.L,An */ +uae_u32 REGPARAM2 op_207c_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + mov_l_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(An) */ +uae_u32 REGPARAM2 op_2080_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(An) */ +uae_u32 REGPARAM2 op_2088_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(An) */ +uae_u32 REGPARAM2 op_2090_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(An) */ +uae_u32 REGPARAM2 op_2098_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(An) */ +uae_u32 REGPARAM2 op_20a0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),(An) */ +uae_u32 REGPARAM2 op_20a8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_20b0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(An) */ +uae_u32 REGPARAM2 op_20b8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(An) */ +uae_u32 REGPARAM2 op_20b9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(An) */ +uae_u32 REGPARAM2 op_20ba_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_20bb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(An) */ +uae_u32 REGPARAM2 op_20bc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_20c0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(An)+ */ +uae_u32 REGPARAM2 op_20c8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(An)+ */ +uae_u32 REGPARAM2 op_20d0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_20d8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(An)+ */ +uae_u32 REGPARAM2 op_20e0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_20e8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_20f0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_20f8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_20f9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_20fa_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_20fb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(An)+ */ +uae_u32 REGPARAM2 op_20fc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,-(An) */ +uae_u32 REGPARAM2 op_2100_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,-(An) */ +uae_u32 REGPARAM2 op_2108_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),-(An) */ +uae_u32 REGPARAM2 op_2110_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,-(An) */ +uae_u32 REGPARAM2 op_2118_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),-(An) */ +uae_u32 REGPARAM2 op_2120_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),-(An) */ +uae_u32 REGPARAM2 op_2128_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_2130_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_2138_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_2139_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_213a_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_213b_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,-(An) */ +uae_u32 REGPARAM2 op_213c_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_2140_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(d16,An) */ +uae_u32 REGPARAM2 op_2148_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(d16,An) */ +uae_u32 REGPARAM2 op_2150_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_2158_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(d16,An) */ +uae_u32 REGPARAM2 op_2160_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_2168_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_2170_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_2178_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_2179_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_217a_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_217b_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(d16,An) */ +uae_u32 REGPARAM2 op_217c_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2180_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2188_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2190_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_2198_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21a0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_3 +/* MOVE.L (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21a8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21b9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21ba_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21bb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_21bc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_21c0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(xxx).W */ +uae_u32 REGPARAM2 op_21c8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(xxx).W */ +uae_u32 REGPARAM2 op_21d0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_21d8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(xxx).W */ +uae_u32 REGPARAM2 op_21e0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_21e8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_21f0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_21f8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_21f9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_21fa_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_21fb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(xxx).W */ +uae_u32 REGPARAM2 op_21fc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_23c0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L An,(xxx).L */ +uae_u32 REGPARAM2 op_23c8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An),(xxx).L */ +uae_u32 REGPARAM2 op_23d0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_23d8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L -(An),(xxx).L */ +uae_u32 REGPARAM2 op_23e0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_23e8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_23f0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_23f8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_23f9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_23fa_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_23fb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.L #.L,(xxx).L */ +uae_u32 REGPARAM2 op_23fc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writelong(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,Dn */ +uae_u32 REGPARAM2 op_3000_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,Dn */ +uae_u32 REGPARAM2 op_3008_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),Dn */ +uae_u32 REGPARAM2 op_3010_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,Dn */ +uae_u32 REGPARAM2 op_3018_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),Dn */ +uae_u32 REGPARAM2 op_3020_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_3028_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_3030_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_3038_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_3039_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_303a_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_303b_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,Dn */ +uae_u32 REGPARAM2 op_303c_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + and_l_ri(dst,0xffff0000); + or_l(dst,scratchie); + forget_about(scratchie); + } else + mov_w_rr(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W Dn,An */ +uae_u32 REGPARAM2 op_3040_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W An,An */ +uae_u32 REGPARAM2 op_3048_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (An),An */ +uae_u32 REGPARAM2 op_3050_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (An)+,An */ +uae_u32 REGPARAM2 op_3058_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W -(An),An */ +uae_u32 REGPARAM2 op_3060_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (d16,An),An */ +uae_u32 REGPARAM2 op_3068_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_3070_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_3078_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_3079_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_307a_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_307b_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEA.W #.W,An */ +uae_u32 REGPARAM2 op_307c_0_comp_nf(uae_u32 opcode) /* MOVEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + { + int tmps=scratchie++; + sign_extend_16_rr(dst,src); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(An) */ +uae_u32 REGPARAM2 op_3080_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(An) */ +uae_u32 REGPARAM2 op_3088_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(An) */ +uae_u32 REGPARAM2 op_3090_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(An) */ +uae_u32 REGPARAM2 op_3098_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(An) */ +uae_u32 REGPARAM2 op_30a0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(An) */ +uae_u32 REGPARAM2 op_30a8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(An) */ +uae_u32 REGPARAM2 op_30b0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(An) */ +uae_u32 REGPARAM2 op_30b8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(An) */ +uae_u32 REGPARAM2 op_30b9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(An) */ +uae_u32 REGPARAM2 op_30ba_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(An) */ +uae_u32 REGPARAM2 op_30bb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(An) */ +uae_u32 REGPARAM2 op_30bc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_30c0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(An)+ */ +uae_u32 REGPARAM2 op_30c8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(An)+ */ +uae_u32 REGPARAM2 op_30d0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(An)+ */ +uae_u32 REGPARAM2 op_30d8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(An)+ */ +uae_u32 REGPARAM2 op_30e0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(An)+ */ +uae_u32 REGPARAM2 op_30e8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(An)+ */ +uae_u32 REGPARAM2 op_30f0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(An)+ */ +uae_u32 REGPARAM2 op_30f8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_30f9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(An)+ */ +uae_u32 REGPARAM2 op_30fa_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(An)+ */ +uae_u32 REGPARAM2 op_30fb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_30fc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,-(An) */ +uae_u32 REGPARAM2 op_3100_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,-(An) */ +uae_u32 REGPARAM2 op_3108_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),-(An) */ +uae_u32 REGPARAM2 op_3110_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,-(An) */ +uae_u32 REGPARAM2 op_3118_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),-(An) */ +uae_u32 REGPARAM2 op_3120_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),-(An) */ +uae_u32 REGPARAM2 op_3128_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),-(An) */ +uae_u32 REGPARAM2 op_3130_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,-(An) */ +uae_u32 REGPARAM2 op_3138_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,-(An) */ +uae_u32 REGPARAM2 op_3139_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),-(An) */ +uae_u32 REGPARAM2 op_313a_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),-(An) */ +uae_u32 REGPARAM2 op_313b_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,-(An) */ +uae_u32 REGPARAM2 op_313c_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_3140_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(d16,An) */ +uae_u32 REGPARAM2 op_3148_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(d16,An) */ +uae_u32 REGPARAM2 op_3150_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(d16,An) */ +uae_u32 REGPARAM2 op_3158_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(d16,An) */ +uae_u32 REGPARAM2 op_3160_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(d16,An) */ +uae_u32 REGPARAM2 op_3168_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_3170_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(d16,An) */ +uae_u32 REGPARAM2 op_3178_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(d16,An) */ +uae_u32 REGPARAM2 op_3179_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(d16,An) */ +uae_u32 REGPARAM2 op_317a_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(d16,An) */ +uae_u32 REGPARAM2 op_317b_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_317c_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3180_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3188_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3190_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_3198_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31a0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31a8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31b9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31ba_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31bb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_31bc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_31c0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(xxx).W */ +uae_u32 REGPARAM2 op_31c8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(xxx).W */ +uae_u32 REGPARAM2 op_31d0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(xxx).W */ +uae_u32 REGPARAM2 op_31d8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(xxx).W */ +uae_u32 REGPARAM2 op_31e0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(xxx).W */ +uae_u32 REGPARAM2 op_31e8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_31f0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(xxx).W */ +uae_u32 REGPARAM2 op_31f8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(xxx).W */ +uae_u32 REGPARAM2 op_31f9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(xxx).W */ +uae_u32 REGPARAM2 op_31fa_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(xxx).W */ +uae_u32 REGPARAM2 op_31fb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_31fc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_33c0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W An,(xxx).L */ +uae_u32 REGPARAM2 op_33c8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An),(xxx).L */ +uae_u32 REGPARAM2 op_33d0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_33d8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W -(An),(xxx).L */ +uae_u32 REGPARAM2 op_33e0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,An),(xxx).L */ +uae_u32 REGPARAM2 op_33e8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,An,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_33f0_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).W,(xxx).L */ +uae_u32 REGPARAM2 op_33f8_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (xxx).L,(xxx).L */ +uae_u32 REGPARAM2 op_33f9_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d16,PC),(xxx).L */ +uae_u32 REGPARAM2 op_33fa_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W (d8,PC,Xn),(xxx).L */ +uae_u32 REGPARAM2 op_33fb_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_33fc_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + writeword(dsta, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B Dn */ +uae_u32 REGPARAM2 op_4000_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_b(dst,src); + if(srcreg != dst) { + mov_b_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (An) */ +uae_u32 REGPARAM2 op_4010_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (An)+ */ +uae_u32 REGPARAM2 op_4018_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B -(An) */ +uae_u32 REGPARAM2 op_4020_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (d16,An) */ +uae_u32 REGPARAM2 op_4028_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4030_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (xxx).W */ +uae_u32 REGPARAM2 op_4038_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.B (xxx).L */ +uae_u32 REGPARAM2 op_4039_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W Dn */ +uae_u32 REGPARAM2 op_4040_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_w(dst,src); + if(srcreg != dst) { + mov_w_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (An) */ +uae_u32 REGPARAM2 op_4050_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (An)+ */ +uae_u32 REGPARAM2 op_4058_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W -(An) */ +uae_u32 REGPARAM2 op_4060_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (d16,An) */ +uae_u32 REGPARAM2 op_4068_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4070_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (xxx).W */ +uae_u32 REGPARAM2 op_4078_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.W (xxx).L */ +uae_u32 REGPARAM2 op_4079_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L Dn */ +uae_u32 REGPARAM2 op_4080_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_l(dst,src); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (An) */ +uae_u32 REGPARAM2 op_4090_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (An)+ */ +uae_u32 REGPARAM2 op_4098_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L -(An) */ +uae_u32 REGPARAM2 op_40a0_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (d16,An) */ +uae_u32 REGPARAM2 op_40a8_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_40b0_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (xxx).W */ +uae_u32 REGPARAM2 op_40b8_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEGX.L (xxx).L */ +uae_u32 REGPARAM2 op_40b9_0_comp_nf(uae_u32 opcode) /* NEGX */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + restore_carry(); + sbb_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (An),An */ +uae_u32 REGPARAM2 op_41d0_0_comp_nf(uae_u32 opcode) /* LEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (d16,An),An */ +uae_u32 REGPARAM2 op_41e8_0_comp_nf(uae_u32 opcode) /* LEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_41f0_0_comp_nf(uae_u32 opcode) /* LEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_41f8_0_comp_nf(uae_u32 opcode) /* LEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_41f9_0_comp_nf(uae_u32 opcode) /* LEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_41fa_0_comp_nf(uae_u32 opcode) /* LEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LEA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_41fb_0_comp_nf(uae_u32 opcode) /* LEA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if(dstreg + 8 != srca) { + mov_l_rr(dstreg + 8, srca); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B Dn */ +uae_u32 REGPARAM2 op_4200_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + if(srcreg != dst) { + mov_b_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (An) */ +uae_u32 REGPARAM2 op_4210_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (An)+ */ +uae_u32 REGPARAM2 op_4218_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B -(An) */ +uae_u32 REGPARAM2 op_4220_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (d16,An) */ +uae_u32 REGPARAM2 op_4228_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4230_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (xxx).W */ +uae_u32 REGPARAM2 op_4238_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.B (xxx).L */ +uae_u32 REGPARAM2 op_4239_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst=scratchie++; + mov_l_ri(dst,0); + writebyte(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W Dn */ +uae_u32 REGPARAM2 op_4240_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + if(srcreg != dst) { + mov_w_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (An) */ +uae_u32 REGPARAM2 op_4250_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (An)+ */ +uae_u32 REGPARAM2 op_4258_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W -(An) */ +uae_u32 REGPARAM2 op_4260_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (d16,An) */ +uae_u32 REGPARAM2 op_4268_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4270_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (xxx).W */ +uae_u32 REGPARAM2 op_4278_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.W (xxx).L */ +uae_u32 REGPARAM2 op_4279_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst=scratchie++; + mov_l_ri(dst,0); + writeword(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L Dn */ +uae_u32 REGPARAM2 op_4280_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (An) */ +uae_u32 REGPARAM2 op_4290_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (An)+ */ +uae_u32 REGPARAM2 op_4298_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L -(An) */ +uae_u32 REGPARAM2 op_42a0_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int dst=scratchie++; + mov_l_ri(dst,0); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (d16,An) */ +uae_u32 REGPARAM2 op_42a8_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_42b0_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (xxx).W */ +uae_u32 REGPARAM2 op_42b8_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst=scratchie++; + mov_l_ri(dst,0); + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CLR.L (xxx).L */ +uae_u32 REGPARAM2 op_42b9_0_comp_nf(uae_u32 opcode) /* CLR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst=scratchie++; + mov_l_ri(dst,0); + writelong(srca, dst, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B Dn */ +uae_u32 REGPARAM2 op_4400_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_b(dst,src); + if(srcreg != dst) { + mov_b_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B (An) */ +uae_u32 REGPARAM2 op_4410_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_4 +/* NEG.B (An)+ */ +uae_u32 REGPARAM2 op_4418_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B -(An) */ +uae_u32 REGPARAM2 op_4420_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B (d16,An) */ +uae_u32 REGPARAM2 op_4428_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4430_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B (xxx).W */ +uae_u32 REGPARAM2 op_4438_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.B (xxx).L */ +uae_u32 REGPARAM2 op_4439_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_b(dst,src); + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W Dn */ +uae_u32 REGPARAM2 op_4440_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_w(dst,src); + if(srcreg != dst) { + mov_w_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (An) */ +uae_u32 REGPARAM2 op_4450_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (An)+ */ +uae_u32 REGPARAM2 op_4458_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W -(An) */ +uae_u32 REGPARAM2 op_4460_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (d16,An) */ +uae_u32 REGPARAM2 op_4468_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4470_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (xxx).W */ +uae_u32 REGPARAM2 op_4478_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.W (xxx).L */ +uae_u32 REGPARAM2 op_4479_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_w(dst,src); + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L Dn */ +uae_u32 REGPARAM2 op_4480_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_l(dst,src); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (An) */ +uae_u32 REGPARAM2 op_4490_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (An)+ */ +uae_u32 REGPARAM2 op_4498_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L -(An) */ +uae_u32 REGPARAM2 op_44a0_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (d16,An) */ +uae_u32 REGPARAM2 op_44a8_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_44b0_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (xxx).W */ +uae_u32 REGPARAM2 op_44b8_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NEG.L (xxx).L */ +uae_u32 REGPARAM2 op_44b9_0_comp_nf(uae_u32 opcode) /* NEG */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0); + dont_care_flags(); + sub_l(dst,src); + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B Dn */ +uae_u32 REGPARAM2 op_4600_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + if(srcreg != dst) { + mov_b_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (An) */ +uae_u32 REGPARAM2 op_4610_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (An)+ */ +uae_u32 REGPARAM2 op_4618_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B -(An) */ +uae_u32 REGPARAM2 op_4620_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (d16,An) */ +uae_u32 REGPARAM2 op_4628_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4630_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (xxx).W */ +uae_u32 REGPARAM2 op_4638_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.B (xxx).L */ +uae_u32 REGPARAM2 op_4639_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W Dn */ +uae_u32 REGPARAM2 op_4640_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + if(srcreg != dst) { + mov_w_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (An) */ +uae_u32 REGPARAM2 op_4650_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (An)+ */ +uae_u32 REGPARAM2 op_4658_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W -(An) */ +uae_u32 REGPARAM2 op_4660_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (d16,An) */ +uae_u32 REGPARAM2 op_4668_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4670_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (xxx).W */ +uae_u32 REGPARAM2 op_4678_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.W (xxx).L */ +uae_u32 REGPARAM2 op_4679_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L Dn */ +uae_u32 REGPARAM2 op_4680_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + xor_l(dst,src); + } + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (An) */ +uae_u32 REGPARAM2 op_4690_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (An)+ */ +uae_u32 REGPARAM2 op_4698_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L -(An) */ +uae_u32 REGPARAM2 op_46a0_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(srca, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (d16,An) */ +uae_u32 REGPARAM2 op_46a8_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_46b0_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (xxx).W */ +uae_u32 REGPARAM2 op_46b8_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOT.L (xxx).L */ +uae_u32 REGPARAM2 op_46b9_0_comp_nf(uae_u32 opcode) /* NOT */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst=scratchie++; + mov_l_ri(dst,0xffffffff); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(srca, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LINK.L An,#.L */ +uae_u32 REGPARAM2 op_4808_0_comp_nf(uae_u32 opcode) /* LINK */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int offs = scratchie++; + mov_l_ri(offs, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,src,scratchie); + mov_l_rr(src,SP_REG); + add_l(SP_REG,offs); + if(srcreg + 8 != src) { + mov_l_rr(srcreg + 8, src); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SWAP.W Dn */ +uae_u32 REGPARAM2 op_4840_0_comp_nf(uae_u32 opcode) /* SWAP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + rol_l_ri(src,16); + if(srcreg != src) { + mov_l_rr(srcreg, src); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (An) */ +uae_u32 REGPARAM2 op_4850_0_comp_nf(uae_u32 opcode) /* PEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if (srcreg==7) dodgy=1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (d16,An) */ +uae_u32 REGPARAM2 op_4868_0_comp_nf(uae_u32 opcode) /* PEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if (srcreg==7) dodgy=1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4870_0_comp_nf(uae_u32 opcode) /* PEA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if (srcreg==7) dodgy=1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (xxx).W */ +uae_u32 REGPARAM2 op_4878_0_comp_nf(uae_u32 opcode) /* PEA */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (xxx).L */ +uae_u32 REGPARAM2 op_4879_0_comp_nf(uae_u32 opcode) /* PEA */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (d16,PC) */ +uae_u32 REGPARAM2 op_487a_0_comp_nf(uae_u32 opcode) /* PEA */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* PEA.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_487b_0_comp_nf(uae_u32 opcode) /* PEA */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + { + int dsta = dodgy ? scratchie++ : 7 + 8; + lea_l_brr(7 + 8, 7 + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + 7); + } + writelong(dsta, srca, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXT.W Dn */ +uae_u32 REGPARAM2 op_4880_0_comp_nf(uae_u32 opcode) /* EXT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + { + int dst = scratchie++; + sign_extend_8_rr(dst,src); + if(srcreg != dst) { + mov_w_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,(An) */ +uae_u32 REGPARAM2 op_4890_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(srca, dstreg + 8); + } + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + offset+=2; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writeword(tmp,i,scratchie); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,-(An) */ +uae_u32 REGPARAM2 op_48a0_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca=dodgy?scratchie++:dstreg+8; + if (dodgy) { + mov_l_rr(srca,8+dstreg); + } + if (1 && !special_mem && !jit_n_addr_unsafe && !(mask & (1 << (7 - dstreg)))) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + offset-=2; + mov_l_rr(tmp,15-i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + } + } + lea_l_brr(8+dstreg,srca,(uae_s32)offset); + } else { + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + sub_l_ri(srca,2); + writeword(srca,15-i,scratchie); + } + } + mov_l_rr(8+dstreg,srca); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_48a8_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + dstreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + offset+=2; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writeword(tmp,i,scratchie); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_48b0_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + offset+=2; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writeword(tmp,i,scratchie); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_48b8_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + offset+=2; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writeword(tmp,i,scratchie); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_48b9_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_16(tmp); + mov_w_Rr(native,tmp,offset); + offset+=2; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writeword(tmp,i,scratchie); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXT.L Dn */ +uae_u32 REGPARAM2 op_48c0_0_comp_nf(uae_u32 opcode) /* EXT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + { + int dst = src; + sign_extend_16_rr(src,src); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,(An) */ +uae_u32 REGPARAM2 op_48d0_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(srca, dstreg + 8); + } + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + offset+=4; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writelong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,-(An) */ +uae_u32 REGPARAM2 op_48e0_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(srca, 8 + dstreg); + } + if (1 && !special_mem && !jit_n_addr_unsafe && !(mask & (1 << (7 - dstreg)))) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + offset-=4; + mov_l_rr(tmp,15-i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + } + } + lea_l_brr(8+dstreg,srca,(uae_s32)offset); + } else { + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + sub_l_ri(srca,4); + writelong(srca,15-i,scratchie); + } + } + mov_l_rr(8+dstreg,srca); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_48e8_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + dstreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + offset+=4; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writelong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_48f0_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + offset+=4; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writelong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_48f8_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + offset+=4; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writelong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMLE.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_48f9_0_comp_nf(uae_u32 opcode) /* MVMLE */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + int tmp=scratchie++; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + mov_l_rr(tmp,i); + mid_bswap_32(tmp); + mov_l_Rr(native,tmp,offset); + offset+=4; + } + } + } else { + mov_l_rr(tmp,srca); + for (i=0;i<16 && mask;i++) { + if ((mask>>i)&1) { + writelong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXT.B Dn */ +uae_u32 REGPARAM2 op_49c0_0_comp_nf(uae_u32 opcode) /* EXT */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + dont_care_flags(); + { + int dst = src; + sign_extend_8_rr(src,src); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B Dn */ +uae_u32 REGPARAM2 op_4a00_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (An) */ +uae_u32 REGPARAM2 op_4a10_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (An)+ */ +uae_u32 REGPARAM2 op_4a18_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B -(An) */ +uae_u32 REGPARAM2 op_4a20_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (d16,An) */ +uae_u32 REGPARAM2 op_4a28_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4a30_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (xxx).W */ +uae_u32 REGPARAM2 op_4a38_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (xxx).L */ +uae_u32 REGPARAM2 op_4a39_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (d16,PC) */ +uae_u32 REGPARAM2 op_4a3a_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4a3b_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.B #.B */ +uae_u32 REGPARAM2 op_4a3c_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W Dn */ +uae_u32 REGPARAM2 op_4a40_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W An */ +uae_u32 REGPARAM2 op_4a48_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (An) */ +uae_u32 REGPARAM2 op_4a50_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (An)+ */ +uae_u32 REGPARAM2 op_4a58_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W -(An) */ +uae_u32 REGPARAM2 op_4a60_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (d16,An) */ +uae_u32 REGPARAM2 op_4a68_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4a70_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (xxx).W */ +uae_u32 REGPARAM2 op_4a78_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (xxx).L */ +uae_u32 REGPARAM2 op_4a79_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (d16,PC) */ +uae_u32 REGPARAM2 op_4a7a_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4a7b_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.W #.W */ +uae_u32 REGPARAM2 op_4a7c_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L Dn */ +uae_u32 REGPARAM2 op_4a80_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L An */ +uae_u32 REGPARAM2 op_4a88_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (An) */ +uae_u32 REGPARAM2 op_4a90_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (An)+ */ +uae_u32 REGPARAM2 op_4a98_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L -(An) */ +uae_u32 REGPARAM2 op_4aa0_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (d16,An) */ +uae_u32 REGPARAM2 op_4aa8_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4ab0_0_comp_nf(uae_u32 opcode) /* TST */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (xxx).W */ +uae_u32 REGPARAM2 op_4ab8_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (xxx).L */ +uae_u32 REGPARAM2 op_4ab9_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (d16,PC) */ +uae_u32 REGPARAM2 op_4aba_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4abb_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* TST.L #.L */ +uae_u32 REGPARAM2 op_4abc_0_comp_nf(uae_u32 opcode) /* TST */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,Dn */ +uae_u32 REGPARAM2 op_4c00_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + int dst = dstreg; + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,(An) */ +uae_u32 REGPARAM2 op_4c10_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_4c18_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,-(An) */ +uae_u32 REGPARAM2 op_4c20_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4c28_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4c30_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4c38_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4c39_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4c3a_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(dsta, address + PC16off); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4c3b_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + int pctmp = scratchie++; + int dsta = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULL.L #.W,#.L */ +uae_u32 REGPARAM2 op_4c3c_0_comp_nf(uae_u32 opcode) /* MULL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + int r2=(extra>>12)&7; + int tmp=scratchie++; + { + int dst = scratchie++; + mov_l_ri(dst, comp_get_ilong((m68k_pc_offset+=4)-4)); + if (extra&0x0400) { + int r3=(extra&7); + mov_l_rr(r3,dst); + if (extra&0x0800) { + imul_64_32(r2,r3); + } else { + mul_64_32(r2,r3); + } + } else { + imul_32_32(r2,dst); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(An) */ +uae_u32 REGPARAM2 op_4c90_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(srca, dstreg + 8); + } + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(An)+ */ +uae_u32 REGPARAM2 op_4c98_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, dstreg + 8); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + lea_l_brr(8+dstreg,srca,offset); + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + mov_l_rr(8+dstreg,tmp); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4ca8_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + dstreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4cb0_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4cb8_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4cb9_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4cba_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.W #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4cbb_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_w_rR(i,native,offset); + mid_bswap_16(i); + sign_extend_16_rr(i,i); + offset+=2; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readword(tmp,i,scratchie); + sign_extend_16_rr(i,i); + add_l_ri(tmp,2); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(An) */ +uae_u32 REGPARAM2 op_4cd0_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(srca, dstreg + 8); + } + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_4cd8_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, dstreg + 8); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + lea_l_brr(8+dstreg,srca,offset); + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + mov_l_rr(8+dstreg,tmp); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_4ce8_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + dstreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_4cf0_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_4cf8_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_4cf9_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_4cfa_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MVMEL.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4cfb_0_comp_nf(uae_u32 opcode) /* MVMEL */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2); + int native=scratchie++; + int i; + signed char offset=0; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + if (1 && !special_mem && !jit_n_addr_unsafe) { + get_n_addr(srca,native,scratchie); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + mov_l_rR(i,native,offset); + mid_bswap_32(i); + offset+=4; + } + } + } else { + int tmp=scratchie++; + mov_l_rr(tmp,srca); + for (i=0;i<16;i++) { + if ((mask>>i)&1) { + readlong(tmp,i,scratchie); + add_l_ri(tmp,4); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* LINK.W An,#.W */ +uae_u32 REGPARAM2 op_4e50_0_comp_nf(uae_u32 opcode) /* LINK */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,src,scratchie); + mov_l_rr(src,SP_REG); + sign_extend_16_rr(offs,offs); + add_l(SP_REG,offs); + if(srcreg + 8 != src) { + mov_l_rr(srcreg + 8, src); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* UNLK.L An */ +uae_u32 REGPARAM2 op_4e58_0_comp_nf(uae_u32 opcode) /* UNLK */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + mov_l_rr(SP_REG,src); + readlong(SP_REG,src,scratchie); + add_l_ri(SP_REG,4); + if(srcreg + 8 != src) { + mov_l_rr(srcreg + 8, src); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* NOP.L */ +uae_u32 REGPARAM2 op_4e71_0_comp_nf(uae_u32 opcode) /* NOP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* RTD.L #.W */ +uae_u32 REGPARAM2 op_4e74_0_comp_nf(uae_u32 opcode) /* RTD */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + add_l_ri(offs,4); + { + int newad=scratchie++; + readlong(SP_REG,newad,scratchie); + mov_l_mr(JITPTR ®s.pc,newad); + get_n_addr_jmp(newad,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + add_l(SP_REG,offs); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* RTS.L */ +uae_u32 REGPARAM2 op_4e75_0_comp_nf(uae_u32 opcode) /* RTS */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int newad=scratchie++; + readlong(SP_REG,newad,scratchie); + mov_l_mr(JITPTR ®s.pc,newad); + get_n_addr_jmp(newad,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + lea_l_brr(SP_REG,SP_REG,4); + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (An) */ +uae_u32 REGPARAM2 op_4e90_0_comp_nf(uae_u32 opcode) /* JSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (d16,An) */ +uae_u32 REGPARAM2 op_4ea8_0_comp_nf(uae_u32 opcode) /* JSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4eb0_0_comp_nf(uae_u32 opcode) /* JSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (xxx).W */ +uae_u32 REGPARAM2 op_4eb8_0_comp_nf(uae_u32 opcode) /* JSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (xxx).L */ +uae_u32 REGPARAM2 op_4eb9_0_comp_nf(uae_u32 opcode) /* JSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (d16,PC) */ +uae_u32 REGPARAM2 op_4eba_0_comp_nf(uae_u32 opcode) /* JSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JSR.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4ebb_0_comp_nf(uae_u32 opcode) /* JSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (An) */ +uae_u32 REGPARAM2 op_4ed0_0_comp_nf(uae_u32 opcode) /* JMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (d16,An) */ +uae_u32 REGPARAM2 op_4ee8_0_comp_nf(uae_u32 opcode) /* JMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (d8,An,Xn) */ +uae_u32 REGPARAM2 op_4ef0_0_comp_nf(uae_u32 opcode) /* JMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (xxx).W */ +uae_u32 REGPARAM2 op_4ef8_0_comp_nf(uae_u32 opcode) /* JMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (xxx).L */ +uae_u32 REGPARAM2 op_4ef9_0_comp_nf(uae_u32 opcode) /* JMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (d16,PC) */ +uae_u32 REGPARAM2 op_4efa_0_comp_nf(uae_u32 opcode) /* JMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* JMP.L (d8,PC,Xn) */ +uae_u32 REGPARAM2 op_4efb_0_comp_nf(uae_u32 opcode) /* JMP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + mov_l_mr(JITPTR ®s.pc,srca); + get_n_addr_jmp(srca,PC_P,scratchie); + mov_l_mr(JITPTR ®s.pc_oldp,PC_P); + m68k_pc_offset=0; + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,Dn */ +uae_u32 REGPARAM2 op_5000_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(An) */ +uae_u32 REGPARAM2 op_5010_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(An)+ */ +uae_u32 REGPARAM2 op_5018_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,-(An) */ +uae_u32 REGPARAM2 op_5020_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(d16,An) */ +uae_u32 REGPARAM2 op_5028_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5030_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(xxx).W */ +uae_u32 REGPARAM2 op_5038_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.B #,(xxx).L */ +uae_u32 REGPARAM2 op_5039_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,Dn */ +uae_u32 REGPARAM2 op_5040_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDAQ.W #,An */ +uae_u32 REGPARAM2 op_5048_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(An) */ +uae_u32 REGPARAM2 op_5050_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(An)+ */ +uae_u32 REGPARAM2 op_5058_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,-(An) */ +uae_u32 REGPARAM2 op_5060_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(d16,An) */ +uae_u32 REGPARAM2 op_5068_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5070_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(xxx).W */ +uae_u32 REGPARAM2 op_5078_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.W #,(xxx).L */ +uae_u32 REGPARAM2 op_5079_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,Dn */ +uae_u32 REGPARAM2 op_5080_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDAQ.L #,An */ +uae_u32 REGPARAM2 op_5088_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(An) */ +uae_u32 REGPARAM2 op_5090_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(An)+ */ +uae_u32 REGPARAM2 op_5098_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_5 +/* ADDQ.L #,-(An) */ +uae_u32 REGPARAM2 op_50a0_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(d16,An) */ +uae_u32 REGPARAM2 op_50a8_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_50b0_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(xxx).W */ +uae_u32 REGPARAM2 op_50b8_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDQ.L #,(xxx).L */ +uae_u32 REGPARAM2 op_50b9_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_50c0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_50c8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_50d0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_50d8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_50e0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_50e8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_50f0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_50f8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_50f9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + mov_l_ri(val,0); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,Dn */ +uae_u32 REGPARAM2 op_5100_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(An) */ +uae_u32 REGPARAM2 op_5110_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(An)+ */ +uae_u32 REGPARAM2 op_5118_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,-(An) */ +uae_u32 REGPARAM2 op_5120_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(d16,An) */ +uae_u32 REGPARAM2 op_5128_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5130_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(xxx).W */ +uae_u32 REGPARAM2 op_5138_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.B #,(xxx).L */ +uae_u32 REGPARAM2 op_5139_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,Dn */ +uae_u32 REGPARAM2 op_5140_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBAQ.W #,An */ +uae_u32 REGPARAM2 op_5148_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(An) */ +uae_u32 REGPARAM2 op_5150_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(An)+ */ +uae_u32 REGPARAM2 op_5158_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,-(An) */ +uae_u32 REGPARAM2 op_5160_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(d16,An) */ +uae_u32 REGPARAM2 op_5168_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_5170_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(xxx).W */ +uae_u32 REGPARAM2 op_5178_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.W #,(xxx).L */ +uae_u32 REGPARAM2 op_5179_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,Dn */ +uae_u32 REGPARAM2 op_5180_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBAQ.L #,An */ +uae_u32 REGPARAM2 op_5188_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(An) */ +uae_u32 REGPARAM2 op_5190_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(An)+ */ +uae_u32 REGPARAM2 op_5198_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,-(An) */ +uae_u32 REGPARAM2 op_51a0_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(d16,An) */ +uae_u32 REGPARAM2 op_51a8_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_51b0_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(xxx).W */ +uae_u32 REGPARAM2 op_51b8_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBQ.L #,(xxx).L */ +uae_u32 REGPARAM2 op_51b9_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_51c0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_51c8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + start_needflags(); + sub_w_ri(src,1); + end_needflags(); + { + uae_u32 v2; + uae_u32 v1=get_const(PC_P); + v2=get_const(offs); + register_branch(v1,v2,3); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_51d0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_51d8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_51e0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_51e8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_51f0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_51f8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_51f9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + mov_l_ri(val,1); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_52c0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_52c8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,7); + cmov_l_rr(src,nsrc,7); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_52d0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_52d8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_52e0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_52e8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_52f0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_52f8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_52f9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,6); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_53c0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_53c8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,6); + cmov_l_rr(src,nsrc,6); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_53d0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_53d8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_53e0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_53e8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_53f0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_53f8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_53f9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,7); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_54c0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_54c8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,3); + cmov_l_rr(src,nsrc,3); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_54d0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_54d8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_54e0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_54e8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_54f0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_54f8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_54f9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,2); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_55c0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_55c8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,2); + cmov_l_rr(src,nsrc,2); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_55d0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_55d8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_55e0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_55e8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_55f0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_55f8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_55f9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,3); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_56c0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_56c8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,5); + cmov_l_rr(src,nsrc,5); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_56d0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_56d8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_56e0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_56e8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_56f0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_56f8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_56f9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,4); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_57c0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_57c8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,4); + cmov_l_rr(src,nsrc,4); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_57d0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_57d8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_57e0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_57e8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_57f0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_57f8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_57f9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,5); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5ac0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5ac8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,9); + cmov_l_rr(src,nsrc,9); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5ad0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5ad8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ae0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ae8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5af0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5af8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5af9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,8); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5bc0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5bc8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,8); + cmov_l_rr(src,nsrc,8); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5bd0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5bd8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5be0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5be8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5bf0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5bf8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5bf9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,9); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5cc0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5cc8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,13); + cmov_l_rr(src,nsrc,13); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5cd0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5cd8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ce0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ce8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5cf0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5cf8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5cf9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,12); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5dc0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5dc8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,12); + cmov_l_rr(src,nsrc,12); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5dd0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5dd8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5de0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5de8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5df0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5df8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5df9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,13); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5ec0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5ec8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,15); + cmov_l_rr(src,nsrc,15); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5ed0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5ed8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5ee0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5ee8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5ef0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5ef8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5ef9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,14); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B Dn */ +uae_u32 REGPARAM2 op_5fc0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + if(srcreg != val) { + mov_b_rr(srcreg, val); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* DBcc.W Dn,#.W */ +uae_u32 REGPARAM2 op_5fc8_0_comp_nf(uae_u32 opcode) /* DBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int offs = scratchie++; + mov_l_ri(offs, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(offs,offs); + sub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(offs,JITPTR comp_pc_p); + add_l_ri(offs,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + { + int nsrc=scratchie++; + make_flags_live(); + mov_l_rr(nsrc,src); + lea_l_brr(scratchie,src,(uae_s32)-1); + mov_w_rr(src,scratchie); + cmov_l_rr(offs,PC_P,14); + cmov_l_rr(src,nsrc,14); + start_needflags(); + test_w_rr(nsrc,nsrc); + end_needflags(); + cmov_l_rr(PC_P,offs,5); + if(srcreg != src) { + mov_w_rr(srcreg, src); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An) */ +uae_u32 REGPARAM2 op_5fd0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (An)+ */ +uae_u32 REGPARAM2 op_5fd8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B -(An) */ +uae_u32 REGPARAM2 op_5fe0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d16,An) */ +uae_u32 REGPARAM2 op_5fe8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (d8,An,Xn) */ +uae_u32 REGPARAM2 op_5ff0_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).W */ +uae_u32 REGPARAM2 op_5ff8_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Scc.B (xxx).L */ +uae_u32 REGPARAM2 op_5ff9_0_comp_nf(uae_u32 opcode) /* Scc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int val = scratchie++; + make_flags_live(); + setcc(val,15); + sub_b_ri(val,1); + writebyte(srca, val, scratchie); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6000_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + mov_l_rr(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6001_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + mov_l_rr(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_60ff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + mov_l_rr(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSR.W #.W */ +uae_u32 REGPARAM2 op_6100_0_comp_nf(uae_u32 opcode) /* BSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + add_l_ri(src,m68k_pc_offset_thisinst+2); + m68k_pc_offset=0; + add_l(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSRQ.B # */ +uae_u32 REGPARAM2 op_6101_0_comp_nf(uae_u32 opcode) /* BSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + add_l_ri(src,m68k_pc_offset_thisinst+2); + m68k_pc_offset=0; + add_l(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BSR.L #.L */ +uae_u32 REGPARAM2 op_61ff_0_comp_nf(uae_u32 opcode) /* BSR */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + uae_u32 retadd=(uae_u32)(start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset); + int ret=scratchie++; + mov_l_ri(ret,retadd); + sub_l_ri(SP_REG,4); + writelong_clobber(SP_REG,ret,scratchie); + add_l_ri(src,m68k_pc_offset_thisinst+2); + m68k_pc_offset=0; + add_l(PC_P,src); + comp_pc_p=(uae_u8*)(uintptr)get_const(PC_P); + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6200_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,7); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6201_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,7); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_62ff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,7); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6300_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,6); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6301_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,6); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_6 +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_63ff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,6); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6400_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,3); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6401_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,3); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_64ff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,3); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6500_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,2); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6501_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,2); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_65ff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,2); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6600_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,5); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6601_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,5); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_66ff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,5); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6700_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,4); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6701_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,4); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_67ff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,4); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6a00_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,9); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6a01_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,9); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6aff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,9); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6b00_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,8); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6b01_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,8); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6bff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,8); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6c00_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,13); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6c01_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,13); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6cff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,13); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6d00_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,12); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6d01_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,12); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6dff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,12); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6e00_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,15); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6e01_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,15); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6eff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,15); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.W #.W */ +uae_u32 REGPARAM2 op_6f00_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + sign_extend_16_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,14); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* BccQ.B # */ +uae_u32 REGPARAM2 op_6f01_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + sign_extend_8_rr(src,src); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,14); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* Bcc.L #.L */ +uae_u32 REGPARAM2 op_6fff_0_comp_nf(uae_u32 opcode) /* Bcc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + sub_l_ri(src,m68k_pc_offset-m68k_pc_offset_thisinst-2); + add_l_ri(src,JITPTR comp_pc_p); + mov_l_ri(PC_P,JITPTR comp_pc_p); + add_l_ri(src,m68k_pc_offset); + add_l_ri(PC_P,m68k_pc_offset); + m68k_pc_offset=0; + uae_u32 v1=get_const(PC_P); + uae_u32 v2=get_const(src); + register_branch(v1,v2,14); + make_flags_live(); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVEQ.L #,Dn */ +uae_u32 REGPARAM2 op_7000_0_comp_nf(uae_u32 opcode) /* MOVE */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); + #else + uae_s32 srcreg = (uae_s32)(uae_s8)(opcode & 255); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, srcreg); + { + int dst = dstreg; + dont_care_flags(); + mov_l_rr(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,Dn */ +uae_u32 REGPARAM2 op_8000_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (An),Dn */ +uae_u32 REGPARAM2 op_8010_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (An)+,Dn */ +uae_u32 REGPARAM2 op_8018_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B -(An),Dn */ +uae_u32 REGPARAM2 op_8020_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_8028_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_8030_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_8038_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_8039_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_803a_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_803b_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B #.B,Dn */ +uae_u32 REGPARAM2 op_803c_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,Dn */ +uae_u32 REGPARAM2 op_8040_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (An),Dn */ +uae_u32 REGPARAM2 op_8050_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (An)+,Dn */ +uae_u32 REGPARAM2 op_8058_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W -(An),Dn */ +uae_u32 REGPARAM2 op_8060_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_8068_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_8070_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_8078_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_8079_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_807a_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_807b_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W #.W,Dn */ +uae_u32 REGPARAM2 op_807c_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,Dn */ +uae_u32 REGPARAM2 op_8080_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (An),Dn */ +uae_u32 REGPARAM2 op_8090_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (An)+,Dn */ +uae_u32 REGPARAM2 op_8098_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L -(An),Dn */ +uae_u32 REGPARAM2 op_80a0_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_80a8_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_80b0_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_80b8_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_80b9_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_80ba_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_80bb_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L #.L,Dn */ +uae_u32 REGPARAM2 op_80bc_0_comp_nf(uae_u32 opcode) /* OR */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + { + or_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(An) */ +uae_u32 REGPARAM2 op_8110_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_8118_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_8120_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_8128_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8130_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_8138_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_8139_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(An) */ +uae_u32 REGPARAM2 op_8150_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_8158_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,-(An) */ +uae_u32 REGPARAM2 op_8160_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_8168_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_8170_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_8178_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_8179_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l(dst,scratchie); + forget_about(scratchie); + } else + or_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(An) */ +uae_u32 REGPARAM2 op_8190_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_8198_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,-(An) */ +uae_u32 REGPARAM2 op_81a0_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_81a8_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_81b0_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_81b8_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* OR.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_81b9_0_comp_nf(uae_u32 opcode) /* OR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + or_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,Dn */ +uae_u32 REGPARAM2 op_9000_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (An),Dn */ +uae_u32 REGPARAM2 op_9010_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (An)+,Dn */ +uae_u32 REGPARAM2 op_9018_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B -(An),Dn */ +uae_u32 REGPARAM2 op_9020_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_9028_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_9030_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_9038_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_9039_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_903a_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_903b_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B #.B,Dn */ +uae_u32 REGPARAM2 op_903c_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + sub_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,Dn */ +uae_u32 REGPARAM2 op_9040_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W An,Dn */ +uae_u32 REGPARAM2 op_9048_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (An),Dn */ +uae_u32 REGPARAM2 op_9050_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (An)+,Dn */ +uae_u32 REGPARAM2 op_9058_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W -(An),Dn */ +uae_u32 REGPARAM2 op_9060_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_9068_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_9070_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_9078_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_9079_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_907a_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_907b_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W #.W,Dn */ +uae_u32 REGPARAM2 op_907c_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + sub_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,Dn */ +uae_u32 REGPARAM2 op_9080_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L An,Dn */ +uae_u32 REGPARAM2 op_9088_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (An),Dn */ +uae_u32 REGPARAM2 op_9090_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (An)+,Dn */ +uae_u32 REGPARAM2 op_9098_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L -(An),Dn */ +uae_u32 REGPARAM2 op_90a0_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_90a8_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_90b0_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_90b8_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_90b9_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_90ba_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_90bb_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L #.L,Dn */ +uae_u32 REGPARAM2 op_90bc_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + sub_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W Dn,An */ +uae_u32 REGPARAM2 op_90c0_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W An,An */ +uae_u32 REGPARAM2 op_90c8_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (An),An */ +uae_u32 REGPARAM2 op_90d0_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (An)+,An */ +uae_u32 REGPARAM2 op_90d8_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W -(An),An */ +uae_u32 REGPARAM2 op_90e0_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (d16,An),An */ +uae_u32 REGPARAM2 op_90e8_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_90f0_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_90f8_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_90f9_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_90fa_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_90fb_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.W #.W,An */ +uae_u32 REGPARAM2 op_90fc_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.B Dn,Dn */ +uae_u32 REGPARAM2 op_9100_0_comp_nf(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + restore_carry(); + sbb_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.B -(An),-(An) */ +uae_u32 REGPARAM2 op_9108_0_comp_nf(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + restore_carry(); + sbb_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(An) */ +uae_u32 REGPARAM2 op_9110_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_9118_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,-(An) */ +uae_u32 REGPARAM2 op_9120_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_9128_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_9130_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_9138_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_9139_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + sub_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.W Dn,Dn */ +uae_u32 REGPARAM2 op_9140_0_comp_nf(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + restore_carry(); + sbb_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.W -(An),-(An) */ +uae_u32 REGPARAM2 op_9148_0_comp_nf(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + restore_carry(); + sbb_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(An) */ +uae_u32 REGPARAM2 op_9150_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_9158_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,-(An) */ +uae_u32 REGPARAM2 op_9160_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_9168_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_9170_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_9178_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_9179_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + sub_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.L Dn,Dn */ +uae_u32 REGPARAM2 op_9180_0_comp_nf(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + restore_carry(); + sbb_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBX.L -(An),-(An) */ +uae_u32 REGPARAM2 op_9188_0_comp_nf(uae_u32 opcode) /* SUBX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + restore_carry(); + sbb_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(An) */ +uae_u32 REGPARAM2 op_9190_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_9198_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,-(An) */ +uae_u32 REGPARAM2 op_91a0_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_91a8_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_91b0_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_91b8_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUB.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_91b9_0_comp_nf(uae_u32 opcode) /* SUB */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + sub_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L Dn,An */ +uae_u32 REGPARAM2 op_91c0_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L An,An */ +uae_u32 REGPARAM2 op_91c8_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (An),An */ +uae_u32 REGPARAM2 op_91d0_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (An)+,An */ +uae_u32 REGPARAM2 op_91d8_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L -(An),An */ +uae_u32 REGPARAM2 op_91e0_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (d16,An),An */ +uae_u32 REGPARAM2 op_91e8_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_91f0_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_91f8_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_91f9_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_91fa_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_91fb_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* SUBA.L #.L,An */ +uae_u32 REGPARAM2 op_91fc_0_comp_nf(uae_u32 opcode) /* SUBA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + sub_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B Dn,Dn */ +uae_u32 REGPARAM2 op_b000_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (An),Dn */ +uae_u32 REGPARAM2 op_b010_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (An)+,Dn */ +uae_u32 REGPARAM2 op_b018_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B -(An),Dn */ +uae_u32 REGPARAM2 op_b020_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_b028_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b030_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b038_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b039_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b03a_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b03b_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.B #.B,Dn */ +uae_u32 REGPARAM2 op_b03c_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W Dn,Dn */ +uae_u32 REGPARAM2 op_b040_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W An,Dn */ +uae_u32 REGPARAM2 op_b048_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (An),Dn */ +uae_u32 REGPARAM2 op_b050_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (An)+,Dn */ +uae_u32 REGPARAM2 op_b058_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W -(An),Dn */ +uae_u32 REGPARAM2 op_b060_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_b068_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b070_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b078_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b079_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b07a_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b07b_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.W #.W,Dn */ +uae_u32 REGPARAM2 op_b07c_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L Dn,Dn */ +uae_u32 REGPARAM2 op_b080_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L An,Dn */ +uae_u32 REGPARAM2 op_b088_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (An),Dn */ +uae_u32 REGPARAM2 op_b090_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (An)+,Dn */ +uae_u32 REGPARAM2 op_b098_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L -(An),Dn */ +uae_u32 REGPARAM2 op_b0a0_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#ifdef PART_7 +/* CMP.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_b0a8_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_b0b0_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_b0b8_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_b0b9_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_b0ba_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_b0bb_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMP.L #.L,Dn */ +uae_u32 REGPARAM2 op_b0bc_0_comp_nf(uae_u32 opcode) /* CMP */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W Dn,An */ +uae_u32 REGPARAM2 op_b0c0_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W An,An */ +uae_u32 REGPARAM2 op_b0c8_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (An),An */ +uae_u32 REGPARAM2 op_b0d0_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (An)+,An */ +uae_u32 REGPARAM2 op_b0d8_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W -(An),An */ +uae_u32 REGPARAM2 op_b0e0_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (d16,An),An */ +uae_u32 REGPARAM2 op_b0e8_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_b0f0_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_b0f8_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_b0f9_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_b0fa_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_b0fb_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.W #.W,An */ +uae_u32 REGPARAM2 op_b0fc_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + sign_extend_16_rr(tmps,src); + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,Dn */ +uae_u32 REGPARAM2 op_b100_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPM.B (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b108_0_comp_nf(uae_u32 opcode) /* CMPM */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(An) */ +uae_u32 REGPARAM2 op_b110_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_b118_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,-(An) */ +uae_u32 REGPARAM2 op_b120_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b128_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b130_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b138_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b139_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_b(dst,src); + } + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,Dn */ +uae_u32 REGPARAM2 op_b140_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPM.W (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b148_0_comp_nf(uae_u32 opcode) /* CMPM */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(An) */ +uae_u32 REGPARAM2 op_b150_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_b158_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,-(An) */ +uae_u32 REGPARAM2 op_b160_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b168_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b170_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b178_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b179_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + { + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + xor_l(dst,scratchie); + forget_about(scratchie); + } else + xor_w(dst,src); + } + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,Dn */ +uae_u32 REGPARAM2 op_b180_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + { + xor_l(dst,src); + } + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPM.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_b188_0_comp_nf(uae_u32 opcode) /* CMPM */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + { + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(An) */ +uae_u32 REGPARAM2 op_b190_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_b198_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,-(An) */ +uae_u32 REGPARAM2 op_b1a0_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_b1a8_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_b1b0_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_b1b8_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EOR.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_b1b9_0_comp_nf(uae_u32 opcode) /* EOR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + { + xor_l(dst,src); + } + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L Dn,An */ +uae_u32 REGPARAM2 op_b1c0_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L An,An */ +uae_u32 REGPARAM2 op_b1c8_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (An),An */ +uae_u32 REGPARAM2 op_b1d0_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (An)+,An */ +uae_u32 REGPARAM2 op_b1d8_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L -(An),An */ +uae_u32 REGPARAM2 op_b1e0_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (d16,An),An */ +uae_u32 REGPARAM2 op_b1e8_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_b1f0_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_b1f8_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_b1f9_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_b1fa_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_b1fb_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* CMPA.L #.L,An */ +uae_u32 REGPARAM2 op_b1fc_0_comp_nf(uae_u32 opcode) /* CMPA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmps=scratchie++; + tmps=src; + dont_care_flags(); + /* Weird --- CMP with noflags ;-) */ + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,Dn */ +uae_u32 REGPARAM2 op_c000_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (An),Dn */ +uae_u32 REGPARAM2 op_c010_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (An)+,Dn */ +uae_u32 REGPARAM2 op_c018_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B -(An),Dn */ +uae_u32 REGPARAM2 op_c020_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_c028_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c030_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c038_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c039_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c03a_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c03b_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B #.B,Dn */ +uae_u32 REGPARAM2 op_c03c_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,Dn */ +uae_u32 REGPARAM2 op_c040_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (An),Dn */ +uae_u32 REGPARAM2 op_c050_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c058_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W -(An),Dn */ +uae_u32 REGPARAM2 op_c060_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c068_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c070_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c078_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c079_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c07a_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c07b_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W #.W,Dn */ +uae_u32 REGPARAM2 op_c07c_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,Dn */ +uae_u32 REGPARAM2 op_c080_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (An),Dn */ +uae_u32 REGPARAM2 op_c090_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (An)+,Dn */ +uae_u32 REGPARAM2 op_c098_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L -(An),Dn */ +uae_u32 REGPARAM2 op_c0a0_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_c0a8_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c0b0_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c0b8_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c0b9_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c0ba_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c0bb_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L #.L,Dn */ +uae_u32 REGPARAM2 op_c0bc_0_comp_nf(uae_u32 opcode) /* AND */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + and_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W Dn,Dn */ +uae_u32 REGPARAM2 op_c0c0_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int src = srcreg; + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (An),Dn */ +uae_u32 REGPARAM2 op_c0d0_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c0d8_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W -(An),Dn */ +uae_u32 REGPARAM2 op_c0e0_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c0e8_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c0f0_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c0f8_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c0f9_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c0fa_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c0fb_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULU.W #.W,Dn */ +uae_u32 REGPARAM2 op_c0fc_0_comp_nf(uae_u32 opcode) /* MULU */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + zero_extend_16_rr(scratchie,src); + zero_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(An) */ +uae_u32 REGPARAM2 op_c110_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_c118_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,-(An) */ +uae_u32 REGPARAM2 op_c120_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c128_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c130_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c138_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c139_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_8_rr(scratchie,src); + or_l_ri(scratchie,0xffffff00); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXG.L Dn,Dn */ +uae_u32 REGPARAM2 op_c140_0_comp_nf(uae_u32 opcode) /* EXG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + int tmp=scratchie++; + mov_l_rr(tmp,src); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + if(dstreg != tmp) { + mov_l_rr(dstreg, tmp); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXG.L An,An */ +uae_u32 REGPARAM2 op_c148_0_comp_nf(uae_u32 opcode) /* EXG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + mov_l_rr(tmp,src); + if(srcreg + 8 != dst) { + mov_l_rr(srcreg + 8, dst); + } + if(dstreg + 8 != tmp) { + mov_l_rr(dstreg + 8, tmp); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(An) */ +uae_u32 REGPARAM2 op_c150_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_c158_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,-(An) */ +uae_u32 REGPARAM2 op_c160_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c168_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c170_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c178_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c179_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + if (kill_rodent(dst)) { + zero_extend_16_rr(scratchie,src); + or_l_ri(scratchie,0xffff0000); + and_l(dst,scratchie); + forget_about(scratchie); + } else + and_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* EXG.L Dn,An */ +uae_u32 REGPARAM2 op_c188_0_comp_nf(uae_u32 opcode) /* EXG */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + mov_l_rr(tmp,src); + if(srcreg != dst) { + mov_l_rr(srcreg, dst); + } + if(dstreg + 8 != tmp) { + mov_l_rr(dstreg + 8, tmp); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(An) */ +uae_u32 REGPARAM2 op_c190_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_c198_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,-(An) */ +uae_u32 REGPARAM2 op_c1a0_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_c1a8_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_c1b0_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_c1b8_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* AND.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_c1b9_0_comp_nf(uae_u32 opcode) /* AND */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + and_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W Dn,Dn */ +uae_u32 REGPARAM2 op_c1c0_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int src = srcreg; + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (An),Dn */ +uae_u32 REGPARAM2 op_c1d0_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (An)+,Dn */ +uae_u32 REGPARAM2 op_c1d8_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W -(An),Dn */ +uae_u32 REGPARAM2 op_c1e0_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_c1e8_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_c1f0_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_c1f8_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_c1f9_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_c1fa_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_c1fb_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MULS.W #.W,Dn */ +uae_u32 REGPARAM2 op_c1fc_0_comp_nf(uae_u32 opcode) /* MULS */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + sign_extend_16_rr(scratchie,src); + sign_extend_16_rr(dst,dst); + imul_32_32(dst,scratchie); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,Dn */ +uae_u32 REGPARAM2 op_d000_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (An),Dn */ +uae_u32 REGPARAM2 op_d010_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (An)+,Dn */ +uae_u32 REGPARAM2 op_d018_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + lea_l_brr(srcreg + 8,srcreg + 8, areg_byteinc[srcreg]); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B -(An),Dn */ +uae_u32 REGPARAM2 op_d020_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (d16,An),Dn */ +uae_u32 REGPARAM2 op_d028_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d030_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d038_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d039_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d03a_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d03b_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B #.B,Dn */ +uae_u32 REGPARAM2 op_d03c_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s8)comp_get_ibyte((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + add_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,Dn */ +uae_u32 REGPARAM2 op_d040_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W An,Dn */ +uae_u32 REGPARAM2 op_d048_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (An),Dn */ +uae_u32 REGPARAM2 op_d050_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (An)+,Dn */ +uae_u32 REGPARAM2 op_d058_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W -(An),Dn */ +uae_u32 REGPARAM2 op_d060_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (d16,An),Dn */ +uae_u32 REGPARAM2 op_d068_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d070_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d078_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d079_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d07a_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d07b_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W #.W,Dn */ +uae_u32 REGPARAM2 op_d07c_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dstreg; + dont_care_flags(); + add_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,Dn */ +uae_u32 REGPARAM2 op_d080_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L An,Dn */ +uae_u32 REGPARAM2 op_d088_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (An),Dn */ +uae_u32 REGPARAM2 op_d090_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (An)+,Dn */ +uae_u32 REGPARAM2 op_d098_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L -(An),Dn */ +uae_u32 REGPARAM2 op_d0a0_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (d16,An),Dn */ +uae_u32 REGPARAM2 op_d0a8_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (d8,An,Xn),Dn */ +uae_u32 REGPARAM2 op_d0b0_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (xxx).W,Dn */ +uae_u32 REGPARAM2 op_d0b8_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (xxx).L,Dn */ +uae_u32 REGPARAM2 op_d0b9_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (d16,PC),Dn */ +uae_u32 REGPARAM2 op_d0ba_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L (d8,PC,Xn),Dn */ +uae_u32 REGPARAM2 op_d0bb_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L #.L,Dn */ +uae_u32 REGPARAM2 op_d0bc_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dstreg; + dont_care_flags(); + add_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W Dn,An */ +uae_u32 REGPARAM2 op_d0c0_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W An,An */ +uae_u32 REGPARAM2 op_d0c8_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (An),An */ +uae_u32 REGPARAM2 op_d0d0_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (An)+,An */ +uae_u32 REGPARAM2 op_d0d8_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readword(srca,src,scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 2); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W -(An),An */ +uae_u32 REGPARAM2 op_d0e0_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (d16,An),An */ +uae_u32 REGPARAM2 op_d0e8_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_d0f0_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (xxx).W,An */ +uae_u32 REGPARAM2 op_d0f8_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (xxx).L,An */ +uae_u32 REGPARAM2 op_d0f9_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (d16,PC),An */ +uae_u32 REGPARAM2 op_d0fa_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_d0fb_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readword(srca,src,scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.W #.W,An */ +uae_u32 REGPARAM2 op_d0fc_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + sign_extend_16_rr(tmp,src); + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.B Dn,Dn */ +uae_u32 REGPARAM2 op_d100_0_comp_nf(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + restore_carry(); + adc_b(dst,src); + if(dstreg != dst) { + mov_b_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.B -(An),-(An) */ +uae_u32 REGPARAM2 op_d108_0_comp_nf(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, (uae_s32)-areg_byteinc[srcreg]); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readbyte(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + { + dont_care_flags(); + restore_carry(); + adc_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(An) */ +uae_u32 REGPARAM2 op_d110_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(An)+ */ +uae_u32 REGPARAM2 op_d118_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + lea_l_brr(dstreg + 8,dstreg + 8, areg_byteinc[dstreg]); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,-(An) */ +uae_u32 REGPARAM2 op_d120_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, (uae_s32)-areg_byteinc[dstreg]); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d128_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d130_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d138_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.B Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d139_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readbyte(dsta, dst, scratchie); + dont_care_flags(); + add_b(dst,src); + writebyte(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.W Dn,Dn */ +uae_u32 REGPARAM2 op_d140_0_comp_nf(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + restore_carry(); + adc_w(dst,src); + if(dstreg != dst) { + mov_w_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.W -(An),-(An) */ +uae_u32 REGPARAM2 op_d148_0_comp_nf(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -2); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readword(srca,src,scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + { + dont_care_flags(); + restore_carry(); + adc_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(An) */ +uae_u32 REGPARAM2 op_d150_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(An)+ */ +uae_u32 REGPARAM2 op_d158_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 2); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,-(An) */ +uae_u32 REGPARAM2 op_d160_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -2); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d168_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d170_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d178_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.W Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d179_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readword(dsta,dst,scratchie); + dont_care_flags(); + add_w(dst,src); + writeword(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.L Dn,Dn */ +uae_u32 REGPARAM2 op_d180_0_comp_nf(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dstreg; + { + dont_care_flags(); + restore_carry(); + adc_l(dst,src); + if(dstreg != dst) { + mov_l_rr(dstreg, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDX.L -(An),-(An) */ +uae_u32 REGPARAM2 op_d188_0_comp_nf(uae_u32 opcode) /* ADDX */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + { + dont_care_flags(); + restore_carry(); + adc_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(An) */ +uae_u32 REGPARAM2 op_d190_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(An)+ */ +uae_u32 REGPARAM2 op_d198_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + lea_l_brr(dstreg + 8, dstreg + 8, 4); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,-(An) */ +uae_u32 REGPARAM2 op_d1a0_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + lea_l_brr(dstreg + 8, dstreg + 8, -4); + if (dodgy) { + mov_l_rr(dsta, 8 + dstreg); + } + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(d16,An) */ +uae_u32 REGPARAM2 op_d1a8_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_rr(dsta, 8 + dstreg); + lea_l_brr(dsta, dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_d1b0_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + calc_disp_ea_020(dstreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), dsta, scratchie); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(xxx).W */ +uae_u32 REGPARAM2 op_d1b8_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADD.L Dn,(xxx).L */ +uae_u32 REGPARAM2 op_d1b9_0_comp_nf(uae_u32 opcode) /* ADD */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dst = scratchie++; + readlong(dsta, dst, scratchie); + dont_care_flags(); + add_l(dst,src); + writelong(dsta, dst, scratchie); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L Dn,An */ +uae_u32 REGPARAM2 op_d1c0_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = srcreg; + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L An,An */ +uae_u32 REGPARAM2 op_d1c8_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(src, srcreg + 8); + } + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (An),An */ +uae_u32 REGPARAM2 op_d1d0_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (An)+,An */ +uae_u32 REGPARAM2 op_d1d8_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int src = scratchie++; + readlong(srca, src, scratchie); + lea_l_brr(srcreg + 8, srcreg + 8, 4); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L -(An),An */ +uae_u32 REGPARAM2 op_d1e0_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + { + int srca = dodgy ? scratchie++ : srcreg + 8; + lea_l_brr(srcreg + 8, srcreg + 8, -4); + if (dodgy) { + mov_l_rr(srca, 8 + srcreg); + } + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (d16,An),An */ +uae_u32 REGPARAM2 op_d1e8_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_rr(srca, 8 + srcreg); + lea_l_brr(srca, srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (d8,An,Xn),An */ +uae_u32 REGPARAM2 op_d1f0_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + calc_disp_ea_020(srcreg + 8, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (xxx).W,An */ +uae_u32 REGPARAM2 op_d1f8_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2)); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (xxx).L,An */ +uae_u32 REGPARAM2 op_d1f9_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (d16,PC),An */ +uae_u32 REGPARAM2 op_d1fa_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2); + mov_l_ri(srca, address + PC16off); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L (d8,PC,Xn),An */ +uae_u32 REGPARAM2 op_d1fb_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int pctmp = scratchie++; + int srca = scratchie++; + uae_u32 address = (uae_u32)(start_pc + ((char *)comp_pc_p - (char *)start_pc_p) + m68k_pc_offset); + { + mov_l_ri(pctmp,address); + calc_disp_ea_020(pctmp, comp_get_iword((m68k_pc_offset+=2)-2), srca, scratchie); + { + int src = scratchie++; + readlong(srca, src, scratchie); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ADDA.L #.L,An */ +uae_u32 REGPARAM2 op_d1fc_0_comp_nf(uae_u32 opcode) /* ADDA */ +{ + uae_u32 dstreg = (opcode >> 9) & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + { + int src = scratchie++; + mov_l_ri(src, comp_get_ilong((m68k_pc_offset+=4)-4)); + { + int dst = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dst, dstreg + 8); + } + { + int tmp=scratchie++; + tmp=src; + add_l(dst,tmp); + if(dstreg + 8 != dst) { + mov_l_rr(dstreg + 8, dst); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* ASRQ.B #,Dn */ +uae_u32 REGPARAM2 op_e000_0_comp_nf(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shra_b_ri(data,srcreg); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSRQ.B #,Dn */ +uae_u32 REGPARAM2 op_e008_0_comp_nf(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shrl_b_ri(data,srcreg); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* RORQ.B #,Dn */ +uae_u32 REGPARAM2 op_e018_0_comp_nf(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + ror_b_rr(data,cnt); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e020_0_comp_nf(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int setval = scratchie++; + mov_l_ri(cdata, 0); + mov_l_ri(setval, 0xffffffff); + test_l_ri(data, 0x00000080); + cmov_l_rr(setval, cdata, NATIVE_CC_EQ); + mov_l_rr(cdata, setval); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x08); + cmov_l_rr(cdata, setval, NATIVE_CC_HI); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shra_b_rr(cdata, tmpcnt); + mov_b_rr(data, cdata); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e028_0_comp_nf(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x08); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shrl_b_rr(cdata, tmpcnt); + mov_b_rr(data, cdata); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROR.B Dn,Dn */ +uae_u32 REGPARAM2 op_e038_0_comp_nf(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + ror_b_rr(data,cnt); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASRQ.W #,Dn */ +uae_u32 REGPARAM2 op_e040_0_comp_nf(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shra_w_ri(data,srcreg); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +#endif + +#ifdef PART_8 +/* LSRQ.W #,Dn */ +uae_u32 REGPARAM2 op_e048_0_comp_nf(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shrl_w_ri(data,srcreg); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* RORQ.W #,Dn */ +uae_u32 REGPARAM2 op_e058_0_comp_nf(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + ror_w_rr(data,cnt); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e060_0_comp_nf(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int setval = scratchie++; + mov_l_ri(cdata, 0); + mov_l_ri(setval, 0xffffffff); + test_l_ri(data, 0x00008000); + cmov_l_rr(setval, cdata, NATIVE_CC_EQ); + mov_l_rr(cdata, setval); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x10); + cmov_l_rr(cdata, setval, NATIVE_CC_HI); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shra_w_rr(cdata, tmpcnt); + mov_w_rr(data, cdata); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e068_0_comp_nf(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x10); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shrl_w_rr(cdata, tmpcnt); + mov_w_rr(data, cdata); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROR.W Dn,Dn */ +uae_u32 REGPARAM2 op_e078_0_comp_nf(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + ror_w_rr(data,cnt); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASRQ.L #,Dn */ +uae_u32 REGPARAM2 op_e080_0_comp_nf(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shra_l_ri(data,srcreg); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSRQ.L #,Dn */ +uae_u32 REGPARAM2 op_e088_0_comp_nf(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shrl_l_ri(data,srcreg); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* RORQ.L #,Dn */ +uae_u32 REGPARAM2 op_e098_0_comp_nf(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + ror_l_rr(data,cnt); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0a0_0_comp_nf(uae_u32 opcode) /* ASR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + int setval = scratchie++; + mov_l_ri(cdata, 0); + mov_l_ri(setval, 0xffffffff); + test_l_ri(data, 0x80000000); + cmov_l_rr(setval, cdata, NATIVE_CC_EQ); + mov_l_rr(cdata, setval); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x20); + cmov_l_rr(cdata, setval, NATIVE_CC_HI); + cmov_l_rr(data, setval, NATIVE_CC_EQ); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shra_l_rr(cdata, tmpcnt); + mov_l_rr(data, cdata); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0a8_0_comp_nf(uae_u32 opcode) /* LSR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x20); + cmov_l_rr(data, cdata, NATIVE_CC_EQ); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shrl_l_rr(cdata, tmpcnt); + mov_l_rr(data, cdata); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROR.L Dn,Dn */ +uae_u32 REGPARAM2 op_e0b8_0_comp_nf(uae_u32 opcode) /* ROR */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + ror_l_rr(data,cnt); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e100_0_comp_nf(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shll_b_ri(data,srcreg); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e108_0_comp_nf(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shll_b_ri(data,srcreg); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROLQ.B #,Dn */ +uae_u32 REGPARAM2 op_e118_0_comp_nf(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + rol_b_rr(data,cnt); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e120_0_comp_nf(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x08); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_b_rr(cdata, tmpcnt); + mov_b_rr(data, cdata); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e128_0_comp_nf(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x08); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_b_rr(cdata, tmpcnt); + mov_b_rr(data, cdata); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROL.B Dn,Dn */ +uae_u32 REGPARAM2 op_e138_0_comp_nf(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + rol_b_rr(data,cnt); + if(dstreg != data) { + mov_b_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e140_0_comp_nf(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shll_w_ri(data,srcreg); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e148_0_comp_nf(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shll_w_ri(data,srcreg); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROLQ.W #,Dn */ +uae_u32 REGPARAM2 op_e158_0_comp_nf(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + rol_w_rr(data,cnt); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e160_0_comp_nf(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x10); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_w_rr(cdata, tmpcnt); + mov_w_rr(data, cdata); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e168_0_comp_nf(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x10); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_w_rr(cdata, tmpcnt); + mov_w_rr(data, cdata); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROL.W Dn,Dn */ +uae_u32 REGPARAM2 op_e178_0_comp_nf(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + rol_w_rr(data,cnt); + if(dstreg != data) { + mov_w_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e180_0_comp_nf(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shll_l_ri(data,srcreg); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e188_0_comp_nf(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + shll_l_ri(data,srcreg); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROLQ.L #,Dn */ +uae_u32 REGPARAM2 op_e198_0_comp_nf(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; + #else + uae_s32 srcreg = imm8_table[((opcode >> 9) & 7)]; + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + dont_care_flags(); + { + int cnt = scratchie++; + mov_l_ri(cnt, srcreg); + { + int data = dstreg; + { + rol_l_rr(data,cnt); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ASL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1a0_0_comp_nf(uae_u32 opcode) /* ASL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + if (needed_flags & FLAG_V) { + FAIL(1); + return 0; + } + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x20); + cmov_l_rr(data, cdata, NATIVE_CC_EQ); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_l_rr(cdata, tmpcnt); + mov_l_rr(data, cdata); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* LSL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1a8_0_comp_nf(uae_u32 opcode) /* LSL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + { + int cdata = scratchie++; + int tmpcnt = scratchie++; + mov_l_ri(cdata, 0); + mov_l_rr(tmpcnt, cnt); + and_l_ri(tmpcnt, 63); + cmp_b_ri(tmpcnt, 0x20); + cmov_l_rr(data, cdata, NATIVE_CC_EQ); + cmov_l_rr(cdata, data, NATIVE_CC_LS); + shll_l_rr(cdata, tmpcnt); + mov_l_rr(data, cdata); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* ROL.L Dn,Dn */ +uae_u32 REGPARAM2 op_e1b8_0_comp_nf(uae_u32 opcode) /* ROL */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 1) & 7); + #else + uae_s32 srcreg = ((opcode >> 9) & 7); + #endif + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + if ((uae_u32)srcreg==(uae_u32)dstreg) { + FAIL(1); + return 0; + } + { + dont_care_flags(); + { + int cnt = srcreg; + { + int data = dstreg; + { + rol_l_rr(data,cnt); + if(dstreg != data) { + mov_l_rr(dstreg, data); + } + } + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,Dn */ +uae_u32 REGPARAM2 op_f200_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,An */ +uae_u32 REGPARAM2 op_f208_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(An) */ +uae_u32 REGPARAM2 op_f210_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_f218_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,-(An) */ +uae_u32 REGPARAM2 op_f220_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_f228_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_f230_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_f238_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_f239_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(d16,PC) */ +uae_u32 REGPARAM2 op_f23a_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_s32 dstreg = 2; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,(d8,PC,Xn) */ +uae_u32 REGPARAM2 op_f23b_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_s32 dstreg = 3; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FPP.L #.W,#.L */ +uae_u32 REGPARAM2 op_f23c_0_comp_nf(uae_u32 opcode) /* FPP */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fpp_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,Dn */ +uae_u32 REGPARAM2 op_f240_0_comp_nf(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(An) */ +uae_u32 REGPARAM2 op_f250_0_comp_nf(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(An)+ */ +uae_u32 REGPARAM2 op_f258_0_comp_nf(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,-(An) */ +uae_u32 REGPARAM2 op_f260_0_comp_nf(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(d16,An) */ +uae_u32 REGPARAM2 op_f268_0_comp_nf(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(d8,An,Xn) */ +uae_u32 REGPARAM2 op_f270_0_comp_nf(uae_u32 opcode) /* FScc */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(xxx).W */ +uae_u32 REGPARAM2 op_f278_0_comp_nf(uae_u32 opcode) /* FScc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FScc.L #.W,(xxx).L */ +uae_u32 REGPARAM2 op_f279_0_comp_nf(uae_u32 opcode) /* FScc */ +{ + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + uae_u16 extra=comp_get_iword((m68k_pc_offset+=2)-2); + comp_fscc_opp(opcode,extra); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FBccQ.L #,#.W */ +uae_u32 REGPARAM2 op_f280_0_comp_nf(uae_u32 opcode) /* FBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 63); + #else + uae_s32 srcreg = (opcode & 63); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + comp_fbcc_opp(opcode); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* FBccQ.L #,#.L */ +uae_u32 REGPARAM2 op_f2c0_0_comp_nf(uae_u32 opcode) /* FBcc */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 63); + #else + uae_s32 srcreg = (opcode & 63); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + #ifdef USE_JIT_FPU + comp_fbcc_opp(opcode); + #else + failure = 1; + #endif + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + if (failure) { + m68k_pc_offset = m68k_pc_offset_thisinst; + } + return 0; +} +/* MOVE16.L (An)+,(xxx).L */ +uae_u32 REGPARAM2 op_f600_0_comp_nf(uae_u32 opcode) /* MOVE16 */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int src=scratchie++; + int dst=scratchie++; + { + int srca = scratchie++; + mov_l_rr(srca, srcreg + 8); + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + mov_l_rr(src,srca); + mov_l_rr(dst,dsta); + and_l_ri(src,~15); + and_l_ri(dst,~15); + add_l_ri(srcreg+8,16); + if (special_mem || jit_n_addr_unsafe) { + int tmp=scratchie; + scratchie+=4; + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + } else + { + int tmp=scratchie; + scratchie+=4; + get_n_addr(src,src,scratchie); + get_n_addr(dst,dst,scratchie); + mov_l_rR(tmp+0,src,0); + mov_l_rR(tmp+1,src,4); + mov_l_rR(tmp+2,src,8); + mov_l_rR(tmp+3,src,12); + mov_l_Rr(dst,tmp+0,0); + forget_about(tmp+0); + mov_l_Rr(dst,tmp+1,4); + forget_about(tmp+1); + mov_l_Rr(dst,tmp+2,8); + forget_about(tmp+2); + mov_l_Rr(dst,tmp+3,12); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE16.L (xxx).L,(An)+ */ +uae_u32 REGPARAM2 op_f608_0_comp_nf(uae_u32 opcode) /* MOVE16 */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int src=scratchie++; + int dst=scratchie++; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dsta = scratchie++; + mov_l_rr(dsta, dstreg + 8); + mov_l_rr(src,srca); + mov_l_rr(dst,dsta); + and_l_ri(src,~15); + and_l_ri(dst,~15); + add_l_ri(dstreg+8,16); + if (special_mem || jit_n_addr_unsafe) { + int tmp=scratchie; + scratchie+=4; + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + } else + { + int tmp=scratchie; + scratchie+=4; + get_n_addr(src,src,scratchie); + get_n_addr(dst,dst,scratchie); + mov_l_rR(tmp+0,src,0); + mov_l_rR(tmp+1,src,4); + mov_l_rR(tmp+2,src,8); + mov_l_rR(tmp+3,src,12); + mov_l_Rr(dst,tmp+0,0); + forget_about(tmp+0); + mov_l_Rr(dst,tmp+1,4); + forget_about(tmp+1); + mov_l_Rr(dst,tmp+2,8); + forget_about(tmp+2); + mov_l_Rr(dst,tmp+3,12); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE16.L (An),(xxx).L */ +uae_u32 REGPARAM2 op_f610_0_comp_nf(uae_u32 opcode) /* MOVE16 */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int src=scratchie++; + int dst=scratchie++; + { + int srca = dodgy ? scratchie++ : srcreg + 8; + if (dodgy) { + mov_l_rr(srca, srcreg + 8); + } + { + int dsta = scratchie++; + mov_l_ri(dsta, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + mov_l_rr(src,srca); + mov_l_rr(dst,dsta); + and_l_ri(src,~15); + and_l_ri(dst,~15); + if (special_mem || jit_n_addr_unsafe) { + int tmp=scratchie; + scratchie+=4; + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + } else + { + int tmp=scratchie; + scratchie+=4; + get_n_addr(src,src,scratchie); + get_n_addr(dst,dst,scratchie); + mov_l_rR(tmp+0,src,0); + mov_l_rR(tmp+1,src,4); + mov_l_rR(tmp+2,src,8); + mov_l_rR(tmp+3,src,12); + mov_l_Rr(dst,tmp+0,0); + forget_about(tmp+0); + mov_l_Rr(dst,tmp+1,4); + forget_about(tmp+1); + mov_l_Rr(dst,tmp+2,8); + forget_about(tmp+2); + mov_l_Rr(dst,tmp+3,12); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE16.L (xxx).L,(An) */ +uae_u32 REGPARAM2 op_f618_0_comp_nf(uae_u32 opcode) /* MOVE16 */ +{ + uae_u32 dstreg = opcode & 7; + uae_u32 dodgy=0; + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int src=scratchie++; + int dst=scratchie++; + { + int srca = scratchie++; + mov_l_ri(srca, comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */ + { + int dsta = dodgy ? scratchie++ : dstreg + 8; + if (dodgy) { + mov_l_rr(dsta, dstreg + 8); + } + mov_l_rr(src,srca); + mov_l_rr(dst,dsta); + and_l_ri(src,~15); + and_l_ri(dst,~15); + if (special_mem || jit_n_addr_unsafe) { + int tmp=scratchie; + scratchie+=4; + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + } else + { + int tmp=scratchie; + scratchie+=4; + get_n_addr(src,src,scratchie); + get_n_addr(dst,dst,scratchie); + mov_l_rR(tmp+0,src,0); + mov_l_rR(tmp+1,src,4); + mov_l_rR(tmp+2,src,8); + mov_l_rR(tmp+3,src,12); + mov_l_Rr(dst,tmp+0,0); + forget_about(tmp+0); + mov_l_Rr(dst,tmp+1,4); + forget_about(tmp+1); + mov_l_Rr(dst,tmp+2,8); + forget_about(tmp+2); + mov_l_Rr(dst,tmp+3,12); + } + } + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +/* MOVE16.L (An)+,(An)+ */ +uae_u32 REGPARAM2 op_f620_0_comp_nf(uae_u32 opcode) /* MOVE16 */ +{ + #if defined(HAVE_GET_WORD_UNSWAPPED) + uae_u32 srcreg = ((opcode >> 8) & 7); + #else + uae_s32 srcreg = (opcode & 7); + #endif + uae_s32 dstreg = 0; + uae_u32 dodgy=(srcreg==(uae_s32)dstreg); + uae_u32 m68k_pc_offset_thisinst=m68k_pc_offset; + m68k_pc_offset+=2; + { + uae_u8 scratchie=S1; + int src=scratchie++; + int dst=scratchie++; + uae_u16 dstreg=((comp_get_iword((m68k_pc_offset+=2)-2))>>12)&0x07; + mov_l_rr(src,8+srcreg); + mov_l_rr(dst,8+dstreg); + and_l_ri(src,~15); + and_l_ri(dst,~15); + if (srcreg != dstreg) { + add_l_ri(srcreg+8,16); + } + add_l_ri(dstreg+8,16); + if (special_mem || jit_n_addr_unsafe) { + int tmp=scratchie; + scratchie+=4; + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + add_l_ri(src,4); + add_l_ri(dst,4); + readlong(src,tmp,scratchie); + writelong_clobber(dst,tmp,scratchie); + } else + { + int tmp=scratchie; + scratchie+=4; + get_n_addr(src,src,scratchie); + get_n_addr(dst,dst,scratchie); + mov_l_rR(tmp+0,src,0); + mov_l_rR(tmp+1,src,4); + mov_l_rR(tmp+2,src,8); + mov_l_rR(tmp+3,src,12); + mov_l_Rr(dst,tmp+0,0); + forget_about(tmp+0); + mov_l_Rr(dst,tmp+1,4); + forget_about(tmp+1); + mov_l_Rr(dst,tmp+2,8); + forget_about(tmp+2); + mov_l_Rr(dst,tmp+3,12); + } + } + if (m68k_pc_offset > SYNC_PC_OFFSET) { + sync_m68k_pc(); + } + return 0; +} +#endif + +#endif \ No newline at end of file diff --git a/src/jit/x86/compemu_x86.h b/src/jit/x86/compemu_x86.h new file mode 100644 index 000000000..220807ebb --- /dev/null +++ b/src/jit/x86/compemu_x86.h @@ -0,0 +1,577 @@ +/* + * compiler/compemu.h - Public interface and definitions + * + * Copyright (c) 2001-2004 Milan Jurik of ARAnyM dev team (see AUTHORS) + * + * Inspired by Christian Bauer's Basilisk II + * + * This file is part of the ARAnyM project which builds a new and powerful + * TOS/FreeMiNT compatible virtual machine running on almost any hardware. + * + * JIT compiler m68k -> IA-32 and AMD64 + * + * Original 68040 JIT compiler for UAE, copyright 2000-2002 Bernd Meyer + * Adaptation for Basilisk II and improvements, copyright 2000-2004 Gwenole Beauchesne + * Portions related to CPU detection come from linux/arch/i386/kernel/setup.c + * + * ARAnyM is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * ARAnyM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ARAnyM; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef COMPEMU_H +#define COMPEMU_H + +#include "sysconfig.h" +#include "newcpu.h" + +#ifdef UAE +#ifdef CPU_64_BIT +typedef uae_u64 uintptr; +typedef uae_s64 intptr; +#else +typedef uae_u32 uintptr; +#endif +/* FIXME: cpummu.cpp also checks for USE_JIT, possibly others */ +#define USE_JIT +#endif + +#define JITPTR (uae_u32)(uintptr) + +#ifdef USE_JIT + +#ifdef JIT_DEBUG +/* dump some information (m68k block, x86 block addresses) about the compiler state */ +extern void compiler_dumpstate(void); +#endif + +/* Now that we do block chaining, and also have linked lists on each tag, + TAGMASK can be much smaller and still do its job. Saves several megs + of memory! */ +#define TAGMASK 0x0000ffff +#define TAGSIZE (TAGMASK+1) +#define MAXRUN 1024 +#define cacheline(x) (((uintptr)x)&TAGMASK) + +extern uae_u8* start_pc_p; +extern uae_u32 start_pc; + +struct blockinfo_t; + +struct cpu_history { + uae_u16* location; +#ifdef UAE + uae_u8 specmem; +#endif +}; + +union cacheline { + cpuop_func *handler; + blockinfo_t * bi; +}; + +/* Use new spill/reload strategy when calling external functions */ +#define USE_OPTIMIZED_CALLS 0 +#if USE_OPTIMIZED_CALLS +#error implementation in progress +#endif + +/* (gb) When on, this option can save up to 30% compilation time + * when many lazy flushes occur (e.g. apps in MacOS 8.x). + */ +#define USE_SEPARATE_BIA 1 + +/* Use chain of checksum_info_t to compute the block checksum */ +#define USE_CHECKSUM_INFO 1 + +/* Use code inlining, aka follow-up of constant jumps */ +#define USE_INLINING 1 + +/* Inlining requires the chained checksum information */ +#if USE_INLINING +#undef USE_CHECKSUM_INFO +#define USE_CHECKSUM_INFO 1 +#endif + +/* Does flush_icache_range() only check for blocks falling in the requested range? */ +#define LAZY_FLUSH_ICACHE_RANGE 0 + +#define USE_F_ALIAS 1 +#define USE_OFFSET 1 +#define COMP_DEBUG 1 + +#if COMP_DEBUG +#define Dif(x) if (x) +#else +#define Dif(x) if (0) +#endif + +#define SCALE 2 + +#define BYTES_PER_INST 10240 /* paranoid ;-) */ +#if defined(CPU_arm) +#define LONGEST_68K_INST 256 /* The number of bytes the longest possible + 68k instruction takes */ +#else +#define LONGEST_68K_INST 16 /* The number of bytes the longest possible + 68k instruction takes */ +#endif +#define MAX_CHECKSUM_LEN 2048 /* The maximum size we calculate checksums + for. Anything larger will be flushed + unconditionally even with SOFT_FLUSH */ +#define MAX_HOLD_BI 3 /* One for the current block, and up to two + for jump targets */ + +#define INDIVIDUAL_INST 0 +#define FLAG_X 0x0010 +#define FLAG_N 0x0008 +#define FLAG_Z 0x0004 +#define FLAG_V 0x0002 +#define FLAG_C 0x0001 +#define FLAG_CZNV (FLAG_C | FLAG_Z | FLAG_N | FLAG_V) +#define FLAG_ALL (FLAG_C | FLAG_Z | FLAG_N | FLAG_V | FLAG_X) +#define FLAG_ZNV (FLAG_Z | FLAG_N | FLAG_V) + +#define KILLTHERAT 1 /* Set to 1 to avoid some partial_rat_stalls */ + +#if defined(CPU_arm) +#define USE_DATA_BUFFER +#define N_REGS 13 /* really 16, but 13 to 15 are SP, LR, PC */ +#else +#if defined(CPU_x86_64) +#define N_REGS 16 /* really only 15, but they are numbered 0-3,5-15 */ +#else +#define N_REGS 8 /* really only 7, but they are numbered 0,1,2,3,5,6,7 */ +#endif +#endif +#define N_FREGS 6 /* That leaves us two positions on the stack to play with */ + +/* Functions exposed to newcpu, or to what was moved from newcpu.c to + * compemu_support.c */ +extern void compiler_init(void); +extern void compiler_exit(void); +extern bool compiler_use_jit(void); +extern void flush(int save_regs); +void flush_reg(int reg); +extern void set_target(uae_u8* t); +extern uae_u8* get_target(void); +#ifdef UAE +extern void build_comp(void); +#endif +extern void set_cache_state(int enabled); +extern int get_cache_state(void); +extern uae_u32 get_jitted_size(void); +#ifdef JIT +extern void (*flush_icache)(int); +#endif +extern void alloc_cache(void); +extern int check_for_cache_miss(void); + +/* JIT FPU compilation */ +struct jit_disable_opcodes { + bool fbcc; + bool fdbcc; + bool fscc; + bool ftrapcc; + bool fsave; + bool frestore; + bool fmove; + bool fmovem; + bool fmovec; /* for move control register */ + bool fmovecr; /* for move from constant rom */ + bool fint; + bool fsinh; + bool fintrz; + bool fsqrt; + bool flognp1; + bool fetoxm1; + bool ftanh; + bool fatan; + bool fasin; + bool fatanh; + bool fsin; + bool ftan; + bool fetox; + bool ftwotox; + bool ftentox; + bool flogn; + bool flog10; + bool flog2; + bool fabs; + bool fcosh; + bool fneg; + bool facos; + bool fcos; + bool fgetexp; + bool fgetman; + bool fdiv; + bool fmod; + bool fadd; + bool fmul; + bool fsgldiv; + bool frem; + bool fscale; + bool fsglmul; + bool fsub; + bool fsincos; + bool fcmp; + bool ftst; +}; +extern struct jit_disable_opcodes jit_disable; + + +extern void comp_fpp_opp (uae_u32 opcode, uae_u16 extra); +extern void comp_fbcc_opp (uae_u32 opcode); +extern void comp_fscc_opp (uae_u32 opcode, uae_u16 extra); +void comp_fdbcc_opp (uae_u32 opcode, uae_u16 extra); +void comp_ftrapcc_opp (uae_u32 opcode, uaecptr oldpc); +void comp_fsave_opp (uae_u32 opcode); +void comp_frestore_opp (uae_u32 opcode); + +extern uae_u32 needed_flags; +extern uae_u8* comp_pc_p; +extern void* pushall_call_handler; + +#define VREGS 32 +#define VFREGS 16 + +#define INMEM 1 +#define CLEAN 2 +#define DIRTY 3 +#define UNDEF 4 +#define ISCONST 5 + +typedef struct { + uae_u32* mem; + uae_u32 val; + uae_u8 is_swapped; + uae_u8 status; + uae_s8 realreg; /* gb-- realreg can hold -1 */ + uae_u8 realind; /* The index in the holds[] array */ + uae_u8 needflush; + uae_u8 validsize; + uae_u8 dirtysize; + uae_u8 dummy; +} reg_status; + +typedef struct { + uae_u32* mem; + double val; + uae_u8 status; + uae_s8 realreg; /* gb-- realreg can hold -1 */ + uae_u8 realind; + uae_u8 needflush; +} freg_status; + +#define SP_REG 15 +#define PC_P 16 +#define FLAGX 17 +#define FLAGTMP 18 +#define NEXT_HANDLER 19 +#define S1 20 +#define S2 21 +#define S3 22 +#define S4 23 +#define S5 24 +#define S6 25 +#define S7 26 +#define S8 27 +#define S9 28 +#define S10 29 +#define S11 30 +#define S12 31 + +#define FP_RESULT 8 +#define FS1 9 +#define FS2 10 +#define FS3 11 + +typedef struct { + uae_u32 touched; + uae_s8 holds[VREGS]; + uae_u8 nholds; + uae_u8 canbyte; + uae_u8 canword; + uae_u8 locked; +} n_status; + +typedef struct { + uae_u32 touched; + uae_s8 holds[VFREGS]; + uae_u8 nholds; + uae_u8 locked; +} fn_status; + +/* For flag handling */ +#define NADA 1 +#define TRASH 2 +#define VALID 3 + +/* needflush values */ +#define NF_SCRATCH 0 +#define NF_TOMEM 1 +#define NF_HANDLER 2 + +typedef struct { + /* Integer part */ + reg_status state[VREGS]; + n_status nat[N_REGS]; + uae_u32 flags_on_stack; + uae_u32 flags_in_flags; + uae_u32 flags_are_important; + /* FPU part */ + freg_status fate[VFREGS]; + fn_status fat[N_FREGS]; + + /* x86 FPU part */ + uae_s8 spos[N_FREGS]; + uae_s8 onstack[6]; + uae_s8 tos; +} bigstate; + +typedef struct { + /* Integer part */ + uae_s8 virt[VREGS]; + uae_s8 nat[N_REGS]; +} smallstate; + +extern int touchcnt; + +#define IMM uae_s32 +#define RR1 uae_u32 +#define RR2 uae_u32 +#define RR4 uae_u32 +/* + R1, R2, R4 collides with ARM registers defined in ucontext +#define R1 uae_u32 +#define R2 uae_u32 +#define R4 uae_u32 +*/ +#define W1 uae_u32 +#define W2 uae_u32 +#define W4 uae_u32 +#define RW1 uae_u32 +#define RW2 uae_u32 +#define RW4 uae_u32 +#define MEMR uae_u32 +#define MEMW uae_u32 +#define MEMRW uae_u32 +#define MEMPTR uintptr +#define MEMPTRR MEMPTR +#define MEMPTRW MEMPTR +#define MEMPTRRW MEMPTR + +#define FW uae_u32 +#define FR uae_u32 +#define FRW uae_u32 + +#define MIDFUNC(nargs,func,args) void func args +#define COMPCALL(func) func + +#define LOWFUNC(flags,mem,nargs,func,args) static inline void func args + +/* What we expose to the outside */ +#define DECLARE_MIDFUNC(func) extern void func + +#if defined(CPU_i386) || defined(CPU_x86_64) +#include "compemu_midfunc_x86.h" +#endif + +#undef DECLARE_MIDFUNC + +extern int failure; +#define FAIL(x) do { failure|=x; } while (0) + +/* Convenience functions exposed to gencomp */ +extern uae_u32 m68k_pc_offset; +extern void readbyte(int address, int dest, int tmp); +extern void readword(int address, int dest, int tmp); +extern void readlong(int address, int dest, int tmp); +extern void writebyte(int address, int source, int tmp); +extern void writeword(int address, int source, int tmp); +extern void writelong(int address, int source, int tmp); +extern void writeword_clobber(int address, int source, int tmp); +extern void writelong_clobber(int address, int source, int tmp); +extern void get_n_addr(int address, int dest, int tmp); +extern void get_n_addr_jmp(int address, int dest, int tmp); +extern void calc_disp_ea_020(int base, uae_u32 dp, int target, int tmp); +/* Set native Z flag only if register is zero */ +extern void set_zero(int r, int tmp); +extern int kill_rodent(int r); +#define SYNC_PC_OFFSET 100 +extern void sync_m68k_pc(void); +extern uae_u32 get_const(int r); +extern int is_const(int r); +extern void register_branch(uae_u32 not_taken, uae_u32 taken, uae_u8 cond); +void compemu_make_sr(int sr, int tmp); +void compemu_enter_super(int sr); +void compemu_exc_make_frame(int format, int sr, int currpc, int nr, int tmp); +void compemu_bkpt(void); +extern bool disasm_this_inst; + +#define comp_get_ibyte(o) do_get_mem_byte((uae_u8 *)(comp_pc_p + (o) + 1)) +#define comp_get_iword(o) do_get_mem_word((uae_u16 *)(comp_pc_p + (o))) +#define comp_get_ilong(o) do_get_mem_long((uae_u32 *)(comp_pc_p + (o))) + +struct blockinfo_t; + +typedef struct dep_t { + uae_u32* jmp_off; + struct blockinfo_t* target; + struct blockinfo_t* source; + struct dep_t** prev_p; + struct dep_t* next; +} dependency; + +typedef struct checksum_info_t { + uae_u8 *start_p; + uae_u32 length; + struct checksum_info_t *next; +} checksum_info; + +typedef struct blockinfo_t { + uae_s32 count; + cpuop_func* direct_handler_to_use; + cpuop_func* handler_to_use; + /* The direct handler does not check for the correct address */ + + cpuop_func* handler; + cpuop_func* direct_handler; + + cpuop_func* direct_pen; + cpuop_func* direct_pcc; + +#ifdef UAE + uae_u8* nexthandler; +#endif + uae_u8* pc_p; + + uae_u32 c1; + uae_u32 c2; +#if USE_CHECKSUM_INFO + checksum_info *csi; +#else + uae_u32 len; + uae_u32 min_pcp; +#endif + + struct blockinfo_t* next_same_cl; + struct blockinfo_t** prev_same_cl_p; + struct blockinfo_t* next; + struct blockinfo_t** prev_p; + + uae_u8 optlevel; + uae_u8 needed_flags; + uae_u8 status; + uae_u8 havestate; + + dependency dep[2]; /* Holds things we depend on */ + dependency* deplist; /* List of things that depend on this */ + smallstate env; + +#ifdef JIT_DEBUG + /* (gb) size of the compiled block (direct handler) */ + uae_u32 direct_handler_size; +#endif +} blockinfo; + +#define BI_INVALID 0 +#define BI_ACTIVE 1 +#define BI_NEED_RECOMP 2 +#define BI_NEED_CHECK 3 +#define BI_CHECKING 4 +#define BI_COMPILING 5 +#define BI_FINALIZING 6 + +void execute_normal(void); +void exec_nostats(void); +void do_nothing(void); + +#else + +static inline void flush_icache(void) { } + +#endif /* !USE_JIT */ + +#ifdef UAE + +#define JIT_EXCEPTION_HANDLER +// #define JIT_ALWAYS_DISTRUST + +/* ARAnyM uses fpu_register name, used in scratch_t */ +/* FIXME: check that no ARAnyM code assumes different floating point type */ +typedef fptype fpu_register; + +extern void compile_block(cpu_history* pc_hist, int blocklen, int totcyles); + +#define MAXCYCLES (1000 * CYCLE_UNIT) +#define scaled_cycles(x) (currprefs.m68k_speed<0?(((x)/SCALE)?(((x)/SCALE (uintptr_t) 0xffffffff) { + jit_abort("JIT: 64-bit pointer (0x%llx) at %s:%d (fatal)", + (unsigned long long)address, file, line); + } + return (uae_u32) address; +} +#define uae_p32(x) (check_uae_p32((uintptr)(x), __FILE__, __LINE__)) +#else +#define uae_p32(x) ((uae_u32)(x)) +#endif + +#endif /* COMPEMU_H */ diff --git a/src/jit/x86/compstbl_x86.cpp b/src/jit/x86/compstbl_x86.cpp new file mode 100644 index 000000000..cfc0449c6 --- /dev/null +++ b/src/jit/x86/compstbl_x86.cpp @@ -0,0 +1,3758 @@ +#include "sysconfig.h" +#if defined(JIT) +#include "sysdeps.h" +#include "options.h" +#include "uae/memory.h" +#include "readcpu.h" +#include "newcpu.h" +#include "comptbl_x86.h" +#include "debug.h" +const struct comptbl op_smalltbl_0_comp_ff[] = { +{ op_0_0_comp_ff, 0, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_10_0_comp_ff, 16, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_18_0_comp_ff, 24, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_20_0_comp_ff, 32, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_28_0_comp_ff, 40, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_30_0_comp_ff, 48, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_38_0_comp_ff, 56, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_39_0_comp_ff, 57, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 60, COMP_OPCODE_ISJUMP }, /* ORSR */ +{ op_40_0_comp_ff, 64, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_50_0_comp_ff, 80, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_58_0_comp_ff, 88, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_60_0_comp_ff, 96, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_68_0_comp_ff, 104, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_70_0_comp_ff, 112, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_78_0_comp_ff, 120, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_79_0_comp_ff, 121, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 124, COMP_OPCODE_ISJUMP }, /* ORSR */ +{ op_80_0_comp_ff, 128, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_90_0_comp_ff, 144, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_98_0_comp_ff, 152, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_a0_0_comp_ff, 160, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_a8_0_comp_ff, 168, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_b0_0_comp_ff, 176, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_b8_0_comp_ff, 184, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_b9_0_comp_ff, 185, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 208, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 232, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 240, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 248, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 249, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 250, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 251, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ op_100_0_comp_ff, 256, 0 }, /* BTST */ +{ NULL, 264, COMP_OPCODE_ISJUMP }, /* MVPMR */ +{ op_110_0_comp_ff, 272, 0 }, /* BTST */ +{ op_118_0_comp_ff, 280, 0 }, /* BTST */ +{ op_120_0_comp_ff, 288, 0 }, /* BTST */ +{ op_128_0_comp_ff, 296, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_130_0_comp_ff, 304, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_138_0_comp_ff, 312, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_139_0_comp_ff, 313, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_13a_0_comp_ff, 314, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_13b_0_comp_ff, 315, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_13c_0_comp_ff, 316, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_140_0_comp_ff, 320, 0 }, /* BCHG */ +{ NULL, 328, COMP_OPCODE_ISJUMP }, /* MVPMR */ +{ op_150_0_comp_ff, 336, 0 }, /* BCHG */ +{ op_158_0_comp_ff, 344, 0 }, /* BCHG */ +{ op_160_0_comp_ff, 352, 0 }, /* BCHG */ +{ op_168_0_comp_ff, 360, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_170_0_comp_ff, 368, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_178_0_comp_ff, 376, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_179_0_comp_ff, 377, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_180_0_comp_ff, 384, 0 }, /* BCLR */ +{ NULL, 392, COMP_OPCODE_ISJUMP }, /* MVPRM */ +{ op_190_0_comp_ff, 400, 0 }, /* BCLR */ +{ op_198_0_comp_ff, 408, 0 }, /* BCLR */ +{ op_1a0_0_comp_ff, 416, 0 }, /* BCLR */ +{ op_1a8_0_comp_ff, 424, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_1b0_0_comp_ff, 432, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_1b8_0_comp_ff, 440, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_1b9_0_comp_ff, 441, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_1c0_0_comp_ff, 448, 0 }, /* BSET */ +{ NULL, 456, COMP_OPCODE_ISJUMP }, /* MVPRM */ +{ op_1d0_0_comp_ff, 464, 0 }, /* BSET */ +{ op_1d8_0_comp_ff, 472, 0 }, /* BSET */ +{ op_1e0_0_comp_ff, 480, 0 }, /* BSET */ +{ op_1e8_0_comp_ff, 488, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_1f0_0_comp_ff, 496, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_1f8_0_comp_ff, 504, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_1f9_0_comp_ff, 505, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_200_0_comp_ff, 512, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_210_0_comp_ff, 528, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_218_0_comp_ff, 536, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_220_0_comp_ff, 544, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_228_0_comp_ff, 552, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_230_0_comp_ff, 560, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_238_0_comp_ff, 568, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_239_0_comp_ff, 569, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ NULL, 572, COMP_OPCODE_ISJUMP }, /* ANDSR */ +{ op_240_0_comp_ff, 576, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_250_0_comp_ff, 592, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_258_0_comp_ff, 600, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_260_0_comp_ff, 608, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_268_0_comp_ff, 616, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_270_0_comp_ff, 624, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_278_0_comp_ff, 632, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_279_0_comp_ff, 633, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ NULL, 636, COMP_OPCODE_ISJUMP }, /* ANDSR */ +{ op_280_0_comp_ff, 640, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_290_0_comp_ff, 656, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_298_0_comp_ff, 664, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_2a0_0_comp_ff, 672, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_2a8_0_comp_ff, 680, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_2b0_0_comp_ff, 688, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_2b8_0_comp_ff, 696, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_2b9_0_comp_ff, 697, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ NULL, 720, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 744, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 752, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 760, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 761, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 762, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 763, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ op_400_0_comp_ff, 1024, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_410_0_comp_ff, 1040, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_418_0_comp_ff, 1048, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_420_0_comp_ff, 1056, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_428_0_comp_ff, 1064, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_430_0_comp_ff, 1072, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_438_0_comp_ff, 1080, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_439_0_comp_ff, 1081, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_440_0_comp_ff, 1088, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_450_0_comp_ff, 1104, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_458_0_comp_ff, 1112, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_460_0_comp_ff, 1120, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_468_0_comp_ff, 1128, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_470_0_comp_ff, 1136, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_478_0_comp_ff, 1144, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_479_0_comp_ff, 1145, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_480_0_comp_ff, 1152, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_490_0_comp_ff, 1168, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_498_0_comp_ff, 1176, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_4a0_0_comp_ff, 1184, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_4a8_0_comp_ff, 1192, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_4b0_0_comp_ff, 1200, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_4b8_0_comp_ff, 1208, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_4b9_0_comp_ff, 1209, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ NULL, 1232, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1256, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1264, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1272, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1273, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1274, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1275, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ op_600_0_comp_ff, 1536, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_610_0_comp_ff, 1552, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_618_0_comp_ff, 1560, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_620_0_comp_ff, 1568, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_628_0_comp_ff, 1576, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_630_0_comp_ff, 1584, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_638_0_comp_ff, 1592, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_639_0_comp_ff, 1593, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_640_0_comp_ff, 1600, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_650_0_comp_ff, 1616, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_658_0_comp_ff, 1624, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_660_0_comp_ff, 1632, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_668_0_comp_ff, 1640, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_670_0_comp_ff, 1648, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_678_0_comp_ff, 1656, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_679_0_comp_ff, 1657, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_680_0_comp_ff, 1664, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_690_0_comp_ff, 1680, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_698_0_comp_ff, 1688, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_6a0_0_comp_ff, 1696, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_6a8_0_comp_ff, 1704, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_6b0_0_comp_ff, 1712, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_6b8_0_comp_ff, 1720, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_6b9_0_comp_ff, 1721, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ NULL, 1728, COMP_OPCODE_ISJUMP }, /* RTM */ +{ NULL, 1736, COMP_OPCODE_ISJUMP }, /* RTM */ +{ NULL, 1744, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1768, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1776, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1784, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1785, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1786, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1787, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ op_800_0_comp_ff, 2048, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_810_0_comp_ff, 2064, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_818_0_comp_ff, 2072, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_820_0_comp_ff, 2080, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_828_0_comp_ff, 2088, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_830_0_comp_ff, 2096, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_838_0_comp_ff, 2104, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_839_0_comp_ff, 2105, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_83a_0_comp_ff, 2106, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_83b_0_comp_ff, 2107, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_840_0_comp_ff, 2112, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_850_0_comp_ff, 2128, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_858_0_comp_ff, 2136, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_860_0_comp_ff, 2144, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_868_0_comp_ff, 2152, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_870_0_comp_ff, 2160, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_878_0_comp_ff, 2168, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_879_0_comp_ff, 2169, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_880_0_comp_ff, 2176, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_890_0_comp_ff, 2192, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_898_0_comp_ff, 2200, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8a0_0_comp_ff, 2208, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8a8_0_comp_ff, 2216, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8b0_0_comp_ff, 2224, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8b8_0_comp_ff, 2232, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8b9_0_comp_ff, 2233, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8c0_0_comp_ff, 2240, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8d0_0_comp_ff, 2256, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8d8_0_comp_ff, 2264, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8e0_0_comp_ff, 2272, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8e8_0_comp_ff, 2280, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8f0_0_comp_ff, 2288, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8f8_0_comp_ff, 2296, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8f9_0_comp_ff, 2297, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_a00_0_comp_ff, 2560, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a10_0_comp_ff, 2576, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a18_0_comp_ff, 2584, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a20_0_comp_ff, 2592, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a28_0_comp_ff, 2600, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a30_0_comp_ff, 2608, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a38_0_comp_ff, 2616, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a39_0_comp_ff, 2617, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ NULL, 2620, COMP_OPCODE_ISJUMP }, /* EORSR */ +{ op_a40_0_comp_ff, 2624, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a50_0_comp_ff, 2640, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a58_0_comp_ff, 2648, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a60_0_comp_ff, 2656, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a68_0_comp_ff, 2664, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a70_0_comp_ff, 2672, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a78_0_comp_ff, 2680, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a79_0_comp_ff, 2681, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ NULL, 2684, COMP_OPCODE_ISJUMP }, /* EORSR */ +{ op_a80_0_comp_ff, 2688, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a90_0_comp_ff, 2704, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a98_0_comp_ff, 2712, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_aa0_0_comp_ff, 2720, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_aa8_0_comp_ff, 2728, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_ab0_0_comp_ff, 2736, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_ab8_0_comp_ff, 2744, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_ab9_0_comp_ff, 2745, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ NULL, 2768, 0 }, /* CAS */ +{ NULL, 2776, 0 }, /* CAS */ +{ NULL, 2784, 0 }, /* CAS */ +{ NULL, 2792, 0 }, /* CAS */ +{ NULL, 2800, 0 }, /* CAS */ +{ NULL, 2808, 0 }, /* CAS */ +{ NULL, 2809, 0 }, /* CAS */ +{ op_c00_0_comp_ff, 3072, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c10_0_comp_ff, 3088, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c18_0_comp_ff, 3096, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c20_0_comp_ff, 3104, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c28_0_comp_ff, 3112, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c30_0_comp_ff, 3120, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c38_0_comp_ff, 3128, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c39_0_comp_ff, 3129, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c3a_0_comp_ff, 3130, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c3b_0_comp_ff, 3131, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c40_0_comp_ff, 3136, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c50_0_comp_ff, 3152, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c58_0_comp_ff, 3160, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c60_0_comp_ff, 3168, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c68_0_comp_ff, 3176, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c70_0_comp_ff, 3184, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c78_0_comp_ff, 3192, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c79_0_comp_ff, 3193, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c7a_0_comp_ff, 3194, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c7b_0_comp_ff, 3195, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c80_0_comp_ff, 3200, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c90_0_comp_ff, 3216, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c98_0_comp_ff, 3224, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_ca0_0_comp_ff, 3232, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_ca8_0_comp_ff, 3240, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_cb0_0_comp_ff, 3248, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_cb8_0_comp_ff, 3256, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_cb9_0_comp_ff, 3257, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_cba_0_comp_ff, 3258, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_cbb_0_comp_ff, 3259, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ NULL, 3280, 0 }, /* CAS */ +{ NULL, 3288, 0 }, /* CAS */ +{ NULL, 3296, 0 }, /* CAS */ +{ NULL, 3304, 0 }, /* CAS */ +{ NULL, 3312, 0 }, /* CAS */ +{ NULL, 3320, 0 }, /* CAS */ +{ NULL, 3321, 0 }, /* CAS */ +{ NULL, 3324, 0 }, /* CAS2 */ +{ NULL, 3600, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3608, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3616, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3624, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3632, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3640, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3641, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3664, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3672, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3680, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3688, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3696, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3704, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3705, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3728, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3736, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3744, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3752, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3760, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3768, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3769, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3792, 0 }, /* CAS */ +{ NULL, 3800, 0 }, /* CAS */ +{ NULL, 3808, 0 }, /* CAS */ +{ NULL, 3816, 0 }, /* CAS */ +{ NULL, 3824, 0 }, /* CAS */ +{ NULL, 3832, 0 }, /* CAS */ +{ NULL, 3833, 0 }, /* CAS */ +{ NULL, 3836, 0 }, /* CAS2 */ +{ op_1000_0_comp_ff, 4096, 0 }, /* MOVE */ +{ op_1010_0_comp_ff, 4112, 0 }, /* MOVE */ +{ op_1018_0_comp_ff, 4120, 0 }, /* MOVE */ +{ op_1020_0_comp_ff, 4128, 0 }, /* MOVE */ +{ op_1028_0_comp_ff, 4136, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1030_0_comp_ff, 4144, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1038_0_comp_ff, 4152, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1039_0_comp_ff, 4153, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_103a_0_comp_ff, 4154, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_103b_0_comp_ff, 4155, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_103c_0_comp_ff, 4156, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1080_0_comp_ff, 4224, 0 }, /* MOVE */ +{ op_1090_0_comp_ff, 4240, 0 }, /* MOVE */ +{ op_1098_0_comp_ff, 4248, 0 }, /* MOVE */ +{ op_10a0_0_comp_ff, 4256, 0 }, /* MOVE */ +{ op_10a8_0_comp_ff, 4264, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10b0_0_comp_ff, 4272, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10b8_0_comp_ff, 4280, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10b9_0_comp_ff, 4281, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10ba_0_comp_ff, 4282, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10bb_0_comp_ff, 4283, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10bc_0_comp_ff, 4284, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10c0_0_comp_ff, 4288, 0 }, /* MOVE */ +{ op_10d0_0_comp_ff, 4304, 0 }, /* MOVE */ +{ op_10d8_0_comp_ff, 4312, 0 }, /* MOVE */ +{ op_10e0_0_comp_ff, 4320, 0 }, /* MOVE */ +{ op_10e8_0_comp_ff, 4328, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10f0_0_comp_ff, 4336, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10f8_0_comp_ff, 4344, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10f9_0_comp_ff, 4345, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10fa_0_comp_ff, 4346, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10fb_0_comp_ff, 4347, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10fc_0_comp_ff, 4348, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1100_0_comp_ff, 4352, 0 }, /* MOVE */ +{ op_1110_0_comp_ff, 4368, 0 }, /* MOVE */ +{ op_1118_0_comp_ff, 4376, 0 }, /* MOVE */ +{ op_1120_0_comp_ff, 4384, 0 }, /* MOVE */ +{ op_1128_0_comp_ff, 4392, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1130_0_comp_ff, 4400, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1138_0_comp_ff, 4408, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1139_0_comp_ff, 4409, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_113a_0_comp_ff, 4410, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_113b_0_comp_ff, 4411, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_113c_0_comp_ff, 4412, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1140_0_comp_ff, 4416, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1150_0_comp_ff, 4432, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1158_0_comp_ff, 4440, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1160_0_comp_ff, 4448, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1168_0_comp_ff, 4456, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1170_0_comp_ff, 4464, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1178_0_comp_ff, 4472, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1179_0_comp_ff, 4473, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_117a_0_comp_ff, 4474, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_117b_0_comp_ff, 4475, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_117c_0_comp_ff, 4476, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1180_0_comp_ff, 4480, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1190_0_comp_ff, 4496, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1198_0_comp_ff, 4504, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11a0_0_comp_ff, 4512, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11a8_0_comp_ff, 4520, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11b0_0_comp_ff, 4528, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11b8_0_comp_ff, 4536, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11b9_0_comp_ff, 4537, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11ba_0_comp_ff, 4538, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11bb_0_comp_ff, 4539, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11bc_0_comp_ff, 4540, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11c0_0_comp_ff, 4544, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11d0_0_comp_ff, 4560, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11d8_0_comp_ff, 4568, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11e0_0_comp_ff, 4576, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11e8_0_comp_ff, 4584, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11f0_0_comp_ff, 4592, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11f8_0_comp_ff, 4600, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11f9_0_comp_ff, 4601, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11fa_0_comp_ff, 4602, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11fb_0_comp_ff, 4603, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11fc_0_comp_ff, 4604, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13c0_0_comp_ff, 5056, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13d0_0_comp_ff, 5072, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13d8_0_comp_ff, 5080, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13e0_0_comp_ff, 5088, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13e8_0_comp_ff, 5096, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13f0_0_comp_ff, 5104, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13f8_0_comp_ff, 5112, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13f9_0_comp_ff, 5113, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13fa_0_comp_ff, 5114, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13fb_0_comp_ff, 5115, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13fc_0_comp_ff, 5116, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2000_0_comp_ff, 8192, 0 }, /* MOVE */ +{ op_2008_0_comp_ff, 8200, 0 }, /* MOVE */ +{ op_2010_0_comp_ff, 8208, 0 }, /* MOVE */ +{ op_2018_0_comp_ff, 8216, 0 }, /* MOVE */ +{ op_2020_0_comp_ff, 8224, 0 }, /* MOVE */ +{ op_2028_0_comp_ff, 8232, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2030_0_comp_ff, 8240, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2038_0_comp_ff, 8248, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2039_0_comp_ff, 8249, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_203a_0_comp_ff, 8250, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_203b_0_comp_ff, 8251, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_203c_0_comp_ff, 8252, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2040_0_comp_ff, 8256, 0 }, /* MOVEA */ +{ op_2048_0_comp_ff, 8264, 0 }, /* MOVEA */ +{ op_2050_0_comp_ff, 8272, 0 }, /* MOVEA */ +{ op_2058_0_comp_ff, 8280, 0 }, /* MOVEA */ +{ op_2060_0_comp_ff, 8288, 0 }, /* MOVEA */ +{ op_2068_0_comp_ff, 8296, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_2070_0_comp_ff, 8304, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_2078_0_comp_ff, 8312, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_2079_0_comp_ff, 8313, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_207a_0_comp_ff, 8314, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_207b_0_comp_ff, 8315, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_207c_0_comp_ff, 8316, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_2080_0_comp_ff, 8320, 0 }, /* MOVE */ +{ op_2088_0_comp_ff, 8328, 0 }, /* MOVE */ +{ op_2090_0_comp_ff, 8336, 0 }, /* MOVE */ +{ op_2098_0_comp_ff, 8344, 0 }, /* MOVE */ +{ op_20a0_0_comp_ff, 8352, 0 }, /* MOVE */ +{ op_20a8_0_comp_ff, 8360, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20b0_0_comp_ff, 8368, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20b8_0_comp_ff, 8376, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20b9_0_comp_ff, 8377, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20ba_0_comp_ff, 8378, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20bb_0_comp_ff, 8379, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20bc_0_comp_ff, 8380, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20c0_0_comp_ff, 8384, 0 }, /* MOVE */ +{ op_20c8_0_comp_ff, 8392, 0 }, /* MOVE */ +{ op_20d0_0_comp_ff, 8400, 0 }, /* MOVE */ +{ op_20d8_0_comp_ff, 8408, 0 }, /* MOVE */ +{ op_20e0_0_comp_ff, 8416, 0 }, /* MOVE */ +{ op_20e8_0_comp_ff, 8424, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20f0_0_comp_ff, 8432, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20f8_0_comp_ff, 8440, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20f9_0_comp_ff, 8441, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20fa_0_comp_ff, 8442, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20fb_0_comp_ff, 8443, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20fc_0_comp_ff, 8444, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2100_0_comp_ff, 8448, 0 }, /* MOVE */ +{ op_2108_0_comp_ff, 8456, 0 }, /* MOVE */ +{ op_2110_0_comp_ff, 8464, 0 }, /* MOVE */ +{ op_2118_0_comp_ff, 8472, 0 }, /* MOVE */ +{ op_2120_0_comp_ff, 8480, 0 }, /* MOVE */ +{ op_2128_0_comp_ff, 8488, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2130_0_comp_ff, 8496, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2138_0_comp_ff, 8504, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2139_0_comp_ff, 8505, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_213a_0_comp_ff, 8506, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_213b_0_comp_ff, 8507, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_213c_0_comp_ff, 8508, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2140_0_comp_ff, 8512, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2148_0_comp_ff, 8520, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2150_0_comp_ff, 8528, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2158_0_comp_ff, 8536, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2160_0_comp_ff, 8544, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2168_0_comp_ff, 8552, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2170_0_comp_ff, 8560, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2178_0_comp_ff, 8568, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2179_0_comp_ff, 8569, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_217a_0_comp_ff, 8570, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_217b_0_comp_ff, 8571, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_217c_0_comp_ff, 8572, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2180_0_comp_ff, 8576, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2188_0_comp_ff, 8584, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2190_0_comp_ff, 8592, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2198_0_comp_ff, 8600, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21a0_0_comp_ff, 8608, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21a8_0_comp_ff, 8616, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21b0_0_comp_ff, 8624, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21b8_0_comp_ff, 8632, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21b9_0_comp_ff, 8633, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21ba_0_comp_ff, 8634, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21bb_0_comp_ff, 8635, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21bc_0_comp_ff, 8636, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21c0_0_comp_ff, 8640, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21c8_0_comp_ff, 8648, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21d0_0_comp_ff, 8656, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21d8_0_comp_ff, 8664, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21e0_0_comp_ff, 8672, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21e8_0_comp_ff, 8680, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21f0_0_comp_ff, 8688, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21f8_0_comp_ff, 8696, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21f9_0_comp_ff, 8697, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21fa_0_comp_ff, 8698, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21fb_0_comp_ff, 8699, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21fc_0_comp_ff, 8700, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23c0_0_comp_ff, 9152, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23c8_0_comp_ff, 9160, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23d0_0_comp_ff, 9168, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23d8_0_comp_ff, 9176, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23e0_0_comp_ff, 9184, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23e8_0_comp_ff, 9192, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23f0_0_comp_ff, 9200, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23f8_0_comp_ff, 9208, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23f9_0_comp_ff, 9209, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23fa_0_comp_ff, 9210, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23fb_0_comp_ff, 9211, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23fc_0_comp_ff, 9212, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3000_0_comp_ff, 12288, 0 }, /* MOVE */ +{ op_3008_0_comp_ff, 12296, 0 }, /* MOVE */ +{ op_3010_0_comp_ff, 12304, 0 }, /* MOVE */ +{ op_3018_0_comp_ff, 12312, 0 }, /* MOVE */ +{ op_3020_0_comp_ff, 12320, 0 }, /* MOVE */ +{ op_3028_0_comp_ff, 12328, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3030_0_comp_ff, 12336, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3038_0_comp_ff, 12344, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3039_0_comp_ff, 12345, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_303a_0_comp_ff, 12346, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_303b_0_comp_ff, 12347, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_303c_0_comp_ff, 12348, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3040_0_comp_ff, 12352, 0 }, /* MOVEA */ +{ op_3048_0_comp_ff, 12360, 0 }, /* MOVEA */ +{ op_3050_0_comp_ff, 12368, 0 }, /* MOVEA */ +{ op_3058_0_comp_ff, 12376, 0 }, /* MOVEA */ +{ op_3060_0_comp_ff, 12384, 0 }, /* MOVEA */ +{ op_3068_0_comp_ff, 12392, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_3070_0_comp_ff, 12400, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_3078_0_comp_ff, 12408, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_3079_0_comp_ff, 12409, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_307a_0_comp_ff, 12410, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_307b_0_comp_ff, 12411, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_307c_0_comp_ff, 12412, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_3080_0_comp_ff, 12416, 0 }, /* MOVE */ +{ op_3088_0_comp_ff, 12424, 0 }, /* MOVE */ +{ op_3090_0_comp_ff, 12432, 0 }, /* MOVE */ +{ op_3098_0_comp_ff, 12440, 0 }, /* MOVE */ +{ op_30a0_0_comp_ff, 12448, 0 }, /* MOVE */ +{ op_30a8_0_comp_ff, 12456, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30b0_0_comp_ff, 12464, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30b8_0_comp_ff, 12472, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30b9_0_comp_ff, 12473, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30ba_0_comp_ff, 12474, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30bb_0_comp_ff, 12475, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30bc_0_comp_ff, 12476, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30c0_0_comp_ff, 12480, 0 }, /* MOVE */ +{ op_30c8_0_comp_ff, 12488, 0 }, /* MOVE */ +{ op_30d0_0_comp_ff, 12496, 0 }, /* MOVE */ +{ op_30d8_0_comp_ff, 12504, 0 }, /* MOVE */ +{ op_30e0_0_comp_ff, 12512, 0 }, /* MOVE */ +{ op_30e8_0_comp_ff, 12520, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30f0_0_comp_ff, 12528, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30f8_0_comp_ff, 12536, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30f9_0_comp_ff, 12537, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30fa_0_comp_ff, 12538, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30fb_0_comp_ff, 12539, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30fc_0_comp_ff, 12540, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3100_0_comp_ff, 12544, 0 }, /* MOVE */ +{ op_3108_0_comp_ff, 12552, 0 }, /* MOVE */ +{ op_3110_0_comp_ff, 12560, 0 }, /* MOVE */ +{ op_3118_0_comp_ff, 12568, 0 }, /* MOVE */ +{ op_3120_0_comp_ff, 12576, 0 }, /* MOVE */ +{ op_3128_0_comp_ff, 12584, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3130_0_comp_ff, 12592, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3138_0_comp_ff, 12600, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3139_0_comp_ff, 12601, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_313a_0_comp_ff, 12602, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_313b_0_comp_ff, 12603, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_313c_0_comp_ff, 12604, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3140_0_comp_ff, 12608, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3148_0_comp_ff, 12616, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3150_0_comp_ff, 12624, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3158_0_comp_ff, 12632, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3160_0_comp_ff, 12640, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3168_0_comp_ff, 12648, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3170_0_comp_ff, 12656, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3178_0_comp_ff, 12664, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3179_0_comp_ff, 12665, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_317a_0_comp_ff, 12666, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_317b_0_comp_ff, 12667, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_317c_0_comp_ff, 12668, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3180_0_comp_ff, 12672, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3188_0_comp_ff, 12680, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3190_0_comp_ff, 12688, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3198_0_comp_ff, 12696, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31a0_0_comp_ff, 12704, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31a8_0_comp_ff, 12712, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31b0_0_comp_ff, 12720, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31b8_0_comp_ff, 12728, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31b9_0_comp_ff, 12729, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31ba_0_comp_ff, 12730, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31bb_0_comp_ff, 12731, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31bc_0_comp_ff, 12732, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31c0_0_comp_ff, 12736, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31c8_0_comp_ff, 12744, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31d0_0_comp_ff, 12752, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31d8_0_comp_ff, 12760, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31e0_0_comp_ff, 12768, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31e8_0_comp_ff, 12776, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31f0_0_comp_ff, 12784, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31f8_0_comp_ff, 12792, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31f9_0_comp_ff, 12793, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31fa_0_comp_ff, 12794, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31fb_0_comp_ff, 12795, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31fc_0_comp_ff, 12796, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33c0_0_comp_ff, 13248, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33c8_0_comp_ff, 13256, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33d0_0_comp_ff, 13264, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33d8_0_comp_ff, 13272, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33e0_0_comp_ff, 13280, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33e8_0_comp_ff, 13288, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33f0_0_comp_ff, 13296, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33f8_0_comp_ff, 13304, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33f9_0_comp_ff, 13305, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33fa_0_comp_ff, 13306, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33fb_0_comp_ff, 13307, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33fc_0_comp_ff, 13308, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_4000_0_comp_ff, 16384, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4010_0_comp_ff, 16400, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4018_0_comp_ff, 16408, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4020_0_comp_ff, 16416, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4028_0_comp_ff, 16424, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4030_0_comp_ff, 16432, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4038_0_comp_ff, 16440, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4039_0_comp_ff, 16441, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4040_0_comp_ff, 16448, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4050_0_comp_ff, 16464, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4058_0_comp_ff, 16472, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4060_0_comp_ff, 16480, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4068_0_comp_ff, 16488, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4070_0_comp_ff, 16496, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4078_0_comp_ff, 16504, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4079_0_comp_ff, 16505, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4080_0_comp_ff, 16512, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4090_0_comp_ff, 16528, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4098_0_comp_ff, 16536, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_40a0_0_comp_ff, 16544, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_40a8_0_comp_ff, 16552, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_40b0_0_comp_ff, 16560, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_40b8_0_comp_ff, 16568, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_40b9_0_comp_ff, 16569, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* NEGX */ +{ NULL, 16576, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16592, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16600, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16608, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16616, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16624, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16632, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16633, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16640, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16656, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16664, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16672, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16680, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16688, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16696, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16697, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16698, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16699, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16700, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16768, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16784, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16792, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16800, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16808, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16816, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16824, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16825, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16826, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16827, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16828, COMP_OPCODE_ISJUMP }, /* CHK */ +{ op_41d0_0_comp_ff, 16848, 0 }, /* LEA */ +{ op_41e8_0_comp_ff, 16872, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_41f0_0_comp_ff, 16880, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_41f8_0_comp_ff, 16888, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_41f9_0_comp_ff, 16889, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_41fa_0_comp_ff, 16890, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_41fb_0_comp_ff, 16891, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_4200_0_comp_ff, 16896, 0 }, /* CLR */ +{ op_4210_0_comp_ff, 16912, 0 }, /* CLR */ +{ op_4218_0_comp_ff, 16920, 0 }, /* CLR */ +{ op_4220_0_comp_ff, 16928, 0 }, /* CLR */ +{ op_4228_0_comp_ff, 16936, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4230_0_comp_ff, 16944, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4238_0_comp_ff, 16952, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4239_0_comp_ff, 16953, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4240_0_comp_ff, 16960, 0 }, /* CLR */ +{ op_4250_0_comp_ff, 16976, 0 }, /* CLR */ +{ op_4258_0_comp_ff, 16984, 0 }, /* CLR */ +{ op_4260_0_comp_ff, 16992, 0 }, /* CLR */ +{ op_4268_0_comp_ff, 17000, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4270_0_comp_ff, 17008, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4278_0_comp_ff, 17016, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4279_0_comp_ff, 17017, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4280_0_comp_ff, 17024, 0 }, /* CLR */ +{ op_4290_0_comp_ff, 17040, 0 }, /* CLR */ +{ op_4298_0_comp_ff, 17048, 0 }, /* CLR */ +{ op_42a0_0_comp_ff, 17056, 0 }, /* CLR */ +{ op_42a8_0_comp_ff, 17064, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_42b0_0_comp_ff, 17072, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_42b8_0_comp_ff, 17080, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_42b9_0_comp_ff, 17081, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ NULL, 17088, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17104, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17112, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17120, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17128, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17136, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17144, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17145, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ op_4400_0_comp_ff, 17408, 0 }, /* NEG */ +{ op_4410_0_comp_ff, 17424, 0 }, /* NEG */ +{ op_4418_0_comp_ff, 17432, 0 }, /* NEG */ +{ op_4420_0_comp_ff, 17440, 0 }, /* NEG */ +{ op_4428_0_comp_ff, 17448, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4430_0_comp_ff, 17456, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4438_0_comp_ff, 17464, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4439_0_comp_ff, 17465, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4440_0_comp_ff, 17472, 0 }, /* NEG */ +{ op_4450_0_comp_ff, 17488, 0 }, /* NEG */ +{ op_4458_0_comp_ff, 17496, 0 }, /* NEG */ +{ op_4460_0_comp_ff, 17504, 0 }, /* NEG */ +{ op_4468_0_comp_ff, 17512, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4470_0_comp_ff, 17520, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4478_0_comp_ff, 17528, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4479_0_comp_ff, 17529, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4480_0_comp_ff, 17536, 0 }, /* NEG */ +{ op_4490_0_comp_ff, 17552, 0 }, /* NEG */ +{ op_4498_0_comp_ff, 17560, 0 }, /* NEG */ +{ op_44a0_0_comp_ff, 17568, 0 }, /* NEG */ +{ op_44a8_0_comp_ff, 17576, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_44b0_0_comp_ff, 17584, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_44b8_0_comp_ff, 17592, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_44b9_0_comp_ff, 17593, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ NULL, 17600, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17616, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17624, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17632, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17640, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17648, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17656, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17657, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17658, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17659, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17660, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ op_4600_0_comp_ff, 17920, 0 }, /* NOT */ +{ op_4610_0_comp_ff, 17936, 0 }, /* NOT */ +{ op_4618_0_comp_ff, 17944, 0 }, /* NOT */ +{ op_4620_0_comp_ff, 17952, 0 }, /* NOT */ +{ op_4628_0_comp_ff, 17960, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4630_0_comp_ff, 17968, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4638_0_comp_ff, 17976, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4639_0_comp_ff, 17977, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4640_0_comp_ff, 17984, 0 }, /* NOT */ +{ op_4650_0_comp_ff, 18000, 0 }, /* NOT */ +{ op_4658_0_comp_ff, 18008, 0 }, /* NOT */ +{ op_4660_0_comp_ff, 18016, 0 }, /* NOT */ +{ op_4668_0_comp_ff, 18024, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4670_0_comp_ff, 18032, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4678_0_comp_ff, 18040, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4679_0_comp_ff, 18041, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4680_0_comp_ff, 18048, 0 }, /* NOT */ +{ op_4690_0_comp_ff, 18064, 0 }, /* NOT */ +{ op_4698_0_comp_ff, 18072, 0 }, /* NOT */ +{ op_46a0_0_comp_ff, 18080, 0 }, /* NOT */ +{ op_46a8_0_comp_ff, 18088, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_46b0_0_comp_ff, 18096, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_46b8_0_comp_ff, 18104, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_46b9_0_comp_ff, 18105, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ NULL, 18112, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18128, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18136, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18144, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18152, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18160, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18168, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18169, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18170, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18171, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18172, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18432, 0 }, /* NBCD */ +{ op_4808_0_comp_ff, 18440, COMP_OPCODE_LONG_OPCODE }, /* LINK */ +{ NULL, 18448, 0 }, /* NBCD */ +{ NULL, 18456, 0 }, /* NBCD */ +{ NULL, 18464, 0 }, /* NBCD */ +{ NULL, 18472, 0 }, /* NBCD */ +{ NULL, 18480, 0 }, /* NBCD */ +{ NULL, 18488, 0 }, /* NBCD */ +{ NULL, 18489, 0 }, /* NBCD */ +{ op_4840_0_comp_ff, 18496, 0 }, /* SWAP */ +{ NULL, 18504, COMP_OPCODE_ISJUMP }, /* BKPT */ +{ op_4850_0_comp_ff, 18512, 0 }, /* PEA */ +{ op_4868_0_comp_ff, 18536, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_4870_0_comp_ff, 18544, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_4878_0_comp_ff, 18552, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_4879_0_comp_ff, 18553, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_487a_0_comp_ff, 18554, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_487b_0_comp_ff, 18555, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_4880_0_comp_ff, 18560, 0 }, /* EXT */ +{ op_4890_0_comp_ff, 18576, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48a0_0_comp_ff, 18592, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48a8_0_comp_ff, 18600, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48b0_0_comp_ff, 18608, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48b8_0_comp_ff, 18616, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48b9_0_comp_ff, 18617, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48c0_0_comp_ff, 18624, 0 }, /* EXT */ +{ op_48d0_0_comp_ff, 18640, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48e0_0_comp_ff, 18656, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48e8_0_comp_ff, 18664, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48f0_0_comp_ff, 18672, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48f8_0_comp_ff, 18680, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48f9_0_comp_ff, 18681, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_49c0_0_comp_ff, 18880, 0 }, /* EXT */ +{ op_4a00_0_comp_ff, 18944, 0 }, /* TST */ +{ op_4a10_0_comp_ff, 18960, 0 }, /* TST */ +{ op_4a18_0_comp_ff, 18968, 0 }, /* TST */ +{ op_4a20_0_comp_ff, 18976, 0 }, /* TST */ +{ op_4a28_0_comp_ff, 18984, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a30_0_comp_ff, 18992, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a38_0_comp_ff, 19000, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a39_0_comp_ff, 19001, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a3a_0_comp_ff, 19002, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a3b_0_comp_ff, 19003, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a3c_0_comp_ff, 19004, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a40_0_comp_ff, 19008, 0 }, /* TST */ +{ op_4a48_0_comp_ff, 19016, 0 }, /* TST */ +{ op_4a50_0_comp_ff, 19024, 0 }, /* TST */ +{ op_4a58_0_comp_ff, 19032, 0 }, /* TST */ +{ op_4a60_0_comp_ff, 19040, 0 }, /* TST */ +{ op_4a68_0_comp_ff, 19048, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a70_0_comp_ff, 19056, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a78_0_comp_ff, 19064, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a79_0_comp_ff, 19065, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a7a_0_comp_ff, 19066, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a7b_0_comp_ff, 19067, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a7c_0_comp_ff, 19068, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a80_0_comp_ff, 19072, 0 }, /* TST */ +{ op_4a88_0_comp_ff, 19080, 0 }, /* TST */ +{ op_4a90_0_comp_ff, 19088, 0 }, /* TST */ +{ op_4a98_0_comp_ff, 19096, 0 }, /* TST */ +{ op_4aa0_0_comp_ff, 19104, 0 }, /* TST */ +{ op_4aa8_0_comp_ff, 19112, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4ab0_0_comp_ff, 19120, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4ab8_0_comp_ff, 19128, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4ab9_0_comp_ff, 19129, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4aba_0_comp_ff, 19130, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4abb_0_comp_ff, 19131, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4abc_0_comp_ff, 19132, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ NULL, 19136, 0 }, /* TAS */ +{ NULL, 19144, COMP_OPCODE_ISJUMP }, /* HALT */ +{ NULL, 19148, COMP_OPCODE_ISJUMP }, /* PULSE */ +{ NULL, 19152, 0 }, /* TAS */ +{ NULL, 19160, 0 }, /* TAS */ +{ NULL, 19168, 0 }, /* TAS */ +{ NULL, 19176, 0 }, /* TAS */ +{ NULL, 19184, 0 }, /* TAS */ +{ NULL, 19192, 0 }, /* TAS */ +{ NULL, 19193, 0 }, /* TAS */ +{ NULL, 19456, 0 }, /* MULL */ +{ NULL, 19472, 0 }, /* MULL */ +{ NULL, 19480, 0 }, /* MULL */ +{ NULL, 19488, 0 }, /* MULL */ +{ NULL, 19496, 0 }, /* MULL */ +{ NULL, 19504, 0 }, /* MULL */ +{ NULL, 19512, 0 }, /* MULL */ +{ NULL, 19513, 0 }, /* MULL */ +{ NULL, 19514, 0 }, /* MULL */ +{ NULL, 19515, 0 }, /* MULL */ +{ NULL, 19516, 0 }, /* MULL */ +{ NULL, 19520, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19536, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19544, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19552, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19560, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19568, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19576, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19577, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19578, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19579, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19580, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ op_4c90_0_comp_ff, 19600, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4c98_0_comp_ff, 19608, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4ca8_0_comp_ff, 19624, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cb0_0_comp_ff, 19632, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cb8_0_comp_ff, 19640, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cb9_0_comp_ff, 19641, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cba_0_comp_ff, 19642, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cbb_0_comp_ff, 19643, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cd0_0_comp_ff, 19664, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cd8_0_comp_ff, 19672, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4ce8_0_comp_ff, 19688, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cf0_0_comp_ff, 19696, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cf8_0_comp_ff, 19704, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cf9_0_comp_ff, 19705, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cfa_0_comp_ff, 19706, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cfb_0_comp_ff, 19707, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ NULL, 20032, COMP_OPCODE_ISJUMP }, /* TRAP */ +{ op_4e50_0_comp_ff, 20048, COMP_OPCODE_LONG_OPCODE }, /* LINK */ +{ op_4e58_0_comp_ff, 20056, 0 }, /* UNLK */ +{ NULL, 20064, COMP_OPCODE_ISJUMP }, /* MVR2USP */ +{ NULL, 20072, COMP_OPCODE_ISJUMP }, /* MVUSP2R */ +{ NULL, 20080, COMP_OPCODE_ISJUMP }, /* RESET */ +{ op_4e71_0_comp_ff, 20081, 0 }, /* NOP */ +{ NULL, 20082, COMP_OPCODE_ISJUMP }, /* STOP */ +{ NULL, 20083, COMP_OPCODE_ISJUMP }, /* RTE */ +{ op_4e74_0_comp_ff, 20084, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* RTD */ +{ op_4e75_0_comp_ff, 20085, COMP_OPCODE_ISJUMP }, /* RTS */ +{ NULL, 20086, COMP_OPCODE_ISJUMP }, /* TRAPV */ +{ NULL, 20087, COMP_OPCODE_ISJUMP }, /* RTR */ +{ NULL, 20090, COMP_OPCODE_ISJUMP }, /* MOVEC2 */ +{ NULL, 20091, COMP_OPCODE_ISJUMP }, /* MOVE2C */ +{ op_4e90_0_comp_ff, 20112, COMP_OPCODE_ISJUMP }, /* JSR */ +{ op_4ea8_0_comp_ff, 20136, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4eb0_0_comp_ff, 20144, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4eb8_0_comp_ff, 20152, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4eb9_0_comp_ff, 20153, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4eba_0_comp_ff, 20154, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4ebb_0_comp_ff, 20155, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4ed0_0_comp_ff, 20176, COMP_OPCODE_ISJUMP }, /* JMP */ +{ op_4ee8_0_comp_ff, 20200, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_4ef0_0_comp_ff, 20208, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_4ef8_0_comp_ff, 20216, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_4ef9_0_comp_ff, 20217, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_4efa_0_comp_ff, 20218, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_4efb_0_comp_ff, 20219, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_5000_0_comp_ff, 20480, 0 }, /* ADD */ +{ op_5010_0_comp_ff, 20496, 0 }, /* ADD */ +{ op_5018_0_comp_ff, 20504, 0 }, /* ADD */ +{ op_5020_0_comp_ff, 20512, 0 }, /* ADD */ +{ op_5028_0_comp_ff, 20520, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5030_0_comp_ff, 20528, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5038_0_comp_ff, 20536, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5039_0_comp_ff, 20537, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5040_0_comp_ff, 20544, 0 }, /* ADD */ +{ op_5048_0_comp_ff, 20552, 0 }, /* ADDA */ +{ op_5050_0_comp_ff, 20560, 0 }, /* ADD */ +{ op_5058_0_comp_ff, 20568, 0 }, /* ADD */ +{ op_5060_0_comp_ff, 20576, 0 }, /* ADD */ +{ op_5068_0_comp_ff, 20584, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5070_0_comp_ff, 20592, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5078_0_comp_ff, 20600, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5079_0_comp_ff, 20601, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5080_0_comp_ff, 20608, 0 }, /* ADD */ +{ op_5088_0_comp_ff, 20616, 0 }, /* ADDA */ +{ op_5090_0_comp_ff, 20624, 0 }, /* ADD */ +{ op_5098_0_comp_ff, 20632, 0 }, /* ADD */ +{ op_50a0_0_comp_ff, 20640, 0 }, /* ADD */ +{ op_50a8_0_comp_ff, 20648, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_50b0_0_comp_ff, 20656, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_50b8_0_comp_ff, 20664, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_50b9_0_comp_ff, 20665, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_50c0_0_comp_ff, 20672, 0 }, /* Scc */ +{ op_50c8_0_comp_ff, 20680, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_50d0_0_comp_ff, 20688, 0 }, /* Scc */ +{ op_50d8_0_comp_ff, 20696, 0 }, /* Scc */ +{ op_50e0_0_comp_ff, 20704, 0 }, /* Scc */ +{ op_50e8_0_comp_ff, 20712, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_50f0_0_comp_ff, 20720, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_50f8_0_comp_ff, 20728, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_50f9_0_comp_ff, 20729, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 20730, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 20731, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 20732, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5100_0_comp_ff, 20736, 0 }, /* SUB */ +{ op_5110_0_comp_ff, 20752, 0 }, /* SUB */ +{ op_5118_0_comp_ff, 20760, 0 }, /* SUB */ +{ op_5120_0_comp_ff, 20768, 0 }, /* SUB */ +{ op_5128_0_comp_ff, 20776, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5130_0_comp_ff, 20784, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5138_0_comp_ff, 20792, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5139_0_comp_ff, 20793, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5140_0_comp_ff, 20800, 0 }, /* SUB */ +{ op_5148_0_comp_ff, 20808, 0 }, /* SUBA */ +{ op_5150_0_comp_ff, 20816, 0 }, /* SUB */ +{ op_5158_0_comp_ff, 20824, 0 }, /* SUB */ +{ op_5160_0_comp_ff, 20832, 0 }, /* SUB */ +{ op_5168_0_comp_ff, 20840, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5170_0_comp_ff, 20848, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5178_0_comp_ff, 20856, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5179_0_comp_ff, 20857, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5180_0_comp_ff, 20864, 0 }, /* SUB */ +{ op_5188_0_comp_ff, 20872, 0 }, /* SUBA */ +{ op_5190_0_comp_ff, 20880, 0 }, /* SUB */ +{ op_5198_0_comp_ff, 20888, 0 }, /* SUB */ +{ op_51a0_0_comp_ff, 20896, 0 }, /* SUB */ +{ op_51a8_0_comp_ff, 20904, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_51b0_0_comp_ff, 20912, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_51b8_0_comp_ff, 20920, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_51b9_0_comp_ff, 20921, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_51c0_0_comp_ff, 20928, 0 }, /* Scc */ +{ op_51c8_0_comp_ff, 20936, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_51d0_0_comp_ff, 20944, 0 }, /* Scc */ +{ op_51d8_0_comp_ff, 20952, 0 }, /* Scc */ +{ op_51e0_0_comp_ff, 20960, 0 }, /* Scc */ +{ op_51e8_0_comp_ff, 20968, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_51f0_0_comp_ff, 20976, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_51f8_0_comp_ff, 20984, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_51f9_0_comp_ff, 20985, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 20986, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 20987, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 20988, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_52c0_0_comp_ff, 21184, 0 }, /* Scc */ +{ op_52c8_0_comp_ff, 21192, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_52d0_0_comp_ff, 21200, 0 }, /* Scc */ +{ op_52d8_0_comp_ff, 21208, 0 }, /* Scc */ +{ op_52e0_0_comp_ff, 21216, 0 }, /* Scc */ +{ op_52e8_0_comp_ff, 21224, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_52f0_0_comp_ff, 21232, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_52f8_0_comp_ff, 21240, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_52f9_0_comp_ff, 21241, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 21242, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21243, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21244, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_53c0_0_comp_ff, 21440, 0 }, /* Scc */ +{ op_53c8_0_comp_ff, 21448, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_53d0_0_comp_ff, 21456, 0 }, /* Scc */ +{ op_53d8_0_comp_ff, 21464, 0 }, /* Scc */ +{ op_53e0_0_comp_ff, 21472, 0 }, /* Scc */ +{ op_53e8_0_comp_ff, 21480, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_53f0_0_comp_ff, 21488, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_53f8_0_comp_ff, 21496, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_53f9_0_comp_ff, 21497, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 21498, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21499, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21500, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_54c0_0_comp_ff, 21696, 0 }, /* Scc */ +{ op_54c8_0_comp_ff, 21704, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_54d0_0_comp_ff, 21712, 0 }, /* Scc */ +{ op_54d8_0_comp_ff, 21720, 0 }, /* Scc */ +{ op_54e0_0_comp_ff, 21728, 0 }, /* Scc */ +{ op_54e8_0_comp_ff, 21736, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_54f0_0_comp_ff, 21744, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_54f8_0_comp_ff, 21752, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_54f9_0_comp_ff, 21753, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 21754, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21755, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21756, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_55c0_0_comp_ff, 21952, 0 }, /* Scc */ +{ op_55c8_0_comp_ff, 21960, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_55d0_0_comp_ff, 21968, 0 }, /* Scc */ +{ op_55d8_0_comp_ff, 21976, 0 }, /* Scc */ +{ op_55e0_0_comp_ff, 21984, 0 }, /* Scc */ +{ op_55e8_0_comp_ff, 21992, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_55f0_0_comp_ff, 22000, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_55f8_0_comp_ff, 22008, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_55f9_0_comp_ff, 22009, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22010, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22011, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22012, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_56c0_0_comp_ff, 22208, 0 }, /* Scc */ +{ op_56c8_0_comp_ff, 22216, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_56d0_0_comp_ff, 22224, 0 }, /* Scc */ +{ op_56d8_0_comp_ff, 22232, 0 }, /* Scc */ +{ op_56e0_0_comp_ff, 22240, 0 }, /* Scc */ +{ op_56e8_0_comp_ff, 22248, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_56f0_0_comp_ff, 22256, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_56f8_0_comp_ff, 22264, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_56f9_0_comp_ff, 22265, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22266, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22267, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22268, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_57c0_0_comp_ff, 22464, 0 }, /* Scc */ +{ op_57c8_0_comp_ff, 22472, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_57d0_0_comp_ff, 22480, 0 }, /* Scc */ +{ op_57d8_0_comp_ff, 22488, 0 }, /* Scc */ +{ op_57e0_0_comp_ff, 22496, 0 }, /* Scc */ +{ op_57e8_0_comp_ff, 22504, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_57f0_0_comp_ff, 22512, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_57f8_0_comp_ff, 22520, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_57f9_0_comp_ff, 22521, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22522, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22523, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22524, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22720, 0 }, /* Scc */ +{ NULL, 22728, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ NULL, 22736, 0 }, /* Scc */ +{ NULL, 22744, 0 }, /* Scc */ +{ NULL, 22752, 0 }, /* Scc */ +{ NULL, 22760, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22768, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22776, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22777, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22778, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22779, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22780, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22976, 0 }, /* Scc */ +{ NULL, 22984, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ NULL, 22992, 0 }, /* Scc */ +{ NULL, 23000, 0 }, /* Scc */ +{ NULL, 23008, 0 }, /* Scc */ +{ NULL, 23016, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23024, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23032, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23033, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23034, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23035, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23036, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5ac0_0_comp_ff, 23232, 0 }, /* Scc */ +{ op_5ac8_0_comp_ff, 23240, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5ad0_0_comp_ff, 23248, 0 }, /* Scc */ +{ op_5ad8_0_comp_ff, 23256, 0 }, /* Scc */ +{ op_5ae0_0_comp_ff, 23264, 0 }, /* Scc */ +{ op_5ae8_0_comp_ff, 23272, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5af0_0_comp_ff, 23280, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5af8_0_comp_ff, 23288, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5af9_0_comp_ff, 23289, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23290, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23291, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23292, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5bc0_0_comp_ff, 23488, 0 }, /* Scc */ +{ op_5bc8_0_comp_ff, 23496, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5bd0_0_comp_ff, 23504, 0 }, /* Scc */ +{ op_5bd8_0_comp_ff, 23512, 0 }, /* Scc */ +{ op_5be0_0_comp_ff, 23520, 0 }, /* Scc */ +{ op_5be8_0_comp_ff, 23528, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5bf0_0_comp_ff, 23536, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5bf8_0_comp_ff, 23544, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5bf9_0_comp_ff, 23545, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23546, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23547, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23548, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5cc0_0_comp_ff, 23744, 0 }, /* Scc */ +{ op_5cc8_0_comp_ff, 23752, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5cd0_0_comp_ff, 23760, 0 }, /* Scc */ +{ op_5cd8_0_comp_ff, 23768, 0 }, /* Scc */ +{ op_5ce0_0_comp_ff, 23776, 0 }, /* Scc */ +{ op_5ce8_0_comp_ff, 23784, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5cf0_0_comp_ff, 23792, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5cf8_0_comp_ff, 23800, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5cf9_0_comp_ff, 23801, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23802, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23803, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23804, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5dc0_0_comp_ff, 24000, 0 }, /* Scc */ +{ op_5dc8_0_comp_ff, 24008, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5dd0_0_comp_ff, 24016, 0 }, /* Scc */ +{ op_5dd8_0_comp_ff, 24024, 0 }, /* Scc */ +{ op_5de0_0_comp_ff, 24032, 0 }, /* Scc */ +{ op_5de8_0_comp_ff, 24040, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5df0_0_comp_ff, 24048, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5df8_0_comp_ff, 24056, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5df9_0_comp_ff, 24057, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 24058, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24059, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24060, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5ec0_0_comp_ff, 24256, 0 }, /* Scc */ +{ op_5ec8_0_comp_ff, 24264, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5ed0_0_comp_ff, 24272, 0 }, /* Scc */ +{ op_5ed8_0_comp_ff, 24280, 0 }, /* Scc */ +{ op_5ee0_0_comp_ff, 24288, 0 }, /* Scc */ +{ op_5ee8_0_comp_ff, 24296, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ef0_0_comp_ff, 24304, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ef8_0_comp_ff, 24312, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ef9_0_comp_ff, 24313, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 24314, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24315, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24316, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5fc0_0_comp_ff, 24512, 0 }, /* Scc */ +{ op_5fc8_0_comp_ff, 24520, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5fd0_0_comp_ff, 24528, 0 }, /* Scc */ +{ op_5fd8_0_comp_ff, 24536, 0 }, /* Scc */ +{ op_5fe0_0_comp_ff, 24544, 0 }, /* Scc */ +{ op_5fe8_0_comp_ff, 24552, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ff0_0_comp_ff, 24560, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ff8_0_comp_ff, 24568, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ff9_0_comp_ff, 24569, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 24570, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24571, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24572, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_6000_0_comp_ff, 24576, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISCJUMP }, /* Bcc */ +{ op_6001_0_comp_ff, 24577, COMP_OPCODE_ISCJUMP }, /* Bcc */ +{ op_60ff_0_comp_ff, 24831, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISCJUMP }, /* Bcc */ +{ op_6100_0_comp_ff, 24832, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISCJUMP }, /* BSR */ +{ op_6101_0_comp_ff, 24833, COMP_OPCODE_ISCJUMP }, /* BSR */ +{ op_61ff_0_comp_ff, 25087, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISCJUMP }, /* BSR */ +{ op_6200_0_comp_ff, 25088, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6201_0_comp_ff, 25089, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_62ff_0_comp_ff, 25343, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6300_0_comp_ff, 25344, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6301_0_comp_ff, 25345, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_63ff_0_comp_ff, 25599, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6400_0_comp_ff, 25600, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6401_0_comp_ff, 25601, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_64ff_0_comp_ff, 25855, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6500_0_comp_ff, 25856, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6501_0_comp_ff, 25857, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_65ff_0_comp_ff, 26111, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6600_0_comp_ff, 26112, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6601_0_comp_ff, 26113, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_66ff_0_comp_ff, 26367, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6700_0_comp_ff, 26368, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6701_0_comp_ff, 26369, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_67ff_0_comp_ff, 26623, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ NULL, 26624, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ NULL, 26625, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ NULL, 26879, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ NULL, 26880, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ NULL, 26881, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ NULL, 27135, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6a00_0_comp_ff, 27136, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6a01_0_comp_ff, 27137, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6aff_0_comp_ff, 27391, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6b00_0_comp_ff, 27392, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6b01_0_comp_ff, 27393, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6bff_0_comp_ff, 27647, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6c00_0_comp_ff, 27648, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6c01_0_comp_ff, 27649, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6cff_0_comp_ff, 27903, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6d00_0_comp_ff, 27904, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6d01_0_comp_ff, 27905, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6dff_0_comp_ff, 28159, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6e00_0_comp_ff, 28160, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6e01_0_comp_ff, 28161, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6eff_0_comp_ff, 28415, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6f00_0_comp_ff, 28416, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6f01_0_comp_ff, 28417, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6fff_0_comp_ff, 28671, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_7000_0_comp_ff, 28672, 0 }, /* MOVE */ +{ op_8000_0_comp_ff, 32768, 0 }, /* OR */ +{ op_8010_0_comp_ff, 32784, 0 }, /* OR */ +{ op_8018_0_comp_ff, 32792, 0 }, /* OR */ +{ op_8020_0_comp_ff, 32800, 0 }, /* OR */ +{ op_8028_0_comp_ff, 32808, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8030_0_comp_ff, 32816, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8038_0_comp_ff, 32824, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8039_0_comp_ff, 32825, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_803a_0_comp_ff, 32826, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_803b_0_comp_ff, 32827, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_803c_0_comp_ff, 32828, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8040_0_comp_ff, 32832, 0 }, /* OR */ +{ op_8050_0_comp_ff, 32848, 0 }, /* OR */ +{ op_8058_0_comp_ff, 32856, 0 }, /* OR */ +{ op_8060_0_comp_ff, 32864, 0 }, /* OR */ +{ op_8068_0_comp_ff, 32872, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8070_0_comp_ff, 32880, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8078_0_comp_ff, 32888, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8079_0_comp_ff, 32889, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_807a_0_comp_ff, 32890, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_807b_0_comp_ff, 32891, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_807c_0_comp_ff, 32892, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8080_0_comp_ff, 32896, 0 }, /* OR */ +{ op_8090_0_comp_ff, 32912, 0 }, /* OR */ +{ op_8098_0_comp_ff, 32920, 0 }, /* OR */ +{ op_80a0_0_comp_ff, 32928, 0 }, /* OR */ +{ op_80a8_0_comp_ff, 32936, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80b0_0_comp_ff, 32944, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80b8_0_comp_ff, 32952, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80b9_0_comp_ff, 32953, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80ba_0_comp_ff, 32954, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80bb_0_comp_ff, 32955, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80bc_0_comp_ff, 32956, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 32960, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 32976, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 32984, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 32992, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33000, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33008, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33016, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33017, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33018, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33019, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33020, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33024, 0 }, /* SBCD */ +{ NULL, 33032, 0 }, /* SBCD */ +{ op_8110_0_comp_ff, 33040, 0 }, /* OR */ +{ op_8118_0_comp_ff, 33048, 0 }, /* OR */ +{ op_8120_0_comp_ff, 33056, 0 }, /* OR */ +{ op_8128_0_comp_ff, 33064, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8130_0_comp_ff, 33072, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8138_0_comp_ff, 33080, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8139_0_comp_ff, 33081, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 33088, 0 }, /* PACK */ +{ NULL, 33096, 0 }, /* PACK */ +{ op_8150_0_comp_ff, 33104, 0 }, /* OR */ +{ op_8158_0_comp_ff, 33112, 0 }, /* OR */ +{ op_8160_0_comp_ff, 33120, 0 }, /* OR */ +{ op_8168_0_comp_ff, 33128, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8170_0_comp_ff, 33136, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8178_0_comp_ff, 33144, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8179_0_comp_ff, 33145, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 33152, 0 }, /* UNPK */ +{ NULL, 33160, 0 }, /* UNPK */ +{ op_8190_0_comp_ff, 33168, 0 }, /* OR */ +{ op_8198_0_comp_ff, 33176, 0 }, /* OR */ +{ op_81a0_0_comp_ff, 33184, 0 }, /* OR */ +{ op_81a8_0_comp_ff, 33192, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_81b0_0_comp_ff, 33200, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_81b8_0_comp_ff, 33208, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_81b9_0_comp_ff, 33209, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 33216, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33232, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33240, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33248, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33256, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33264, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33272, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33273, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33274, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33275, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33276, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ op_9000_0_comp_ff, 36864, 0 }, /* SUB */ +{ op_9010_0_comp_ff, 36880, 0 }, /* SUB */ +{ op_9018_0_comp_ff, 36888, 0 }, /* SUB */ +{ op_9020_0_comp_ff, 36896, 0 }, /* SUB */ +{ op_9028_0_comp_ff, 36904, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9030_0_comp_ff, 36912, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9038_0_comp_ff, 36920, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9039_0_comp_ff, 36921, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_903a_0_comp_ff, 36922, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_903b_0_comp_ff, 36923, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_903c_0_comp_ff, 36924, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9040_0_comp_ff, 36928, 0 }, /* SUB */ +{ op_9048_0_comp_ff, 36936, 0 }, /* SUB */ +{ op_9050_0_comp_ff, 36944, 0 }, /* SUB */ +{ op_9058_0_comp_ff, 36952, 0 }, /* SUB */ +{ op_9060_0_comp_ff, 36960, 0 }, /* SUB */ +{ op_9068_0_comp_ff, 36968, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9070_0_comp_ff, 36976, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9078_0_comp_ff, 36984, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9079_0_comp_ff, 36985, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_907a_0_comp_ff, 36986, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_907b_0_comp_ff, 36987, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_907c_0_comp_ff, 36988, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9080_0_comp_ff, 36992, 0 }, /* SUB */ +{ op_9088_0_comp_ff, 37000, 0 }, /* SUB */ +{ op_9090_0_comp_ff, 37008, 0 }, /* SUB */ +{ op_9098_0_comp_ff, 37016, 0 }, /* SUB */ +{ op_90a0_0_comp_ff, 37024, 0 }, /* SUB */ +{ op_90a8_0_comp_ff, 37032, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90b0_0_comp_ff, 37040, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90b8_0_comp_ff, 37048, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90b9_0_comp_ff, 37049, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90ba_0_comp_ff, 37050, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90bb_0_comp_ff, 37051, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90bc_0_comp_ff, 37052, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90c0_0_comp_ff, 37056, 0 }, /* SUBA */ +{ op_90c8_0_comp_ff, 37064, 0 }, /* SUBA */ +{ op_90d0_0_comp_ff, 37072, 0 }, /* SUBA */ +{ op_90d8_0_comp_ff, 37080, 0 }, /* SUBA */ +{ op_90e0_0_comp_ff, 37088, 0 }, /* SUBA */ +{ op_90e8_0_comp_ff, 37096, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90f0_0_comp_ff, 37104, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90f8_0_comp_ff, 37112, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90f9_0_comp_ff, 37113, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90fa_0_comp_ff, 37114, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90fb_0_comp_ff, 37115, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90fc_0_comp_ff, 37116, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_9100_0_comp_ff, 37120, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9108_0_comp_ff, 37128, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9110_0_comp_ff, 37136, 0 }, /* SUB */ +{ op_9118_0_comp_ff, 37144, 0 }, /* SUB */ +{ op_9120_0_comp_ff, 37152, 0 }, /* SUB */ +{ op_9128_0_comp_ff, 37160, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9130_0_comp_ff, 37168, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9138_0_comp_ff, 37176, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9139_0_comp_ff, 37177, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9140_0_comp_ff, 37184, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9148_0_comp_ff, 37192, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9150_0_comp_ff, 37200, 0 }, /* SUB */ +{ op_9158_0_comp_ff, 37208, 0 }, /* SUB */ +{ op_9160_0_comp_ff, 37216, 0 }, /* SUB */ +{ op_9168_0_comp_ff, 37224, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9170_0_comp_ff, 37232, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9178_0_comp_ff, 37240, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9179_0_comp_ff, 37241, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9180_0_comp_ff, 37248, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9188_0_comp_ff, 37256, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9190_0_comp_ff, 37264, 0 }, /* SUB */ +{ op_9198_0_comp_ff, 37272, 0 }, /* SUB */ +{ op_91a0_0_comp_ff, 37280, 0 }, /* SUB */ +{ op_91a8_0_comp_ff, 37288, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_91b0_0_comp_ff, 37296, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_91b8_0_comp_ff, 37304, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_91b9_0_comp_ff, 37305, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_91c0_0_comp_ff, 37312, 0 }, /* SUBA */ +{ op_91c8_0_comp_ff, 37320, 0 }, /* SUBA */ +{ op_91d0_0_comp_ff, 37328, 0 }, /* SUBA */ +{ op_91d8_0_comp_ff, 37336, 0 }, /* SUBA */ +{ op_91e0_0_comp_ff, 37344, 0 }, /* SUBA */ +{ op_91e8_0_comp_ff, 37352, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91f0_0_comp_ff, 37360, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91f8_0_comp_ff, 37368, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91f9_0_comp_ff, 37369, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91fa_0_comp_ff, 37370, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91fb_0_comp_ff, 37371, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91fc_0_comp_ff, 37372, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_b000_0_comp_ff, 45056, 0 }, /* CMP */ +{ op_b010_0_comp_ff, 45072, 0 }, /* CMP */ +{ op_b018_0_comp_ff, 45080, 0 }, /* CMP */ +{ op_b020_0_comp_ff, 45088, 0 }, /* CMP */ +{ op_b028_0_comp_ff, 45096, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b030_0_comp_ff, 45104, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b038_0_comp_ff, 45112, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b039_0_comp_ff, 45113, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b03a_0_comp_ff, 45114, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b03b_0_comp_ff, 45115, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b03c_0_comp_ff, 45116, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b040_0_comp_ff, 45120, 0 }, /* CMP */ +{ op_b048_0_comp_ff, 45128, 0 }, /* CMP */ +{ op_b050_0_comp_ff, 45136, 0 }, /* CMP */ +{ op_b058_0_comp_ff, 45144, 0 }, /* CMP */ +{ op_b060_0_comp_ff, 45152, 0 }, /* CMP */ +{ op_b068_0_comp_ff, 45160, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b070_0_comp_ff, 45168, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b078_0_comp_ff, 45176, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b079_0_comp_ff, 45177, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b07a_0_comp_ff, 45178, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b07b_0_comp_ff, 45179, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b07c_0_comp_ff, 45180, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b080_0_comp_ff, 45184, 0 }, /* CMP */ +{ op_b088_0_comp_ff, 45192, 0 }, /* CMP */ +{ op_b090_0_comp_ff, 45200, 0 }, /* CMP */ +{ op_b098_0_comp_ff, 45208, 0 }, /* CMP */ +{ op_b0a0_0_comp_ff, 45216, 0 }, /* CMP */ +{ op_b0a8_0_comp_ff, 45224, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0b0_0_comp_ff, 45232, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0b8_0_comp_ff, 45240, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0b9_0_comp_ff, 45241, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0ba_0_comp_ff, 45242, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0bb_0_comp_ff, 45243, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0bc_0_comp_ff, 45244, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0c0_0_comp_ff, 45248, 0 }, /* CMPA */ +{ op_b0c8_0_comp_ff, 45256, 0 }, /* CMPA */ +{ op_b0d0_0_comp_ff, 45264, 0 }, /* CMPA */ +{ op_b0d8_0_comp_ff, 45272, 0 }, /* CMPA */ +{ op_b0e0_0_comp_ff, 45280, 0 }, /* CMPA */ +{ op_b0e8_0_comp_ff, 45288, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0f0_0_comp_ff, 45296, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0f8_0_comp_ff, 45304, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0f9_0_comp_ff, 45305, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0fa_0_comp_ff, 45306, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0fb_0_comp_ff, 45307, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0fc_0_comp_ff, 45308, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b100_0_comp_ff, 45312, 0 }, /* EOR */ +{ op_b108_0_comp_ff, 45320, 0 }, /* CMPM */ +{ op_b110_0_comp_ff, 45328, 0 }, /* EOR */ +{ op_b118_0_comp_ff, 45336, 0 }, /* EOR */ +{ op_b120_0_comp_ff, 45344, 0 }, /* EOR */ +{ op_b128_0_comp_ff, 45352, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b130_0_comp_ff, 45360, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b138_0_comp_ff, 45368, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b139_0_comp_ff, 45369, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b140_0_comp_ff, 45376, 0 }, /* EOR */ +{ op_b148_0_comp_ff, 45384, 0 }, /* CMPM */ +{ op_b150_0_comp_ff, 45392, 0 }, /* EOR */ +{ op_b158_0_comp_ff, 45400, 0 }, /* EOR */ +{ op_b160_0_comp_ff, 45408, 0 }, /* EOR */ +{ op_b168_0_comp_ff, 45416, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b170_0_comp_ff, 45424, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b178_0_comp_ff, 45432, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b179_0_comp_ff, 45433, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b180_0_comp_ff, 45440, 0 }, /* EOR */ +{ op_b188_0_comp_ff, 45448, 0 }, /* CMPM */ +{ op_b190_0_comp_ff, 45456, 0 }, /* EOR */ +{ op_b198_0_comp_ff, 45464, 0 }, /* EOR */ +{ op_b1a0_0_comp_ff, 45472, 0 }, /* EOR */ +{ op_b1a8_0_comp_ff, 45480, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b1b0_0_comp_ff, 45488, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b1b8_0_comp_ff, 45496, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b1b9_0_comp_ff, 45497, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b1c0_0_comp_ff, 45504, 0 }, /* CMPA */ +{ op_b1c8_0_comp_ff, 45512, 0 }, /* CMPA */ +{ op_b1d0_0_comp_ff, 45520, 0 }, /* CMPA */ +{ op_b1d8_0_comp_ff, 45528, 0 }, /* CMPA */ +{ op_b1e0_0_comp_ff, 45536, 0 }, /* CMPA */ +{ op_b1e8_0_comp_ff, 45544, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1f0_0_comp_ff, 45552, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1f8_0_comp_ff, 45560, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1f9_0_comp_ff, 45561, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1fa_0_comp_ff, 45562, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1fb_0_comp_ff, 45563, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1fc_0_comp_ff, 45564, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_c000_0_comp_ff, 49152, 0 }, /* AND */ +{ op_c010_0_comp_ff, 49168, 0 }, /* AND */ +{ op_c018_0_comp_ff, 49176, 0 }, /* AND */ +{ op_c020_0_comp_ff, 49184, 0 }, /* AND */ +{ op_c028_0_comp_ff, 49192, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c030_0_comp_ff, 49200, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c038_0_comp_ff, 49208, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c039_0_comp_ff, 49209, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c03a_0_comp_ff, 49210, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c03b_0_comp_ff, 49211, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c03c_0_comp_ff, 49212, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c040_0_comp_ff, 49216, 0 }, /* AND */ +{ op_c050_0_comp_ff, 49232, 0 }, /* AND */ +{ op_c058_0_comp_ff, 49240, 0 }, /* AND */ +{ op_c060_0_comp_ff, 49248, 0 }, /* AND */ +{ op_c068_0_comp_ff, 49256, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c070_0_comp_ff, 49264, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c078_0_comp_ff, 49272, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c079_0_comp_ff, 49273, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c07a_0_comp_ff, 49274, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c07b_0_comp_ff, 49275, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c07c_0_comp_ff, 49276, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c080_0_comp_ff, 49280, 0 }, /* AND */ +{ op_c090_0_comp_ff, 49296, 0 }, /* AND */ +{ op_c098_0_comp_ff, 49304, 0 }, /* AND */ +{ op_c0a0_0_comp_ff, 49312, 0 }, /* AND */ +{ op_c0a8_0_comp_ff, 49320, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0b0_0_comp_ff, 49328, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0b8_0_comp_ff, 49336, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0b9_0_comp_ff, 49337, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0ba_0_comp_ff, 49338, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0bb_0_comp_ff, 49339, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0bc_0_comp_ff, 49340, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0c0_0_comp_ff, 49344, 0 }, /* MULU */ +{ op_c0d0_0_comp_ff, 49360, 0 }, /* MULU */ +{ op_c0d8_0_comp_ff, 49368, 0 }, /* MULU */ +{ op_c0e0_0_comp_ff, 49376, 0 }, /* MULU */ +{ op_c0e8_0_comp_ff, 49384, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0f0_0_comp_ff, 49392, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0f8_0_comp_ff, 49400, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0f9_0_comp_ff, 49401, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0fa_0_comp_ff, 49402, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0fb_0_comp_ff, 49403, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0fc_0_comp_ff, 49404, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ NULL, 49408, 0 }, /* ABCD */ +{ NULL, 49416, 0 }, /* ABCD */ +{ op_c110_0_comp_ff, 49424, 0 }, /* AND */ +{ op_c118_0_comp_ff, 49432, 0 }, /* AND */ +{ op_c120_0_comp_ff, 49440, 0 }, /* AND */ +{ op_c128_0_comp_ff, 49448, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c130_0_comp_ff, 49456, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c138_0_comp_ff, 49464, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c139_0_comp_ff, 49465, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c140_0_comp_ff, 49472, 0 }, /* EXG */ +{ op_c148_0_comp_ff, 49480, 0 }, /* EXG */ +{ op_c150_0_comp_ff, 49488, 0 }, /* AND */ +{ op_c158_0_comp_ff, 49496, 0 }, /* AND */ +{ op_c160_0_comp_ff, 49504, 0 }, /* AND */ +{ op_c168_0_comp_ff, 49512, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c170_0_comp_ff, 49520, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c178_0_comp_ff, 49528, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c179_0_comp_ff, 49529, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c188_0_comp_ff, 49544, 0 }, /* EXG */ +{ op_c190_0_comp_ff, 49552, 0 }, /* AND */ +{ op_c198_0_comp_ff, 49560, 0 }, /* AND */ +{ op_c1a0_0_comp_ff, 49568, 0 }, /* AND */ +{ op_c1a8_0_comp_ff, 49576, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c1b0_0_comp_ff, 49584, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c1b8_0_comp_ff, 49592, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c1b9_0_comp_ff, 49593, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c1c0_0_comp_ff, 49600, 0 }, /* MULS */ +{ op_c1d0_0_comp_ff, 49616, 0 }, /* MULS */ +{ op_c1d8_0_comp_ff, 49624, 0 }, /* MULS */ +{ op_c1e0_0_comp_ff, 49632, 0 }, /* MULS */ +{ op_c1e8_0_comp_ff, 49640, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1f0_0_comp_ff, 49648, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1f8_0_comp_ff, 49656, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1f9_0_comp_ff, 49657, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1fa_0_comp_ff, 49658, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1fb_0_comp_ff, 49659, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1fc_0_comp_ff, 49660, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_d000_0_comp_ff, 53248, 0 }, /* ADD */ +{ op_d010_0_comp_ff, 53264, 0 }, /* ADD */ +{ op_d018_0_comp_ff, 53272, 0 }, /* ADD */ +{ op_d020_0_comp_ff, 53280, 0 }, /* ADD */ +{ op_d028_0_comp_ff, 53288, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d030_0_comp_ff, 53296, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d038_0_comp_ff, 53304, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d039_0_comp_ff, 53305, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d03a_0_comp_ff, 53306, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d03b_0_comp_ff, 53307, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d03c_0_comp_ff, 53308, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d040_0_comp_ff, 53312, 0 }, /* ADD */ +{ op_d048_0_comp_ff, 53320, 0 }, /* ADD */ +{ op_d050_0_comp_ff, 53328, 0 }, /* ADD */ +{ op_d058_0_comp_ff, 53336, 0 }, /* ADD */ +{ op_d060_0_comp_ff, 53344, 0 }, /* ADD */ +{ op_d068_0_comp_ff, 53352, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d070_0_comp_ff, 53360, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d078_0_comp_ff, 53368, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d079_0_comp_ff, 53369, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d07a_0_comp_ff, 53370, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d07b_0_comp_ff, 53371, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d07c_0_comp_ff, 53372, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d080_0_comp_ff, 53376, 0 }, /* ADD */ +{ op_d088_0_comp_ff, 53384, 0 }, /* ADD */ +{ op_d090_0_comp_ff, 53392, 0 }, /* ADD */ +{ op_d098_0_comp_ff, 53400, 0 }, /* ADD */ +{ op_d0a0_0_comp_ff, 53408, 0 }, /* ADD */ +{ op_d0a8_0_comp_ff, 53416, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0b0_0_comp_ff, 53424, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0b8_0_comp_ff, 53432, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0b9_0_comp_ff, 53433, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0ba_0_comp_ff, 53434, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0bb_0_comp_ff, 53435, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0bc_0_comp_ff, 53436, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0c0_0_comp_ff, 53440, 0 }, /* ADDA */ +{ op_d0c8_0_comp_ff, 53448, 0 }, /* ADDA */ +{ op_d0d0_0_comp_ff, 53456, 0 }, /* ADDA */ +{ op_d0d8_0_comp_ff, 53464, 0 }, /* ADDA */ +{ op_d0e0_0_comp_ff, 53472, 0 }, /* ADDA */ +{ op_d0e8_0_comp_ff, 53480, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0f0_0_comp_ff, 53488, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0f8_0_comp_ff, 53496, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0f9_0_comp_ff, 53497, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0fa_0_comp_ff, 53498, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0fb_0_comp_ff, 53499, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0fc_0_comp_ff, 53500, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d100_0_comp_ff, 53504, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d108_0_comp_ff, 53512, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d110_0_comp_ff, 53520, 0 }, /* ADD */ +{ op_d118_0_comp_ff, 53528, 0 }, /* ADD */ +{ op_d120_0_comp_ff, 53536, 0 }, /* ADD */ +{ op_d128_0_comp_ff, 53544, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d130_0_comp_ff, 53552, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d138_0_comp_ff, 53560, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d139_0_comp_ff, 53561, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d140_0_comp_ff, 53568, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d148_0_comp_ff, 53576, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d150_0_comp_ff, 53584, 0 }, /* ADD */ +{ op_d158_0_comp_ff, 53592, 0 }, /* ADD */ +{ op_d160_0_comp_ff, 53600, 0 }, /* ADD */ +{ op_d168_0_comp_ff, 53608, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d170_0_comp_ff, 53616, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d178_0_comp_ff, 53624, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d179_0_comp_ff, 53625, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d180_0_comp_ff, 53632, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d188_0_comp_ff, 53640, COMP_OPCODE_CMOV|COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d190_0_comp_ff, 53648, 0 }, /* ADD */ +{ op_d198_0_comp_ff, 53656, 0 }, /* ADD */ +{ op_d1a0_0_comp_ff, 53664, 0 }, /* ADD */ +{ op_d1a8_0_comp_ff, 53672, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d1b0_0_comp_ff, 53680, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d1b8_0_comp_ff, 53688, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d1b9_0_comp_ff, 53689, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d1c0_0_comp_ff, 53696, 0 }, /* ADDA */ +{ op_d1c8_0_comp_ff, 53704, 0 }, /* ADDA */ +{ op_d1d0_0_comp_ff, 53712, 0 }, /* ADDA */ +{ op_d1d8_0_comp_ff, 53720, 0 }, /* ADDA */ +{ op_d1e0_0_comp_ff, 53728, 0 }, /* ADDA */ +{ op_d1e8_0_comp_ff, 53736, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1f0_0_comp_ff, 53744, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1f8_0_comp_ff, 53752, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1f9_0_comp_ff, 53753, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1fa_0_comp_ff, 53754, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1fb_0_comp_ff, 53755, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1fc_0_comp_ff, 53756, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_e000_0_comp_ff, 57344, 0 }, /* ASR */ +{ op_e008_0_comp_ff, 57352, 0 }, /* LSR */ +{ NULL, 57360, 0 }, /* ROXR */ +{ op_e018_0_comp_ff, 57368, 0 }, /* ROR */ +{ op_e020_0_comp_ff, 57376, COMP_OPCODE_CMOV }, /* ASR */ +{ op_e028_0_comp_ff, 57384, COMP_OPCODE_CMOV }, /* LSR */ +{ NULL, 57392, 0 }, /* ROXR */ +{ op_e038_0_comp_ff, 57400, 0 }, /* ROR */ +{ op_e040_0_comp_ff, 57408, 0 }, /* ASR */ +{ op_e048_0_comp_ff, 57416, 0 }, /* LSR */ +{ NULL, 57424, 0 }, /* ROXR */ +{ op_e058_0_comp_ff, 57432, 0 }, /* ROR */ +{ op_e060_0_comp_ff, 57440, COMP_OPCODE_CMOV }, /* ASR */ +{ op_e068_0_comp_ff, 57448, COMP_OPCODE_CMOV }, /* LSR */ +{ NULL, 57456, 0 }, /* ROXR */ +{ op_e078_0_comp_ff, 57464, 0 }, /* ROR */ +{ op_e080_0_comp_ff, 57472, 0 }, /* ASR */ +{ op_e088_0_comp_ff, 57480, 0 }, /* LSR */ +{ NULL, 57488, 0 }, /* ROXR */ +{ op_e098_0_comp_ff, 57496, 0 }, /* ROR */ +{ op_e0a0_0_comp_ff, 57504, COMP_OPCODE_CMOV }, /* ASR */ +{ op_e0a8_0_comp_ff, 57512, COMP_OPCODE_CMOV }, /* LSR */ +{ NULL, 57520, 0 }, /* ROXR */ +{ op_e0b8_0_comp_ff, 57528, 0 }, /* ROR */ +{ NULL, 57552, 0 }, /* ASRW */ +{ NULL, 57560, 0 }, /* ASRW */ +{ NULL, 57568, 0 }, /* ASRW */ +{ NULL, 57576, 0 }, /* ASRW */ +{ NULL, 57584, 0 }, /* ASRW */ +{ NULL, 57592, 0 }, /* ASRW */ +{ NULL, 57593, 0 }, /* ASRW */ +{ op_e100_0_comp_ff, 57600, 0 }, /* ASL */ +{ op_e108_0_comp_ff, 57608, 0 }, /* LSL */ +{ NULL, 57616, 0 }, /* ROXL */ +{ op_e118_0_comp_ff, 57624, 0 }, /* ROL */ +{ op_e120_0_comp_ff, 57632, COMP_OPCODE_CMOV }, /* ASL */ +{ op_e128_0_comp_ff, 57640, COMP_OPCODE_CMOV }, /* LSL */ +{ NULL, 57648, 0 }, /* ROXL */ +{ op_e138_0_comp_ff, 57656, 0 }, /* ROL */ +{ op_e140_0_comp_ff, 57664, 0 }, /* ASL */ +{ op_e148_0_comp_ff, 57672, 0 }, /* LSL */ +{ NULL, 57680, 0 }, /* ROXL */ +{ op_e158_0_comp_ff, 57688, 0 }, /* ROL */ +{ op_e160_0_comp_ff, 57696, COMP_OPCODE_CMOV }, /* ASL */ +{ op_e168_0_comp_ff, 57704, COMP_OPCODE_CMOV }, /* LSL */ +{ NULL, 57712, 0 }, /* ROXL */ +{ op_e178_0_comp_ff, 57720, 0 }, /* ROL */ +{ op_e180_0_comp_ff, 57728, 0 }, /* ASL */ +{ op_e188_0_comp_ff, 57736, 0 }, /* LSL */ +{ NULL, 57744, 0 }, /* ROXL */ +{ op_e198_0_comp_ff, 57752, 0 }, /* ROL */ +{ op_e1a0_0_comp_ff, 57760, COMP_OPCODE_CMOV }, /* ASL */ +{ op_e1a8_0_comp_ff, 57768, COMP_OPCODE_CMOV }, /* LSL */ +{ NULL, 57776, 0 }, /* ROXL */ +{ op_e1b8_0_comp_ff, 57784, 0 }, /* ROL */ +{ NULL, 57808, 0 }, /* ASLW */ +{ NULL, 57816, 0 }, /* ASLW */ +{ NULL, 57824, 0 }, /* ASLW */ +{ NULL, 57832, 0 }, /* ASLW */ +{ NULL, 57840, 0 }, /* ASLW */ +{ NULL, 57848, 0 }, /* ASLW */ +{ NULL, 57849, 0 }, /* ASLW */ +{ NULL, 58064, 0 }, /* LSRW */ +{ NULL, 58072, 0 }, /* LSRW */ +{ NULL, 58080, 0 }, /* LSRW */ +{ NULL, 58088, 0 }, /* LSRW */ +{ NULL, 58096, 0 }, /* LSRW */ +{ NULL, 58104, 0 }, /* LSRW */ +{ NULL, 58105, 0 }, /* LSRW */ +{ NULL, 58320, 0 }, /* LSLW */ +{ NULL, 58328, 0 }, /* LSLW */ +{ NULL, 58336, 0 }, /* LSLW */ +{ NULL, 58344, 0 }, /* LSLW */ +{ NULL, 58352, 0 }, /* LSLW */ +{ NULL, 58360, 0 }, /* LSLW */ +{ NULL, 58361, 0 }, /* LSLW */ +{ NULL, 58576, 0 }, /* ROXRW */ +{ NULL, 58584, 0 }, /* ROXRW */ +{ NULL, 58592, 0 }, /* ROXRW */ +{ NULL, 58600, 0 }, /* ROXRW */ +{ NULL, 58608, 0 }, /* ROXRW */ +{ NULL, 58616, 0 }, /* ROXRW */ +{ NULL, 58617, 0 }, /* ROXRW */ +{ NULL, 58832, 0 }, /* ROXLW */ +{ NULL, 58840, 0 }, /* ROXLW */ +{ NULL, 58848, 0 }, /* ROXLW */ +{ NULL, 58856, 0 }, /* ROXLW */ +{ NULL, 58864, 0 }, /* ROXLW */ +{ NULL, 58872, 0 }, /* ROXLW */ +{ NULL, 58873, 0 }, /* ROXLW */ +{ NULL, 59088, 0 }, /* RORW */ +{ NULL, 59096, 0 }, /* RORW */ +{ NULL, 59104, 0 }, /* RORW */ +{ NULL, 59112, 0 }, /* RORW */ +{ NULL, 59120, 0 }, /* RORW */ +{ NULL, 59128, 0 }, /* RORW */ +{ NULL, 59129, 0 }, /* RORW */ +{ NULL, 59344, 0 }, /* ROLW */ +{ NULL, 59352, 0 }, /* ROLW */ +{ NULL, 59360, 0 }, /* ROLW */ +{ NULL, 59368, 0 }, /* ROLW */ +{ NULL, 59376, 0 }, /* ROLW */ +{ NULL, 59384, 0 }, /* ROLW */ +{ NULL, 59385, 0 }, /* ROLW */ +{ NULL, 59584, 0 }, /* BFTST */ +{ NULL, 59600, 0 }, /* BFTST */ +{ NULL, 59624, 0 }, /* BFTST */ +{ NULL, 59632, 0 }, /* BFTST */ +{ NULL, 59640, 0 }, /* BFTST */ +{ NULL, 59641, 0 }, /* BFTST */ +{ NULL, 59642, 0 }, /* BFTST */ +{ NULL, 59643, 0 }, /* BFTST */ +{ NULL, 59840, 0 }, /* BFEXTU */ +{ NULL, 59856, 0 }, /* BFEXTU */ +{ NULL, 59880, 0 }, /* BFEXTU */ +{ NULL, 59888, 0 }, /* BFEXTU */ +{ NULL, 59896, 0 }, /* BFEXTU */ +{ NULL, 59897, 0 }, /* BFEXTU */ +{ NULL, 59898, 0 }, /* BFEXTU */ +{ NULL, 59899, 0 }, /* BFEXTU */ +{ NULL, 60096, 0 }, /* BFCHG */ +{ NULL, 60112, 0 }, /* BFCHG */ +{ NULL, 60136, 0 }, /* BFCHG */ +{ NULL, 60144, 0 }, /* BFCHG */ +{ NULL, 60152, 0 }, /* BFCHG */ +{ NULL, 60153, 0 }, /* BFCHG */ +{ NULL, 60352, 0 }, /* BFEXTS */ +{ NULL, 60368, 0 }, /* BFEXTS */ +{ NULL, 60392, 0 }, /* BFEXTS */ +{ NULL, 60400, 0 }, /* BFEXTS */ +{ NULL, 60408, 0 }, /* BFEXTS */ +{ NULL, 60409, 0 }, /* BFEXTS */ +{ NULL, 60410, 0 }, /* BFEXTS */ +{ NULL, 60411, 0 }, /* BFEXTS */ +{ NULL, 60608, 0 }, /* BFCLR */ +{ NULL, 60624, 0 }, /* BFCLR */ +{ NULL, 60648, 0 }, /* BFCLR */ +{ NULL, 60656, 0 }, /* BFCLR */ +{ NULL, 60664, 0 }, /* BFCLR */ +{ NULL, 60665, 0 }, /* BFCLR */ +{ NULL, 60864, 0 }, /* BFFFO */ +{ NULL, 60880, 0 }, /* BFFFO */ +{ NULL, 60904, 0 }, /* BFFFO */ +{ NULL, 60912, 0 }, /* BFFFO */ +{ NULL, 60920, 0 }, /* BFFFO */ +{ NULL, 60921, 0 }, /* BFFFO */ +{ NULL, 60922, 0 }, /* BFFFO */ +{ NULL, 60923, 0 }, /* BFFFO */ +{ NULL, 61120, 0 }, /* BFSET */ +{ NULL, 61136, 0 }, /* BFSET */ +{ NULL, 61160, 0 }, /* BFSET */ +{ NULL, 61168, 0 }, /* BFSET */ +{ NULL, 61176, 0 }, /* BFSET */ +{ NULL, 61177, 0 }, /* BFSET */ +{ NULL, 61376, 0 }, /* BFINS */ +{ NULL, 61392, 0 }, /* BFINS */ +{ NULL, 61416, 0 }, /* BFINS */ +{ NULL, 61424, 0 }, /* BFINS */ +{ NULL, 61432, 0 }, /* BFINS */ +{ NULL, 61433, 0 }, /* BFINS */ +{ NULL, 61440, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61448, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61456, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61464, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61472, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61480, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61488, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61496, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61497, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ op_f200_0_comp_ff, 61952, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f208_0_comp_ff, 61960, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f210_0_comp_ff, 61968, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f218_0_comp_ff, 61976, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f220_0_comp_ff, 61984, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f228_0_comp_ff, 61992, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f230_0_comp_ff, 62000, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f238_0_comp_ff, 62008, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f239_0_comp_ff, 62009, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f23a_0_comp_ff, 62010, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f23b_0_comp_ff, 62011, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f23c_0_comp_ff, 62012, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f240_0_comp_ff, 62016, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ NULL, 62024, COMP_OPCODE_ISJUMP|COMP_OPCODE_USES_FPU }, /* FDBcc */ +{ op_f250_0_comp_ff, 62032, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f258_0_comp_ff, 62040, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f260_0_comp_ff, 62048, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f268_0_comp_ff, 62056, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f270_0_comp_ff, 62064, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f278_0_comp_ff, 62072, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f279_0_comp_ff, 62073, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ NULL, 62074, COMP_OPCODE_ISJUMP|COMP_OPCODE_USES_FPU }, /* FTRAPcc */ +{ NULL, 62075, COMP_OPCODE_ISJUMP|COMP_OPCODE_USES_FPU }, /* FTRAPcc */ +{ NULL, 62076, COMP_OPCODE_ISJUMP|COMP_OPCODE_USES_FPU }, /* FTRAPcc */ +{ op_f280_0_comp_ff, 62080, COMP_OPCODE_ISJUMP|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FBcc */ +{ op_f2c0_0_comp_ff, 62144, COMP_OPCODE_ISJUMP|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FBcc */ +{ NULL, 62224, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62240, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62248, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62256, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62264, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62265, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62288, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62296, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62312, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62320, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62328, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62329, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62330, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62331, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62472, COMP_OPCODE_ISJUMP }, /* CINVL */ +{ NULL, 62480, COMP_OPCODE_ISJUMP }, /* CINVP */ +{ NULL, 62488, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62489, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62490, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62491, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62492, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62493, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62494, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62495, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62504, COMP_OPCODE_ISJUMP }, /* CPUSHL */ +{ NULL, 62512, COMP_OPCODE_ISJUMP }, /* CPUSHP */ +{ NULL, 62520, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62521, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62522, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62523, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62524, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62525, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62526, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62527, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62720, COMP_OPCODE_ISJUMP }, /* PFLUSHN */ +{ NULL, 62728, COMP_OPCODE_ISJUMP }, /* PFLUSH */ +{ NULL, 62736, COMP_OPCODE_ISJUMP }, /* PFLUSHAN */ +{ NULL, 62744, COMP_OPCODE_ISJUMP }, /* PFLUSHA */ +{ NULL, 62792, COMP_OPCODE_ISJUMP }, /* PTESTW */ +{ NULL, 62824, COMP_OPCODE_ISJUMP }, /* PTESTR */ +{ NULL, 62856, COMP_OPCODE_ISJUMP }, /* PLPAW */ +{ NULL, 62920, COMP_OPCODE_ISJUMP }, /* PLPAR */ +{ op_f600_0_comp_ff, 62976, COMP_OPCODE_LONG_OPCODE }, /* MOVE16 */ +{ op_f608_0_comp_ff, 62984, COMP_OPCODE_LONG_OPCODE }, /* MOVE16 */ +{ op_f610_0_comp_ff, 62992, COMP_OPCODE_LONG_OPCODE }, /* MOVE16 */ +{ op_f618_0_comp_ff, 63000, COMP_OPCODE_LONG_OPCODE }, /* MOVE16 */ +{ op_f620_0_comp_ff, 63008, COMP_OPCODE_LONG_OPCODE }, /* MOVE16 */ +{ NULL, 63488, COMP_OPCODE_ISJUMP }, /* LPSTOP */ +{ 0, 65536, 0 }}; +const struct comptbl op_smalltbl_0_comp_nf[] = { +{ op_0_0_comp_nf, 0, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_10_0_comp_nf, 16, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_18_0_comp_nf, 24, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_20_0_comp_nf, 32, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_28_0_comp_nf, 40, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_30_0_comp_nf, 48, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_38_0_comp_nf, 56, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_39_0_comp_nf, 57, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 60, COMP_OPCODE_ISJUMP }, /* ORSR */ +{ op_40_0_comp_nf, 64, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_50_0_comp_nf, 80, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_58_0_comp_nf, 88, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_60_0_comp_nf, 96, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_68_0_comp_nf, 104, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_70_0_comp_nf, 112, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_78_0_comp_nf, 120, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_79_0_comp_nf, 121, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 124, COMP_OPCODE_ISJUMP }, /* ORSR */ +{ op_80_0_comp_nf, 128, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_90_0_comp_nf, 144, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_98_0_comp_nf, 152, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_a0_0_comp_nf, 160, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_a8_0_comp_nf, 168, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_b0_0_comp_nf, 176, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_b8_0_comp_nf, 184, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_b9_0_comp_nf, 185, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 208, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 232, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 240, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 248, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 249, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 250, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 251, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ op_100_0_comp_nf, 256, 0 }, /* BTST */ +{ NULL, 264, COMP_OPCODE_ISJUMP }, /* MVPMR */ +{ op_110_0_comp_nf, 272, 0 }, /* BTST */ +{ op_118_0_comp_nf, 280, 0 }, /* BTST */ +{ op_120_0_comp_nf, 288, 0 }, /* BTST */ +{ op_128_0_comp_nf, 296, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_130_0_comp_nf, 304, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_138_0_comp_nf, 312, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_139_0_comp_nf, 313, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_13a_0_comp_nf, 314, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_13b_0_comp_nf, 315, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_13c_0_comp_nf, 316, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_140_0_comp_nf, 320, 0 }, /* BCHG */ +{ NULL, 328, COMP_OPCODE_ISJUMP }, /* MVPMR */ +{ op_150_0_comp_nf, 336, 0 }, /* BCHG */ +{ op_158_0_comp_nf, 344, 0 }, /* BCHG */ +{ op_160_0_comp_nf, 352, 0 }, /* BCHG */ +{ op_168_0_comp_nf, 360, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_170_0_comp_nf, 368, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_178_0_comp_nf, 376, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_179_0_comp_nf, 377, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_180_0_comp_nf, 384, 0 }, /* BCLR */ +{ NULL, 392, COMP_OPCODE_ISJUMP }, /* MVPRM */ +{ op_190_0_comp_nf, 400, 0 }, /* BCLR */ +{ op_198_0_comp_nf, 408, 0 }, /* BCLR */ +{ op_1a0_0_comp_nf, 416, 0 }, /* BCLR */ +{ op_1a8_0_comp_nf, 424, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_1b0_0_comp_nf, 432, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_1b8_0_comp_nf, 440, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_1b9_0_comp_nf, 441, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_1c0_0_comp_nf, 448, 0 }, /* BSET */ +{ NULL, 456, COMP_OPCODE_ISJUMP }, /* MVPRM */ +{ op_1d0_0_comp_nf, 464, 0 }, /* BSET */ +{ op_1d8_0_comp_nf, 472, 0 }, /* BSET */ +{ op_1e0_0_comp_nf, 480, 0 }, /* BSET */ +{ op_1e8_0_comp_nf, 488, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_1f0_0_comp_nf, 496, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_1f8_0_comp_nf, 504, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_1f9_0_comp_nf, 505, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_200_0_comp_nf, 512, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_210_0_comp_nf, 528, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_218_0_comp_nf, 536, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_220_0_comp_nf, 544, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_228_0_comp_nf, 552, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_230_0_comp_nf, 560, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_238_0_comp_nf, 568, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_239_0_comp_nf, 569, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ NULL, 572, COMP_OPCODE_ISJUMP }, /* ANDSR */ +{ op_240_0_comp_nf, 576, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_250_0_comp_nf, 592, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_258_0_comp_nf, 600, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_260_0_comp_nf, 608, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_268_0_comp_nf, 616, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_270_0_comp_nf, 624, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_278_0_comp_nf, 632, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_279_0_comp_nf, 633, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ NULL, 636, COMP_OPCODE_ISJUMP }, /* ANDSR */ +{ op_280_0_comp_nf, 640, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_290_0_comp_nf, 656, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_298_0_comp_nf, 664, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_2a0_0_comp_nf, 672, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_2a8_0_comp_nf, 680, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_2b0_0_comp_nf, 688, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_2b8_0_comp_nf, 696, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_2b9_0_comp_nf, 697, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ NULL, 720, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 744, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 752, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 760, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 761, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 762, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 763, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ op_400_0_comp_nf, 1024, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_410_0_comp_nf, 1040, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_418_0_comp_nf, 1048, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_420_0_comp_nf, 1056, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_428_0_comp_nf, 1064, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_430_0_comp_nf, 1072, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_438_0_comp_nf, 1080, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_439_0_comp_nf, 1081, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_440_0_comp_nf, 1088, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_450_0_comp_nf, 1104, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_458_0_comp_nf, 1112, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_460_0_comp_nf, 1120, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_468_0_comp_nf, 1128, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_470_0_comp_nf, 1136, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_478_0_comp_nf, 1144, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_479_0_comp_nf, 1145, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_480_0_comp_nf, 1152, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_490_0_comp_nf, 1168, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_498_0_comp_nf, 1176, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_4a0_0_comp_nf, 1184, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_4a8_0_comp_nf, 1192, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_4b0_0_comp_nf, 1200, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_4b8_0_comp_nf, 1208, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_4b9_0_comp_nf, 1209, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ NULL, 1232, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1256, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1264, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1272, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1273, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1274, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ NULL, 1275, COMP_OPCODE_ISJUMP }, /* CHK2 */ +{ op_600_0_comp_nf, 1536, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_610_0_comp_nf, 1552, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_618_0_comp_nf, 1560, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_620_0_comp_nf, 1568, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_628_0_comp_nf, 1576, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_630_0_comp_nf, 1584, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_638_0_comp_nf, 1592, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_639_0_comp_nf, 1593, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_640_0_comp_nf, 1600, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_650_0_comp_nf, 1616, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_658_0_comp_nf, 1624, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_660_0_comp_nf, 1632, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_668_0_comp_nf, 1640, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_670_0_comp_nf, 1648, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_678_0_comp_nf, 1656, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_679_0_comp_nf, 1657, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_680_0_comp_nf, 1664, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_690_0_comp_nf, 1680, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_698_0_comp_nf, 1688, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_6a0_0_comp_nf, 1696, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_6a8_0_comp_nf, 1704, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_6b0_0_comp_nf, 1712, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_6b8_0_comp_nf, 1720, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_6b9_0_comp_nf, 1721, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ NULL, 1728, COMP_OPCODE_ISJUMP }, /* RTM */ +{ NULL, 1736, COMP_OPCODE_ISJUMP }, /* RTM */ +{ NULL, 1744, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1768, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1776, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1784, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1785, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1786, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ NULL, 1787, COMP_OPCODE_ISJUMP }, /* CALLM */ +{ op_800_0_comp_nf, 2048, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_810_0_comp_nf, 2064, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_818_0_comp_nf, 2072, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_820_0_comp_nf, 2080, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_828_0_comp_nf, 2088, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_830_0_comp_nf, 2096, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_838_0_comp_nf, 2104, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_839_0_comp_nf, 2105, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_83a_0_comp_nf, 2106, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_83b_0_comp_nf, 2107, COMP_OPCODE_LONG_OPCODE }, /* BTST */ +{ op_840_0_comp_nf, 2112, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_850_0_comp_nf, 2128, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_858_0_comp_nf, 2136, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_860_0_comp_nf, 2144, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_868_0_comp_nf, 2152, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_870_0_comp_nf, 2160, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_878_0_comp_nf, 2168, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_879_0_comp_nf, 2169, COMP_OPCODE_LONG_OPCODE }, /* BCHG */ +{ op_880_0_comp_nf, 2176, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_890_0_comp_nf, 2192, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_898_0_comp_nf, 2200, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8a0_0_comp_nf, 2208, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8a8_0_comp_nf, 2216, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8b0_0_comp_nf, 2224, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8b8_0_comp_nf, 2232, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8b9_0_comp_nf, 2233, COMP_OPCODE_LONG_OPCODE }, /* BCLR */ +{ op_8c0_0_comp_nf, 2240, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8d0_0_comp_nf, 2256, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8d8_0_comp_nf, 2264, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8e0_0_comp_nf, 2272, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8e8_0_comp_nf, 2280, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8f0_0_comp_nf, 2288, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8f8_0_comp_nf, 2296, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_8f9_0_comp_nf, 2297, COMP_OPCODE_LONG_OPCODE }, /* BSET */ +{ op_a00_0_comp_nf, 2560, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a10_0_comp_nf, 2576, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a18_0_comp_nf, 2584, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a20_0_comp_nf, 2592, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a28_0_comp_nf, 2600, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a30_0_comp_nf, 2608, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a38_0_comp_nf, 2616, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a39_0_comp_nf, 2617, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ NULL, 2620, COMP_OPCODE_ISJUMP }, /* EORSR */ +{ op_a40_0_comp_nf, 2624, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a50_0_comp_nf, 2640, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a58_0_comp_nf, 2648, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a60_0_comp_nf, 2656, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a68_0_comp_nf, 2664, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a70_0_comp_nf, 2672, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a78_0_comp_nf, 2680, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a79_0_comp_nf, 2681, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ NULL, 2684, COMP_OPCODE_ISJUMP }, /* EORSR */ +{ op_a80_0_comp_nf, 2688, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a90_0_comp_nf, 2704, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_a98_0_comp_nf, 2712, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_aa0_0_comp_nf, 2720, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_aa8_0_comp_nf, 2728, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_ab0_0_comp_nf, 2736, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_ab8_0_comp_nf, 2744, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_ab9_0_comp_nf, 2745, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ NULL, 2768, 0 }, /* CAS */ +{ NULL, 2776, 0 }, /* CAS */ +{ NULL, 2784, 0 }, /* CAS */ +{ NULL, 2792, 0 }, /* CAS */ +{ NULL, 2800, 0 }, /* CAS */ +{ NULL, 2808, 0 }, /* CAS */ +{ NULL, 2809, 0 }, /* CAS */ +{ op_c00_0_comp_nf, 3072, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c10_0_comp_nf, 3088, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c18_0_comp_nf, 3096, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c20_0_comp_nf, 3104, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c28_0_comp_nf, 3112, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c30_0_comp_nf, 3120, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c38_0_comp_nf, 3128, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c39_0_comp_nf, 3129, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c3a_0_comp_nf, 3130, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c3b_0_comp_nf, 3131, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c40_0_comp_nf, 3136, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c50_0_comp_nf, 3152, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c58_0_comp_nf, 3160, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c60_0_comp_nf, 3168, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c68_0_comp_nf, 3176, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c70_0_comp_nf, 3184, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c78_0_comp_nf, 3192, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c79_0_comp_nf, 3193, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c7a_0_comp_nf, 3194, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c7b_0_comp_nf, 3195, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c80_0_comp_nf, 3200, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c90_0_comp_nf, 3216, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_c98_0_comp_nf, 3224, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_ca0_0_comp_nf, 3232, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_ca8_0_comp_nf, 3240, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_cb0_0_comp_nf, 3248, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_cb8_0_comp_nf, 3256, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_cb9_0_comp_nf, 3257, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_cba_0_comp_nf, 3258, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_cbb_0_comp_nf, 3259, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ NULL, 3280, 0 }, /* CAS */ +{ NULL, 3288, 0 }, /* CAS */ +{ NULL, 3296, 0 }, /* CAS */ +{ NULL, 3304, 0 }, /* CAS */ +{ NULL, 3312, 0 }, /* CAS */ +{ NULL, 3320, 0 }, /* CAS */ +{ NULL, 3321, 0 }, /* CAS */ +{ NULL, 3324, 0 }, /* CAS2 */ +{ NULL, 3600, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3608, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3616, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3624, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3632, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3640, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3641, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3664, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3672, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3680, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3688, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3696, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3704, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3705, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3728, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3736, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3744, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3752, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3760, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3768, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3769, COMP_OPCODE_ISJUMP }, /* MOVES */ +{ NULL, 3792, 0 }, /* CAS */ +{ NULL, 3800, 0 }, /* CAS */ +{ NULL, 3808, 0 }, /* CAS */ +{ NULL, 3816, 0 }, /* CAS */ +{ NULL, 3824, 0 }, /* CAS */ +{ NULL, 3832, 0 }, /* CAS */ +{ NULL, 3833, 0 }, /* CAS */ +{ NULL, 3836, 0 }, /* CAS2 */ +{ op_1000_0_comp_nf, 4096, 0 }, /* MOVE */ +{ op_1010_0_comp_nf, 4112, 0 }, /* MOVE */ +{ op_1018_0_comp_nf, 4120, 0 }, /* MOVE */ +{ op_1020_0_comp_nf, 4128, 0 }, /* MOVE */ +{ op_1028_0_comp_nf, 4136, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1030_0_comp_nf, 4144, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1038_0_comp_nf, 4152, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1039_0_comp_nf, 4153, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_103a_0_comp_nf, 4154, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_103b_0_comp_nf, 4155, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_103c_0_comp_nf, 4156, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1080_0_comp_nf, 4224, 0 }, /* MOVE */ +{ op_1090_0_comp_nf, 4240, 0 }, /* MOVE */ +{ op_1098_0_comp_nf, 4248, 0 }, /* MOVE */ +{ op_10a0_0_comp_nf, 4256, 0 }, /* MOVE */ +{ op_10a8_0_comp_nf, 4264, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10b0_0_comp_nf, 4272, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10b8_0_comp_nf, 4280, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10b9_0_comp_nf, 4281, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10ba_0_comp_nf, 4282, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10bb_0_comp_nf, 4283, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10bc_0_comp_nf, 4284, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10c0_0_comp_nf, 4288, 0 }, /* MOVE */ +{ op_10d0_0_comp_nf, 4304, 0 }, /* MOVE */ +{ op_10d8_0_comp_nf, 4312, 0 }, /* MOVE */ +{ op_10e0_0_comp_nf, 4320, 0 }, /* MOVE */ +{ op_10e8_0_comp_nf, 4328, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10f0_0_comp_nf, 4336, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10f8_0_comp_nf, 4344, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10f9_0_comp_nf, 4345, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10fa_0_comp_nf, 4346, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10fb_0_comp_nf, 4347, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_10fc_0_comp_nf, 4348, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1100_0_comp_nf, 4352, 0 }, /* MOVE */ +{ op_1110_0_comp_nf, 4368, 0 }, /* MOVE */ +{ op_1118_0_comp_nf, 4376, 0 }, /* MOVE */ +{ op_1120_0_comp_nf, 4384, 0 }, /* MOVE */ +{ op_1128_0_comp_nf, 4392, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1130_0_comp_nf, 4400, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1138_0_comp_nf, 4408, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1139_0_comp_nf, 4409, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_113a_0_comp_nf, 4410, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_113b_0_comp_nf, 4411, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_113c_0_comp_nf, 4412, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1140_0_comp_nf, 4416, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1150_0_comp_nf, 4432, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1158_0_comp_nf, 4440, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1160_0_comp_nf, 4448, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1168_0_comp_nf, 4456, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1170_0_comp_nf, 4464, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1178_0_comp_nf, 4472, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1179_0_comp_nf, 4473, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_117a_0_comp_nf, 4474, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_117b_0_comp_nf, 4475, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_117c_0_comp_nf, 4476, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1180_0_comp_nf, 4480, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1190_0_comp_nf, 4496, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_1198_0_comp_nf, 4504, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11a0_0_comp_nf, 4512, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11a8_0_comp_nf, 4520, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11b0_0_comp_nf, 4528, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11b8_0_comp_nf, 4536, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11b9_0_comp_nf, 4537, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11ba_0_comp_nf, 4538, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11bb_0_comp_nf, 4539, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11bc_0_comp_nf, 4540, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11c0_0_comp_nf, 4544, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11d0_0_comp_nf, 4560, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11d8_0_comp_nf, 4568, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11e0_0_comp_nf, 4576, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11e8_0_comp_nf, 4584, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11f0_0_comp_nf, 4592, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11f8_0_comp_nf, 4600, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11f9_0_comp_nf, 4601, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11fa_0_comp_nf, 4602, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11fb_0_comp_nf, 4603, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_11fc_0_comp_nf, 4604, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13c0_0_comp_nf, 5056, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13d0_0_comp_nf, 5072, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13d8_0_comp_nf, 5080, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13e0_0_comp_nf, 5088, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13e8_0_comp_nf, 5096, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13f0_0_comp_nf, 5104, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13f8_0_comp_nf, 5112, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13f9_0_comp_nf, 5113, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13fa_0_comp_nf, 5114, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13fb_0_comp_nf, 5115, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_13fc_0_comp_nf, 5116, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2000_0_comp_nf, 8192, 0 }, /* MOVE */ +{ op_2008_0_comp_nf, 8200, 0 }, /* MOVE */ +{ op_2010_0_comp_nf, 8208, 0 }, /* MOVE */ +{ op_2018_0_comp_nf, 8216, 0 }, /* MOVE */ +{ op_2020_0_comp_nf, 8224, 0 }, /* MOVE */ +{ op_2028_0_comp_nf, 8232, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2030_0_comp_nf, 8240, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2038_0_comp_nf, 8248, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2039_0_comp_nf, 8249, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_203a_0_comp_nf, 8250, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_203b_0_comp_nf, 8251, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_203c_0_comp_nf, 8252, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2040_0_comp_nf, 8256, 0 }, /* MOVEA */ +{ op_2048_0_comp_nf, 8264, 0 }, /* MOVEA */ +{ op_2050_0_comp_nf, 8272, 0 }, /* MOVEA */ +{ op_2058_0_comp_nf, 8280, 0 }, /* MOVEA */ +{ op_2060_0_comp_nf, 8288, 0 }, /* MOVEA */ +{ op_2068_0_comp_nf, 8296, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_2070_0_comp_nf, 8304, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_2078_0_comp_nf, 8312, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_2079_0_comp_nf, 8313, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_207a_0_comp_nf, 8314, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_207b_0_comp_nf, 8315, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_207c_0_comp_nf, 8316, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_2080_0_comp_nf, 8320, 0 }, /* MOVE */ +{ op_2088_0_comp_nf, 8328, 0 }, /* MOVE */ +{ op_2090_0_comp_nf, 8336, 0 }, /* MOVE */ +{ op_2098_0_comp_nf, 8344, 0 }, /* MOVE */ +{ op_20a0_0_comp_nf, 8352, 0 }, /* MOVE */ +{ op_20a8_0_comp_nf, 8360, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20b0_0_comp_nf, 8368, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20b8_0_comp_nf, 8376, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20b9_0_comp_nf, 8377, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20ba_0_comp_nf, 8378, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20bb_0_comp_nf, 8379, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20bc_0_comp_nf, 8380, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20c0_0_comp_nf, 8384, 0 }, /* MOVE */ +{ op_20c8_0_comp_nf, 8392, 0 }, /* MOVE */ +{ op_20d0_0_comp_nf, 8400, 0 }, /* MOVE */ +{ op_20d8_0_comp_nf, 8408, 0 }, /* MOVE */ +{ op_20e0_0_comp_nf, 8416, 0 }, /* MOVE */ +{ op_20e8_0_comp_nf, 8424, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20f0_0_comp_nf, 8432, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20f8_0_comp_nf, 8440, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20f9_0_comp_nf, 8441, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20fa_0_comp_nf, 8442, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20fb_0_comp_nf, 8443, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_20fc_0_comp_nf, 8444, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2100_0_comp_nf, 8448, 0 }, /* MOVE */ +{ op_2108_0_comp_nf, 8456, 0 }, /* MOVE */ +{ op_2110_0_comp_nf, 8464, 0 }, /* MOVE */ +{ op_2118_0_comp_nf, 8472, 0 }, /* MOVE */ +{ op_2120_0_comp_nf, 8480, 0 }, /* MOVE */ +{ op_2128_0_comp_nf, 8488, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2130_0_comp_nf, 8496, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2138_0_comp_nf, 8504, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2139_0_comp_nf, 8505, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_213a_0_comp_nf, 8506, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_213b_0_comp_nf, 8507, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_213c_0_comp_nf, 8508, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2140_0_comp_nf, 8512, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2148_0_comp_nf, 8520, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2150_0_comp_nf, 8528, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2158_0_comp_nf, 8536, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2160_0_comp_nf, 8544, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2168_0_comp_nf, 8552, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2170_0_comp_nf, 8560, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2178_0_comp_nf, 8568, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2179_0_comp_nf, 8569, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_217a_0_comp_nf, 8570, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_217b_0_comp_nf, 8571, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_217c_0_comp_nf, 8572, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2180_0_comp_nf, 8576, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2188_0_comp_nf, 8584, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2190_0_comp_nf, 8592, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_2198_0_comp_nf, 8600, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21a0_0_comp_nf, 8608, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21a8_0_comp_nf, 8616, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21b0_0_comp_nf, 8624, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21b8_0_comp_nf, 8632, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21b9_0_comp_nf, 8633, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21ba_0_comp_nf, 8634, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21bb_0_comp_nf, 8635, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21bc_0_comp_nf, 8636, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21c0_0_comp_nf, 8640, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21c8_0_comp_nf, 8648, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21d0_0_comp_nf, 8656, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21d8_0_comp_nf, 8664, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21e0_0_comp_nf, 8672, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21e8_0_comp_nf, 8680, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21f0_0_comp_nf, 8688, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21f8_0_comp_nf, 8696, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21f9_0_comp_nf, 8697, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21fa_0_comp_nf, 8698, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21fb_0_comp_nf, 8699, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_21fc_0_comp_nf, 8700, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23c0_0_comp_nf, 9152, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23c8_0_comp_nf, 9160, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23d0_0_comp_nf, 9168, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23d8_0_comp_nf, 9176, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23e0_0_comp_nf, 9184, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23e8_0_comp_nf, 9192, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23f0_0_comp_nf, 9200, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23f8_0_comp_nf, 9208, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23f9_0_comp_nf, 9209, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23fa_0_comp_nf, 9210, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23fb_0_comp_nf, 9211, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_23fc_0_comp_nf, 9212, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3000_0_comp_nf, 12288, 0 }, /* MOVE */ +{ op_3008_0_comp_nf, 12296, 0 }, /* MOVE */ +{ op_3010_0_comp_nf, 12304, 0 }, /* MOVE */ +{ op_3018_0_comp_nf, 12312, 0 }, /* MOVE */ +{ op_3020_0_comp_nf, 12320, 0 }, /* MOVE */ +{ op_3028_0_comp_nf, 12328, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3030_0_comp_nf, 12336, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3038_0_comp_nf, 12344, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3039_0_comp_nf, 12345, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_303a_0_comp_nf, 12346, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_303b_0_comp_nf, 12347, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_303c_0_comp_nf, 12348, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3040_0_comp_nf, 12352, 0 }, /* MOVEA */ +{ op_3048_0_comp_nf, 12360, 0 }, /* MOVEA */ +{ op_3050_0_comp_nf, 12368, 0 }, /* MOVEA */ +{ op_3058_0_comp_nf, 12376, 0 }, /* MOVEA */ +{ op_3060_0_comp_nf, 12384, 0 }, /* MOVEA */ +{ op_3068_0_comp_nf, 12392, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_3070_0_comp_nf, 12400, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_3078_0_comp_nf, 12408, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_3079_0_comp_nf, 12409, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_307a_0_comp_nf, 12410, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_307b_0_comp_nf, 12411, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_307c_0_comp_nf, 12412, COMP_OPCODE_LONG_OPCODE }, /* MOVEA */ +{ op_3080_0_comp_nf, 12416, 0 }, /* MOVE */ +{ op_3088_0_comp_nf, 12424, 0 }, /* MOVE */ +{ op_3090_0_comp_nf, 12432, 0 }, /* MOVE */ +{ op_3098_0_comp_nf, 12440, 0 }, /* MOVE */ +{ op_30a0_0_comp_nf, 12448, 0 }, /* MOVE */ +{ op_30a8_0_comp_nf, 12456, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30b0_0_comp_nf, 12464, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30b8_0_comp_nf, 12472, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30b9_0_comp_nf, 12473, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30ba_0_comp_nf, 12474, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30bb_0_comp_nf, 12475, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30bc_0_comp_nf, 12476, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30c0_0_comp_nf, 12480, 0 }, /* MOVE */ +{ op_30c8_0_comp_nf, 12488, 0 }, /* MOVE */ +{ op_30d0_0_comp_nf, 12496, 0 }, /* MOVE */ +{ op_30d8_0_comp_nf, 12504, 0 }, /* MOVE */ +{ op_30e0_0_comp_nf, 12512, 0 }, /* MOVE */ +{ op_30e8_0_comp_nf, 12520, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30f0_0_comp_nf, 12528, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30f8_0_comp_nf, 12536, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30f9_0_comp_nf, 12537, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30fa_0_comp_nf, 12538, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30fb_0_comp_nf, 12539, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_30fc_0_comp_nf, 12540, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3100_0_comp_nf, 12544, 0 }, /* MOVE */ +{ op_3108_0_comp_nf, 12552, 0 }, /* MOVE */ +{ op_3110_0_comp_nf, 12560, 0 }, /* MOVE */ +{ op_3118_0_comp_nf, 12568, 0 }, /* MOVE */ +{ op_3120_0_comp_nf, 12576, 0 }, /* MOVE */ +{ op_3128_0_comp_nf, 12584, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3130_0_comp_nf, 12592, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3138_0_comp_nf, 12600, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3139_0_comp_nf, 12601, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_313a_0_comp_nf, 12602, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_313b_0_comp_nf, 12603, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_313c_0_comp_nf, 12604, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3140_0_comp_nf, 12608, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3148_0_comp_nf, 12616, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3150_0_comp_nf, 12624, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3158_0_comp_nf, 12632, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3160_0_comp_nf, 12640, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3168_0_comp_nf, 12648, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3170_0_comp_nf, 12656, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3178_0_comp_nf, 12664, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3179_0_comp_nf, 12665, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_317a_0_comp_nf, 12666, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_317b_0_comp_nf, 12667, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_317c_0_comp_nf, 12668, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3180_0_comp_nf, 12672, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3188_0_comp_nf, 12680, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3190_0_comp_nf, 12688, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_3198_0_comp_nf, 12696, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31a0_0_comp_nf, 12704, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31a8_0_comp_nf, 12712, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31b0_0_comp_nf, 12720, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31b8_0_comp_nf, 12728, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31b9_0_comp_nf, 12729, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31ba_0_comp_nf, 12730, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31bb_0_comp_nf, 12731, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31bc_0_comp_nf, 12732, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31c0_0_comp_nf, 12736, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31c8_0_comp_nf, 12744, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31d0_0_comp_nf, 12752, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31d8_0_comp_nf, 12760, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31e0_0_comp_nf, 12768, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31e8_0_comp_nf, 12776, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31f0_0_comp_nf, 12784, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31f8_0_comp_nf, 12792, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31f9_0_comp_nf, 12793, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31fa_0_comp_nf, 12794, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31fb_0_comp_nf, 12795, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_31fc_0_comp_nf, 12796, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33c0_0_comp_nf, 13248, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33c8_0_comp_nf, 13256, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33d0_0_comp_nf, 13264, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33d8_0_comp_nf, 13272, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33e0_0_comp_nf, 13280, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33e8_0_comp_nf, 13288, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33f0_0_comp_nf, 13296, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33f8_0_comp_nf, 13304, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33f9_0_comp_nf, 13305, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33fa_0_comp_nf, 13306, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33fb_0_comp_nf, 13307, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_33fc_0_comp_nf, 13308, COMP_OPCODE_LONG_OPCODE }, /* MOVE */ +{ op_4000_0_comp_nf, 16384, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4010_0_comp_nf, 16400, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4018_0_comp_nf, 16408, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4020_0_comp_nf, 16416, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4028_0_comp_nf, 16424, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4030_0_comp_nf, 16432, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4038_0_comp_nf, 16440, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4039_0_comp_nf, 16441, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4040_0_comp_nf, 16448, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4050_0_comp_nf, 16464, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4058_0_comp_nf, 16472, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4060_0_comp_nf, 16480, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4068_0_comp_nf, 16488, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4070_0_comp_nf, 16496, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4078_0_comp_nf, 16504, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4079_0_comp_nf, 16505, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4080_0_comp_nf, 16512, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4090_0_comp_nf, 16528, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_4098_0_comp_nf, 16536, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_40a0_0_comp_nf, 16544, COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_40a8_0_comp_nf, 16552, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_40b0_0_comp_nf, 16560, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_40b8_0_comp_nf, 16568, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ op_40b9_0_comp_nf, 16569, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISADDX }, /* NEGX */ +{ NULL, 16576, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16592, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16600, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16608, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16616, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16624, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16632, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16633, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 16640, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16656, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16664, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16672, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16680, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16688, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16696, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16697, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16698, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16699, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16700, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16768, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16784, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16792, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16800, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16808, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16816, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16824, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16825, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16826, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16827, COMP_OPCODE_ISJUMP }, /* CHK */ +{ NULL, 16828, COMP_OPCODE_ISJUMP }, /* CHK */ +{ op_41d0_0_comp_nf, 16848, 0 }, /* LEA */ +{ op_41e8_0_comp_nf, 16872, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_41f0_0_comp_nf, 16880, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_41f8_0_comp_nf, 16888, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_41f9_0_comp_nf, 16889, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_41fa_0_comp_nf, 16890, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_41fb_0_comp_nf, 16891, COMP_OPCODE_LONG_OPCODE }, /* LEA */ +{ op_4200_0_comp_nf, 16896, 0 }, /* CLR */ +{ op_4210_0_comp_nf, 16912, 0 }, /* CLR */ +{ op_4218_0_comp_nf, 16920, 0 }, /* CLR */ +{ op_4220_0_comp_nf, 16928, 0 }, /* CLR */ +{ op_4228_0_comp_nf, 16936, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4230_0_comp_nf, 16944, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4238_0_comp_nf, 16952, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4239_0_comp_nf, 16953, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4240_0_comp_nf, 16960, 0 }, /* CLR */ +{ op_4250_0_comp_nf, 16976, 0 }, /* CLR */ +{ op_4258_0_comp_nf, 16984, 0 }, /* CLR */ +{ op_4260_0_comp_nf, 16992, 0 }, /* CLR */ +{ op_4268_0_comp_nf, 17000, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4270_0_comp_nf, 17008, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4278_0_comp_nf, 17016, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4279_0_comp_nf, 17017, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_4280_0_comp_nf, 17024, 0 }, /* CLR */ +{ op_4290_0_comp_nf, 17040, 0 }, /* CLR */ +{ op_4298_0_comp_nf, 17048, 0 }, /* CLR */ +{ op_42a0_0_comp_nf, 17056, 0 }, /* CLR */ +{ op_42a8_0_comp_nf, 17064, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_42b0_0_comp_nf, 17072, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_42b8_0_comp_nf, 17080, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ op_42b9_0_comp_nf, 17081, COMP_OPCODE_LONG_OPCODE }, /* CLR */ +{ NULL, 17088, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17104, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17112, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17120, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17128, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17136, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17144, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ NULL, 17145, COMP_OPCODE_ISJUMP }, /* MVSR2 */ +{ op_4400_0_comp_nf, 17408, 0 }, /* NEG */ +{ op_4410_0_comp_nf, 17424, 0 }, /* NEG */ +{ op_4418_0_comp_nf, 17432, 0 }, /* NEG */ +{ op_4420_0_comp_nf, 17440, 0 }, /* NEG */ +{ op_4428_0_comp_nf, 17448, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4430_0_comp_nf, 17456, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4438_0_comp_nf, 17464, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4439_0_comp_nf, 17465, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4440_0_comp_nf, 17472, 0 }, /* NEG */ +{ op_4450_0_comp_nf, 17488, 0 }, /* NEG */ +{ op_4458_0_comp_nf, 17496, 0 }, /* NEG */ +{ op_4460_0_comp_nf, 17504, 0 }, /* NEG */ +{ op_4468_0_comp_nf, 17512, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4470_0_comp_nf, 17520, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4478_0_comp_nf, 17528, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4479_0_comp_nf, 17529, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_4480_0_comp_nf, 17536, 0 }, /* NEG */ +{ op_4490_0_comp_nf, 17552, 0 }, /* NEG */ +{ op_4498_0_comp_nf, 17560, 0 }, /* NEG */ +{ op_44a0_0_comp_nf, 17568, 0 }, /* NEG */ +{ op_44a8_0_comp_nf, 17576, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_44b0_0_comp_nf, 17584, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_44b8_0_comp_nf, 17592, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ op_44b9_0_comp_nf, 17593, COMP_OPCODE_LONG_OPCODE }, /* NEG */ +{ NULL, 17600, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17616, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17624, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17632, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17640, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17648, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17656, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17657, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17658, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17659, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 17660, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ op_4600_0_comp_nf, 17920, 0 }, /* NOT */ +{ op_4610_0_comp_nf, 17936, 0 }, /* NOT */ +{ op_4618_0_comp_nf, 17944, 0 }, /* NOT */ +{ op_4620_0_comp_nf, 17952, 0 }, /* NOT */ +{ op_4628_0_comp_nf, 17960, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4630_0_comp_nf, 17968, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4638_0_comp_nf, 17976, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4639_0_comp_nf, 17977, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4640_0_comp_nf, 17984, 0 }, /* NOT */ +{ op_4650_0_comp_nf, 18000, 0 }, /* NOT */ +{ op_4658_0_comp_nf, 18008, 0 }, /* NOT */ +{ op_4660_0_comp_nf, 18016, 0 }, /* NOT */ +{ op_4668_0_comp_nf, 18024, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4670_0_comp_nf, 18032, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4678_0_comp_nf, 18040, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4679_0_comp_nf, 18041, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_4680_0_comp_nf, 18048, 0 }, /* NOT */ +{ op_4690_0_comp_nf, 18064, 0 }, /* NOT */ +{ op_4698_0_comp_nf, 18072, 0 }, /* NOT */ +{ op_46a0_0_comp_nf, 18080, 0 }, /* NOT */ +{ op_46a8_0_comp_nf, 18088, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_46b0_0_comp_nf, 18096, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_46b8_0_comp_nf, 18104, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ op_46b9_0_comp_nf, 18105, COMP_OPCODE_LONG_OPCODE }, /* NOT */ +{ NULL, 18112, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18128, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18136, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18144, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18152, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18160, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18168, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18169, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18170, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18171, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18172, COMP_OPCODE_ISJUMP }, /* MV2SR */ +{ NULL, 18432, 0 }, /* NBCD */ +{ op_4808_0_comp_nf, 18440, COMP_OPCODE_LONG_OPCODE }, /* LINK */ +{ NULL, 18448, 0 }, /* NBCD */ +{ NULL, 18456, 0 }, /* NBCD */ +{ NULL, 18464, 0 }, /* NBCD */ +{ NULL, 18472, 0 }, /* NBCD */ +{ NULL, 18480, 0 }, /* NBCD */ +{ NULL, 18488, 0 }, /* NBCD */ +{ NULL, 18489, 0 }, /* NBCD */ +{ op_4840_0_comp_nf, 18496, 0 }, /* SWAP */ +{ NULL, 18504, COMP_OPCODE_ISJUMP }, /* BKPT */ +{ op_4850_0_comp_nf, 18512, 0 }, /* PEA */ +{ op_4868_0_comp_nf, 18536, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_4870_0_comp_nf, 18544, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_4878_0_comp_nf, 18552, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_4879_0_comp_nf, 18553, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_487a_0_comp_nf, 18554, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_487b_0_comp_nf, 18555, COMP_OPCODE_LONG_OPCODE }, /* PEA */ +{ op_4880_0_comp_nf, 18560, 0 }, /* EXT */ +{ op_4890_0_comp_nf, 18576, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48a0_0_comp_nf, 18592, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48a8_0_comp_nf, 18600, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48b0_0_comp_nf, 18608, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48b8_0_comp_nf, 18616, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48b9_0_comp_nf, 18617, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48c0_0_comp_nf, 18624, 0 }, /* EXT */ +{ op_48d0_0_comp_nf, 18640, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48e0_0_comp_nf, 18656, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48e8_0_comp_nf, 18664, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48f0_0_comp_nf, 18672, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48f8_0_comp_nf, 18680, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_48f9_0_comp_nf, 18681, COMP_OPCODE_LONG_OPCODE }, /* MVMLE */ +{ op_49c0_0_comp_nf, 18880, 0 }, /* EXT */ +{ op_4a00_0_comp_nf, 18944, 0 }, /* TST */ +{ op_4a10_0_comp_nf, 18960, 0 }, /* TST */ +{ op_4a18_0_comp_nf, 18968, 0 }, /* TST */ +{ op_4a20_0_comp_nf, 18976, 0 }, /* TST */ +{ op_4a28_0_comp_nf, 18984, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a30_0_comp_nf, 18992, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a38_0_comp_nf, 19000, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a39_0_comp_nf, 19001, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a3a_0_comp_nf, 19002, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a3b_0_comp_nf, 19003, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a3c_0_comp_nf, 19004, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a40_0_comp_nf, 19008, 0 }, /* TST */ +{ op_4a48_0_comp_nf, 19016, 0 }, /* TST */ +{ op_4a50_0_comp_nf, 19024, 0 }, /* TST */ +{ op_4a58_0_comp_nf, 19032, 0 }, /* TST */ +{ op_4a60_0_comp_nf, 19040, 0 }, /* TST */ +{ op_4a68_0_comp_nf, 19048, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a70_0_comp_nf, 19056, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a78_0_comp_nf, 19064, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a79_0_comp_nf, 19065, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a7a_0_comp_nf, 19066, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a7b_0_comp_nf, 19067, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a7c_0_comp_nf, 19068, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4a80_0_comp_nf, 19072, 0 }, /* TST */ +{ op_4a88_0_comp_nf, 19080, 0 }, /* TST */ +{ op_4a90_0_comp_nf, 19088, 0 }, /* TST */ +{ op_4a98_0_comp_nf, 19096, 0 }, /* TST */ +{ op_4aa0_0_comp_nf, 19104, 0 }, /* TST */ +{ op_4aa8_0_comp_nf, 19112, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4ab0_0_comp_nf, 19120, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4ab8_0_comp_nf, 19128, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4ab9_0_comp_nf, 19129, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4aba_0_comp_nf, 19130, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4abb_0_comp_nf, 19131, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ op_4abc_0_comp_nf, 19132, COMP_OPCODE_LONG_OPCODE }, /* TST */ +{ NULL, 19136, 0 }, /* TAS */ +{ NULL, 19144, COMP_OPCODE_ISJUMP }, /* HALT */ +{ NULL, 19148, COMP_OPCODE_ISJUMP }, /* PULSE */ +{ NULL, 19152, 0 }, /* TAS */ +{ NULL, 19160, 0 }, /* TAS */ +{ NULL, 19168, 0 }, /* TAS */ +{ NULL, 19176, 0 }, /* TAS */ +{ NULL, 19184, 0 }, /* TAS */ +{ NULL, 19192, 0 }, /* TAS */ +{ NULL, 19193, 0 }, /* TAS */ +{ op_4c00_0_comp_nf, 19456, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ op_4c10_0_comp_nf, 19472, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ op_4c18_0_comp_nf, 19480, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ op_4c20_0_comp_nf, 19488, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ op_4c28_0_comp_nf, 19496, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ op_4c30_0_comp_nf, 19504, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ op_4c38_0_comp_nf, 19512, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ op_4c39_0_comp_nf, 19513, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ op_4c3a_0_comp_nf, 19514, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ op_4c3b_0_comp_nf, 19515, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ op_4c3c_0_comp_nf, 19516, COMP_OPCODE_LONG_OPCODE }, /* MULL */ +{ NULL, 19520, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19536, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19544, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19552, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19560, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19568, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19576, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19577, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19578, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19579, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ NULL, 19580, COMP_OPCODE_ISJUMP }, /* DIVL */ +{ op_4c90_0_comp_nf, 19600, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4c98_0_comp_nf, 19608, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4ca8_0_comp_nf, 19624, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cb0_0_comp_nf, 19632, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cb8_0_comp_nf, 19640, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cb9_0_comp_nf, 19641, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cba_0_comp_nf, 19642, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cbb_0_comp_nf, 19643, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cd0_0_comp_nf, 19664, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cd8_0_comp_nf, 19672, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4ce8_0_comp_nf, 19688, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cf0_0_comp_nf, 19696, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cf8_0_comp_nf, 19704, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cf9_0_comp_nf, 19705, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cfa_0_comp_nf, 19706, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ op_4cfb_0_comp_nf, 19707, COMP_OPCODE_LONG_OPCODE }, /* MVMEL */ +{ NULL, 20032, COMP_OPCODE_ISJUMP }, /* TRAP */ +{ op_4e50_0_comp_nf, 20048, COMP_OPCODE_LONG_OPCODE }, /* LINK */ +{ op_4e58_0_comp_nf, 20056, 0 }, /* UNLK */ +{ NULL, 20064, COMP_OPCODE_ISJUMP }, /* MVR2USP */ +{ NULL, 20072, COMP_OPCODE_ISJUMP }, /* MVUSP2R */ +{ NULL, 20080, COMP_OPCODE_ISJUMP }, /* RESET */ +{ op_4e71_0_comp_nf, 20081, 0 }, /* NOP */ +{ NULL, 20082, COMP_OPCODE_ISJUMP }, /* STOP */ +{ NULL, 20083, COMP_OPCODE_ISJUMP }, /* RTE */ +{ op_4e74_0_comp_nf, 20084, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* RTD */ +{ op_4e75_0_comp_nf, 20085, COMP_OPCODE_ISJUMP }, /* RTS */ +{ NULL, 20086, COMP_OPCODE_ISJUMP }, /* TRAPV */ +{ NULL, 20087, COMP_OPCODE_ISJUMP }, /* RTR */ +{ NULL, 20090, COMP_OPCODE_ISJUMP }, /* MOVEC2 */ +{ NULL, 20091, COMP_OPCODE_ISJUMP }, /* MOVE2C */ +{ op_4e90_0_comp_nf, 20112, COMP_OPCODE_ISJUMP }, /* JSR */ +{ op_4ea8_0_comp_nf, 20136, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4eb0_0_comp_nf, 20144, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4eb8_0_comp_nf, 20152, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4eb9_0_comp_nf, 20153, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4eba_0_comp_nf, 20154, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4ebb_0_comp_nf, 20155, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JSR */ +{ op_4ed0_0_comp_nf, 20176, COMP_OPCODE_ISJUMP }, /* JMP */ +{ op_4ee8_0_comp_nf, 20200, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_4ef0_0_comp_nf, 20208, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_4ef8_0_comp_nf, 20216, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_4ef9_0_comp_nf, 20217, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_4efa_0_comp_nf, 20218, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_4efb_0_comp_nf, 20219, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* JMP */ +{ op_5000_0_comp_nf, 20480, 0 }, /* ADD */ +{ op_5010_0_comp_nf, 20496, 0 }, /* ADD */ +{ op_5018_0_comp_nf, 20504, 0 }, /* ADD */ +{ op_5020_0_comp_nf, 20512, 0 }, /* ADD */ +{ op_5028_0_comp_nf, 20520, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5030_0_comp_nf, 20528, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5038_0_comp_nf, 20536, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5039_0_comp_nf, 20537, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5040_0_comp_nf, 20544, 0 }, /* ADD */ +{ op_5048_0_comp_nf, 20552, 0 }, /* ADDA */ +{ op_5050_0_comp_nf, 20560, 0 }, /* ADD */ +{ op_5058_0_comp_nf, 20568, 0 }, /* ADD */ +{ op_5060_0_comp_nf, 20576, 0 }, /* ADD */ +{ op_5068_0_comp_nf, 20584, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5070_0_comp_nf, 20592, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5078_0_comp_nf, 20600, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5079_0_comp_nf, 20601, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_5080_0_comp_nf, 20608, 0 }, /* ADD */ +{ op_5088_0_comp_nf, 20616, 0 }, /* ADDA */ +{ op_5090_0_comp_nf, 20624, 0 }, /* ADD */ +{ op_5098_0_comp_nf, 20632, 0 }, /* ADD */ +{ op_50a0_0_comp_nf, 20640, 0 }, /* ADD */ +{ op_50a8_0_comp_nf, 20648, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_50b0_0_comp_nf, 20656, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_50b8_0_comp_nf, 20664, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_50b9_0_comp_nf, 20665, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_50c0_0_comp_nf, 20672, 0 }, /* Scc */ +{ op_50c8_0_comp_nf, 20680, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_50d0_0_comp_nf, 20688, 0 }, /* Scc */ +{ op_50d8_0_comp_nf, 20696, 0 }, /* Scc */ +{ op_50e0_0_comp_nf, 20704, 0 }, /* Scc */ +{ op_50e8_0_comp_nf, 20712, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_50f0_0_comp_nf, 20720, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_50f8_0_comp_nf, 20728, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_50f9_0_comp_nf, 20729, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 20730, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 20731, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 20732, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5100_0_comp_nf, 20736, 0 }, /* SUB */ +{ op_5110_0_comp_nf, 20752, 0 }, /* SUB */ +{ op_5118_0_comp_nf, 20760, 0 }, /* SUB */ +{ op_5120_0_comp_nf, 20768, 0 }, /* SUB */ +{ op_5128_0_comp_nf, 20776, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5130_0_comp_nf, 20784, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5138_0_comp_nf, 20792, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5139_0_comp_nf, 20793, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5140_0_comp_nf, 20800, 0 }, /* SUB */ +{ op_5148_0_comp_nf, 20808, 0 }, /* SUBA */ +{ op_5150_0_comp_nf, 20816, 0 }, /* SUB */ +{ op_5158_0_comp_nf, 20824, 0 }, /* SUB */ +{ op_5160_0_comp_nf, 20832, 0 }, /* SUB */ +{ op_5168_0_comp_nf, 20840, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5170_0_comp_nf, 20848, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5178_0_comp_nf, 20856, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5179_0_comp_nf, 20857, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_5180_0_comp_nf, 20864, 0 }, /* SUB */ +{ op_5188_0_comp_nf, 20872, 0 }, /* SUBA */ +{ op_5190_0_comp_nf, 20880, 0 }, /* SUB */ +{ op_5198_0_comp_nf, 20888, 0 }, /* SUB */ +{ op_51a0_0_comp_nf, 20896, 0 }, /* SUB */ +{ op_51a8_0_comp_nf, 20904, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_51b0_0_comp_nf, 20912, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_51b8_0_comp_nf, 20920, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_51b9_0_comp_nf, 20921, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_51c0_0_comp_nf, 20928, 0 }, /* Scc */ +{ op_51c8_0_comp_nf, 20936, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_51d0_0_comp_nf, 20944, 0 }, /* Scc */ +{ op_51d8_0_comp_nf, 20952, 0 }, /* Scc */ +{ op_51e0_0_comp_nf, 20960, 0 }, /* Scc */ +{ op_51e8_0_comp_nf, 20968, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_51f0_0_comp_nf, 20976, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_51f8_0_comp_nf, 20984, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_51f9_0_comp_nf, 20985, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 20986, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 20987, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 20988, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_52c0_0_comp_nf, 21184, 0 }, /* Scc */ +{ op_52c8_0_comp_nf, 21192, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_52d0_0_comp_nf, 21200, 0 }, /* Scc */ +{ op_52d8_0_comp_nf, 21208, 0 }, /* Scc */ +{ op_52e0_0_comp_nf, 21216, 0 }, /* Scc */ +{ op_52e8_0_comp_nf, 21224, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_52f0_0_comp_nf, 21232, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_52f8_0_comp_nf, 21240, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_52f9_0_comp_nf, 21241, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 21242, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21243, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21244, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_53c0_0_comp_nf, 21440, 0 }, /* Scc */ +{ op_53c8_0_comp_nf, 21448, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_53d0_0_comp_nf, 21456, 0 }, /* Scc */ +{ op_53d8_0_comp_nf, 21464, 0 }, /* Scc */ +{ op_53e0_0_comp_nf, 21472, 0 }, /* Scc */ +{ op_53e8_0_comp_nf, 21480, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_53f0_0_comp_nf, 21488, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_53f8_0_comp_nf, 21496, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_53f9_0_comp_nf, 21497, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 21498, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21499, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21500, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_54c0_0_comp_nf, 21696, 0 }, /* Scc */ +{ op_54c8_0_comp_nf, 21704, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_54d0_0_comp_nf, 21712, 0 }, /* Scc */ +{ op_54d8_0_comp_nf, 21720, 0 }, /* Scc */ +{ op_54e0_0_comp_nf, 21728, 0 }, /* Scc */ +{ op_54e8_0_comp_nf, 21736, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_54f0_0_comp_nf, 21744, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_54f8_0_comp_nf, 21752, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_54f9_0_comp_nf, 21753, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 21754, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21755, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 21756, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_55c0_0_comp_nf, 21952, 0 }, /* Scc */ +{ op_55c8_0_comp_nf, 21960, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_55d0_0_comp_nf, 21968, 0 }, /* Scc */ +{ op_55d8_0_comp_nf, 21976, 0 }, /* Scc */ +{ op_55e0_0_comp_nf, 21984, 0 }, /* Scc */ +{ op_55e8_0_comp_nf, 21992, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_55f0_0_comp_nf, 22000, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_55f8_0_comp_nf, 22008, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_55f9_0_comp_nf, 22009, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22010, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22011, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22012, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_56c0_0_comp_nf, 22208, 0 }, /* Scc */ +{ op_56c8_0_comp_nf, 22216, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_56d0_0_comp_nf, 22224, 0 }, /* Scc */ +{ op_56d8_0_comp_nf, 22232, 0 }, /* Scc */ +{ op_56e0_0_comp_nf, 22240, 0 }, /* Scc */ +{ op_56e8_0_comp_nf, 22248, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_56f0_0_comp_nf, 22256, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_56f8_0_comp_nf, 22264, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_56f9_0_comp_nf, 22265, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22266, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22267, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22268, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_57c0_0_comp_nf, 22464, 0 }, /* Scc */ +{ op_57c8_0_comp_nf, 22472, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_57d0_0_comp_nf, 22480, 0 }, /* Scc */ +{ op_57d8_0_comp_nf, 22488, 0 }, /* Scc */ +{ op_57e0_0_comp_nf, 22496, 0 }, /* Scc */ +{ op_57e8_0_comp_nf, 22504, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_57f0_0_comp_nf, 22512, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_57f8_0_comp_nf, 22520, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_57f9_0_comp_nf, 22521, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22522, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22523, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22524, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22720, 0 }, /* Scc */ +{ NULL, 22728, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ NULL, 22736, 0 }, /* Scc */ +{ NULL, 22744, 0 }, /* Scc */ +{ NULL, 22752, 0 }, /* Scc */ +{ NULL, 22760, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22768, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22776, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22777, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 22778, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22779, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22780, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 22976, 0 }, /* Scc */ +{ NULL, 22984, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ NULL, 22992, 0 }, /* Scc */ +{ NULL, 23000, 0 }, /* Scc */ +{ NULL, 23008, 0 }, /* Scc */ +{ NULL, 23016, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23024, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23032, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23033, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23034, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23035, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23036, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5ac0_0_comp_nf, 23232, 0 }, /* Scc */ +{ op_5ac8_0_comp_nf, 23240, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5ad0_0_comp_nf, 23248, 0 }, /* Scc */ +{ op_5ad8_0_comp_nf, 23256, 0 }, /* Scc */ +{ op_5ae0_0_comp_nf, 23264, 0 }, /* Scc */ +{ op_5ae8_0_comp_nf, 23272, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5af0_0_comp_nf, 23280, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5af8_0_comp_nf, 23288, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5af9_0_comp_nf, 23289, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23290, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23291, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23292, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5bc0_0_comp_nf, 23488, 0 }, /* Scc */ +{ op_5bc8_0_comp_nf, 23496, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5bd0_0_comp_nf, 23504, 0 }, /* Scc */ +{ op_5bd8_0_comp_nf, 23512, 0 }, /* Scc */ +{ op_5be0_0_comp_nf, 23520, 0 }, /* Scc */ +{ op_5be8_0_comp_nf, 23528, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5bf0_0_comp_nf, 23536, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5bf8_0_comp_nf, 23544, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5bf9_0_comp_nf, 23545, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23546, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23547, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23548, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5cc0_0_comp_nf, 23744, 0 }, /* Scc */ +{ op_5cc8_0_comp_nf, 23752, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5cd0_0_comp_nf, 23760, 0 }, /* Scc */ +{ op_5cd8_0_comp_nf, 23768, 0 }, /* Scc */ +{ op_5ce0_0_comp_nf, 23776, 0 }, /* Scc */ +{ op_5ce8_0_comp_nf, 23784, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5cf0_0_comp_nf, 23792, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5cf8_0_comp_nf, 23800, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5cf9_0_comp_nf, 23801, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 23802, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23803, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 23804, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5dc0_0_comp_nf, 24000, 0 }, /* Scc */ +{ op_5dc8_0_comp_nf, 24008, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5dd0_0_comp_nf, 24016, 0 }, /* Scc */ +{ op_5dd8_0_comp_nf, 24024, 0 }, /* Scc */ +{ op_5de0_0_comp_nf, 24032, 0 }, /* Scc */ +{ op_5de8_0_comp_nf, 24040, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5df0_0_comp_nf, 24048, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5df8_0_comp_nf, 24056, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5df9_0_comp_nf, 24057, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 24058, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24059, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24060, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5ec0_0_comp_nf, 24256, 0 }, /* Scc */ +{ op_5ec8_0_comp_nf, 24264, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5ed0_0_comp_nf, 24272, 0 }, /* Scc */ +{ op_5ed8_0_comp_nf, 24280, 0 }, /* Scc */ +{ op_5ee0_0_comp_nf, 24288, 0 }, /* Scc */ +{ op_5ee8_0_comp_nf, 24296, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ef0_0_comp_nf, 24304, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ef8_0_comp_nf, 24312, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ef9_0_comp_nf, 24313, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 24314, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24315, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24316, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_5fc0_0_comp_nf, 24512, 0 }, /* Scc */ +{ op_5fc8_0_comp_nf, 24520, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV }, /* DBcc */ +{ op_5fd0_0_comp_nf, 24528, 0 }, /* Scc */ +{ op_5fd8_0_comp_nf, 24536, 0 }, /* Scc */ +{ op_5fe0_0_comp_nf, 24544, 0 }, /* Scc */ +{ op_5fe8_0_comp_nf, 24552, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ff0_0_comp_nf, 24560, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ff8_0_comp_nf, 24568, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ op_5ff9_0_comp_nf, 24569, COMP_OPCODE_LONG_OPCODE }, /* Scc */ +{ NULL, 24570, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24571, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ NULL, 24572, COMP_OPCODE_ISJUMP }, /* TRAPcc */ +{ op_6000_0_comp_nf, 24576, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISCJUMP }, /* Bcc */ +{ op_6001_0_comp_nf, 24577, COMP_OPCODE_ISCJUMP }, /* Bcc */ +{ op_60ff_0_comp_nf, 24831, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISCJUMP }, /* Bcc */ +{ op_6100_0_comp_nf, 24832, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISCJUMP }, /* BSR */ +{ op_6101_0_comp_nf, 24833, COMP_OPCODE_ISCJUMP }, /* BSR */ +{ op_61ff_0_comp_nf, 25087, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_ISCJUMP }, /* BSR */ +{ op_6200_0_comp_nf, 25088, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6201_0_comp_nf, 25089, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_62ff_0_comp_nf, 25343, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6300_0_comp_nf, 25344, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6301_0_comp_nf, 25345, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_63ff_0_comp_nf, 25599, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6400_0_comp_nf, 25600, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6401_0_comp_nf, 25601, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_64ff_0_comp_nf, 25855, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6500_0_comp_nf, 25856, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6501_0_comp_nf, 25857, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_65ff_0_comp_nf, 26111, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6600_0_comp_nf, 26112, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6601_0_comp_nf, 26113, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_66ff_0_comp_nf, 26367, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6700_0_comp_nf, 26368, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6701_0_comp_nf, 26369, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_67ff_0_comp_nf, 26623, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ NULL, 26624, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ NULL, 26625, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ NULL, 26879, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ NULL, 26880, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ NULL, 26881, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ NULL, 27135, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6a00_0_comp_nf, 27136, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6a01_0_comp_nf, 27137, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6aff_0_comp_nf, 27391, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6b00_0_comp_nf, 27392, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6b01_0_comp_nf, 27393, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6bff_0_comp_nf, 27647, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6c00_0_comp_nf, 27648, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6c01_0_comp_nf, 27649, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6cff_0_comp_nf, 27903, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6d00_0_comp_nf, 27904, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6d01_0_comp_nf, 27905, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6dff_0_comp_nf, 28159, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6e00_0_comp_nf, 28160, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6e01_0_comp_nf, 28161, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6eff_0_comp_nf, 28415, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6f00_0_comp_nf, 28416, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_6f01_0_comp_nf, 28417, COMP_OPCODE_ISJUMP }, /* Bcc */ +{ op_6fff_0_comp_nf, 28671, COMP_OPCODE_ISJUMP|COMP_OPCODE_LONG_OPCODE }, /* Bcc */ +{ op_7000_0_comp_nf, 28672, 0 }, /* MOVE */ +{ op_8000_0_comp_nf, 32768, 0 }, /* OR */ +{ op_8010_0_comp_nf, 32784, 0 }, /* OR */ +{ op_8018_0_comp_nf, 32792, 0 }, /* OR */ +{ op_8020_0_comp_nf, 32800, 0 }, /* OR */ +{ op_8028_0_comp_nf, 32808, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8030_0_comp_nf, 32816, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8038_0_comp_nf, 32824, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8039_0_comp_nf, 32825, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_803a_0_comp_nf, 32826, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_803b_0_comp_nf, 32827, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_803c_0_comp_nf, 32828, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8040_0_comp_nf, 32832, 0 }, /* OR */ +{ op_8050_0_comp_nf, 32848, 0 }, /* OR */ +{ op_8058_0_comp_nf, 32856, 0 }, /* OR */ +{ op_8060_0_comp_nf, 32864, 0 }, /* OR */ +{ op_8068_0_comp_nf, 32872, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8070_0_comp_nf, 32880, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8078_0_comp_nf, 32888, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8079_0_comp_nf, 32889, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_807a_0_comp_nf, 32890, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_807b_0_comp_nf, 32891, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_807c_0_comp_nf, 32892, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8080_0_comp_nf, 32896, 0 }, /* OR */ +{ op_8090_0_comp_nf, 32912, 0 }, /* OR */ +{ op_8098_0_comp_nf, 32920, 0 }, /* OR */ +{ op_80a0_0_comp_nf, 32928, 0 }, /* OR */ +{ op_80a8_0_comp_nf, 32936, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80b0_0_comp_nf, 32944, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80b8_0_comp_nf, 32952, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80b9_0_comp_nf, 32953, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80ba_0_comp_nf, 32954, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80bb_0_comp_nf, 32955, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_80bc_0_comp_nf, 32956, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 32960, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 32976, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 32984, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 32992, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33000, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33008, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33016, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33017, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33018, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33019, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33020, COMP_OPCODE_ISJUMP }, /* DIVU */ +{ NULL, 33024, 0 }, /* SBCD */ +{ NULL, 33032, 0 }, /* SBCD */ +{ op_8110_0_comp_nf, 33040, 0 }, /* OR */ +{ op_8118_0_comp_nf, 33048, 0 }, /* OR */ +{ op_8120_0_comp_nf, 33056, 0 }, /* OR */ +{ op_8128_0_comp_nf, 33064, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8130_0_comp_nf, 33072, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8138_0_comp_nf, 33080, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8139_0_comp_nf, 33081, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 33088, 0 }, /* PACK */ +{ NULL, 33096, 0 }, /* PACK */ +{ op_8150_0_comp_nf, 33104, 0 }, /* OR */ +{ op_8158_0_comp_nf, 33112, 0 }, /* OR */ +{ op_8160_0_comp_nf, 33120, 0 }, /* OR */ +{ op_8168_0_comp_nf, 33128, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8170_0_comp_nf, 33136, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8178_0_comp_nf, 33144, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_8179_0_comp_nf, 33145, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 33152, 0 }, /* UNPK */ +{ NULL, 33160, 0 }, /* UNPK */ +{ op_8190_0_comp_nf, 33168, 0 }, /* OR */ +{ op_8198_0_comp_nf, 33176, 0 }, /* OR */ +{ op_81a0_0_comp_nf, 33184, 0 }, /* OR */ +{ op_81a8_0_comp_nf, 33192, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_81b0_0_comp_nf, 33200, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_81b8_0_comp_nf, 33208, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ op_81b9_0_comp_nf, 33209, COMP_OPCODE_LONG_OPCODE }, /* OR */ +{ NULL, 33216, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33232, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33240, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33248, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33256, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33264, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33272, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33273, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33274, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33275, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ NULL, 33276, COMP_OPCODE_ISJUMP }, /* DIVS */ +{ op_9000_0_comp_nf, 36864, 0 }, /* SUB */ +{ op_9010_0_comp_nf, 36880, 0 }, /* SUB */ +{ op_9018_0_comp_nf, 36888, 0 }, /* SUB */ +{ op_9020_0_comp_nf, 36896, 0 }, /* SUB */ +{ op_9028_0_comp_nf, 36904, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9030_0_comp_nf, 36912, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9038_0_comp_nf, 36920, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9039_0_comp_nf, 36921, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_903a_0_comp_nf, 36922, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_903b_0_comp_nf, 36923, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_903c_0_comp_nf, 36924, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9040_0_comp_nf, 36928, 0 }, /* SUB */ +{ op_9048_0_comp_nf, 36936, 0 }, /* SUB */ +{ op_9050_0_comp_nf, 36944, 0 }, /* SUB */ +{ op_9058_0_comp_nf, 36952, 0 }, /* SUB */ +{ op_9060_0_comp_nf, 36960, 0 }, /* SUB */ +{ op_9068_0_comp_nf, 36968, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9070_0_comp_nf, 36976, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9078_0_comp_nf, 36984, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9079_0_comp_nf, 36985, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_907a_0_comp_nf, 36986, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_907b_0_comp_nf, 36987, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_907c_0_comp_nf, 36988, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9080_0_comp_nf, 36992, 0 }, /* SUB */ +{ op_9088_0_comp_nf, 37000, 0 }, /* SUB */ +{ op_9090_0_comp_nf, 37008, 0 }, /* SUB */ +{ op_9098_0_comp_nf, 37016, 0 }, /* SUB */ +{ op_90a0_0_comp_nf, 37024, 0 }, /* SUB */ +{ op_90a8_0_comp_nf, 37032, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90b0_0_comp_nf, 37040, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90b8_0_comp_nf, 37048, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90b9_0_comp_nf, 37049, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90ba_0_comp_nf, 37050, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90bb_0_comp_nf, 37051, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90bc_0_comp_nf, 37052, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_90c0_0_comp_nf, 37056, 0 }, /* SUBA */ +{ op_90c8_0_comp_nf, 37064, 0 }, /* SUBA */ +{ op_90d0_0_comp_nf, 37072, 0 }, /* SUBA */ +{ op_90d8_0_comp_nf, 37080, 0 }, /* SUBA */ +{ op_90e0_0_comp_nf, 37088, 0 }, /* SUBA */ +{ op_90e8_0_comp_nf, 37096, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90f0_0_comp_nf, 37104, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90f8_0_comp_nf, 37112, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90f9_0_comp_nf, 37113, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90fa_0_comp_nf, 37114, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90fb_0_comp_nf, 37115, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_90fc_0_comp_nf, 37116, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_9100_0_comp_nf, 37120, COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9108_0_comp_nf, 37128, COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9110_0_comp_nf, 37136, 0 }, /* SUB */ +{ op_9118_0_comp_nf, 37144, 0 }, /* SUB */ +{ op_9120_0_comp_nf, 37152, 0 }, /* SUB */ +{ op_9128_0_comp_nf, 37160, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9130_0_comp_nf, 37168, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9138_0_comp_nf, 37176, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9139_0_comp_nf, 37177, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9140_0_comp_nf, 37184, COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9148_0_comp_nf, 37192, COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9150_0_comp_nf, 37200, 0 }, /* SUB */ +{ op_9158_0_comp_nf, 37208, 0 }, /* SUB */ +{ op_9160_0_comp_nf, 37216, 0 }, /* SUB */ +{ op_9168_0_comp_nf, 37224, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9170_0_comp_nf, 37232, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9178_0_comp_nf, 37240, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9179_0_comp_nf, 37241, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_9180_0_comp_nf, 37248, COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9188_0_comp_nf, 37256, COMP_OPCODE_ISADDX }, /* SUBX */ +{ op_9190_0_comp_nf, 37264, 0 }, /* SUB */ +{ op_9198_0_comp_nf, 37272, 0 }, /* SUB */ +{ op_91a0_0_comp_nf, 37280, 0 }, /* SUB */ +{ op_91a8_0_comp_nf, 37288, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_91b0_0_comp_nf, 37296, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_91b8_0_comp_nf, 37304, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_91b9_0_comp_nf, 37305, COMP_OPCODE_LONG_OPCODE }, /* SUB */ +{ op_91c0_0_comp_nf, 37312, 0 }, /* SUBA */ +{ op_91c8_0_comp_nf, 37320, 0 }, /* SUBA */ +{ op_91d0_0_comp_nf, 37328, 0 }, /* SUBA */ +{ op_91d8_0_comp_nf, 37336, 0 }, /* SUBA */ +{ op_91e0_0_comp_nf, 37344, 0 }, /* SUBA */ +{ op_91e8_0_comp_nf, 37352, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91f0_0_comp_nf, 37360, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91f8_0_comp_nf, 37368, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91f9_0_comp_nf, 37369, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91fa_0_comp_nf, 37370, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91fb_0_comp_nf, 37371, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_91fc_0_comp_nf, 37372, COMP_OPCODE_LONG_OPCODE }, /* SUBA */ +{ op_b000_0_comp_nf, 45056, 0 }, /* CMP */ +{ op_b010_0_comp_nf, 45072, 0 }, /* CMP */ +{ op_b018_0_comp_nf, 45080, 0 }, /* CMP */ +{ op_b020_0_comp_nf, 45088, 0 }, /* CMP */ +{ op_b028_0_comp_nf, 45096, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b030_0_comp_nf, 45104, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b038_0_comp_nf, 45112, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b039_0_comp_nf, 45113, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b03a_0_comp_nf, 45114, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b03b_0_comp_nf, 45115, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b03c_0_comp_nf, 45116, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b040_0_comp_nf, 45120, 0 }, /* CMP */ +{ op_b048_0_comp_nf, 45128, 0 }, /* CMP */ +{ op_b050_0_comp_nf, 45136, 0 }, /* CMP */ +{ op_b058_0_comp_nf, 45144, 0 }, /* CMP */ +{ op_b060_0_comp_nf, 45152, 0 }, /* CMP */ +{ op_b068_0_comp_nf, 45160, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b070_0_comp_nf, 45168, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b078_0_comp_nf, 45176, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b079_0_comp_nf, 45177, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b07a_0_comp_nf, 45178, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b07b_0_comp_nf, 45179, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b07c_0_comp_nf, 45180, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b080_0_comp_nf, 45184, 0 }, /* CMP */ +{ op_b088_0_comp_nf, 45192, 0 }, /* CMP */ +{ op_b090_0_comp_nf, 45200, 0 }, /* CMP */ +{ op_b098_0_comp_nf, 45208, 0 }, /* CMP */ +{ op_b0a0_0_comp_nf, 45216, 0 }, /* CMP */ +{ op_b0a8_0_comp_nf, 45224, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0b0_0_comp_nf, 45232, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0b8_0_comp_nf, 45240, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0b9_0_comp_nf, 45241, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0ba_0_comp_nf, 45242, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0bb_0_comp_nf, 45243, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0bc_0_comp_nf, 45244, COMP_OPCODE_LONG_OPCODE }, /* CMP */ +{ op_b0c0_0_comp_nf, 45248, 0 }, /* CMPA */ +{ op_b0c8_0_comp_nf, 45256, 0 }, /* CMPA */ +{ op_b0d0_0_comp_nf, 45264, 0 }, /* CMPA */ +{ op_b0d8_0_comp_nf, 45272, 0 }, /* CMPA */ +{ op_b0e0_0_comp_nf, 45280, 0 }, /* CMPA */ +{ op_b0e8_0_comp_nf, 45288, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0f0_0_comp_nf, 45296, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0f8_0_comp_nf, 45304, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0f9_0_comp_nf, 45305, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0fa_0_comp_nf, 45306, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0fb_0_comp_nf, 45307, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b0fc_0_comp_nf, 45308, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b100_0_comp_nf, 45312, 0 }, /* EOR */ +{ op_b108_0_comp_nf, 45320, 0 }, /* CMPM */ +{ op_b110_0_comp_nf, 45328, 0 }, /* EOR */ +{ op_b118_0_comp_nf, 45336, 0 }, /* EOR */ +{ op_b120_0_comp_nf, 45344, 0 }, /* EOR */ +{ op_b128_0_comp_nf, 45352, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b130_0_comp_nf, 45360, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b138_0_comp_nf, 45368, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b139_0_comp_nf, 45369, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b140_0_comp_nf, 45376, 0 }, /* EOR */ +{ op_b148_0_comp_nf, 45384, 0 }, /* CMPM */ +{ op_b150_0_comp_nf, 45392, 0 }, /* EOR */ +{ op_b158_0_comp_nf, 45400, 0 }, /* EOR */ +{ op_b160_0_comp_nf, 45408, 0 }, /* EOR */ +{ op_b168_0_comp_nf, 45416, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b170_0_comp_nf, 45424, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b178_0_comp_nf, 45432, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b179_0_comp_nf, 45433, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b180_0_comp_nf, 45440, 0 }, /* EOR */ +{ op_b188_0_comp_nf, 45448, 0 }, /* CMPM */ +{ op_b190_0_comp_nf, 45456, 0 }, /* EOR */ +{ op_b198_0_comp_nf, 45464, 0 }, /* EOR */ +{ op_b1a0_0_comp_nf, 45472, 0 }, /* EOR */ +{ op_b1a8_0_comp_nf, 45480, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b1b0_0_comp_nf, 45488, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b1b8_0_comp_nf, 45496, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b1b9_0_comp_nf, 45497, COMP_OPCODE_LONG_OPCODE }, /* EOR */ +{ op_b1c0_0_comp_nf, 45504, 0 }, /* CMPA */ +{ op_b1c8_0_comp_nf, 45512, 0 }, /* CMPA */ +{ op_b1d0_0_comp_nf, 45520, 0 }, /* CMPA */ +{ op_b1d8_0_comp_nf, 45528, 0 }, /* CMPA */ +{ op_b1e0_0_comp_nf, 45536, 0 }, /* CMPA */ +{ op_b1e8_0_comp_nf, 45544, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1f0_0_comp_nf, 45552, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1f8_0_comp_nf, 45560, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1f9_0_comp_nf, 45561, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1fa_0_comp_nf, 45562, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1fb_0_comp_nf, 45563, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_b1fc_0_comp_nf, 45564, COMP_OPCODE_LONG_OPCODE }, /* CMPA */ +{ op_c000_0_comp_nf, 49152, 0 }, /* AND */ +{ op_c010_0_comp_nf, 49168, 0 }, /* AND */ +{ op_c018_0_comp_nf, 49176, 0 }, /* AND */ +{ op_c020_0_comp_nf, 49184, 0 }, /* AND */ +{ op_c028_0_comp_nf, 49192, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c030_0_comp_nf, 49200, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c038_0_comp_nf, 49208, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c039_0_comp_nf, 49209, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c03a_0_comp_nf, 49210, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c03b_0_comp_nf, 49211, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c03c_0_comp_nf, 49212, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c040_0_comp_nf, 49216, 0 }, /* AND */ +{ op_c050_0_comp_nf, 49232, 0 }, /* AND */ +{ op_c058_0_comp_nf, 49240, 0 }, /* AND */ +{ op_c060_0_comp_nf, 49248, 0 }, /* AND */ +{ op_c068_0_comp_nf, 49256, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c070_0_comp_nf, 49264, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c078_0_comp_nf, 49272, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c079_0_comp_nf, 49273, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c07a_0_comp_nf, 49274, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c07b_0_comp_nf, 49275, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c07c_0_comp_nf, 49276, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c080_0_comp_nf, 49280, 0 }, /* AND */ +{ op_c090_0_comp_nf, 49296, 0 }, /* AND */ +{ op_c098_0_comp_nf, 49304, 0 }, /* AND */ +{ op_c0a0_0_comp_nf, 49312, 0 }, /* AND */ +{ op_c0a8_0_comp_nf, 49320, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0b0_0_comp_nf, 49328, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0b8_0_comp_nf, 49336, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0b9_0_comp_nf, 49337, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0ba_0_comp_nf, 49338, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0bb_0_comp_nf, 49339, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0bc_0_comp_nf, 49340, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c0c0_0_comp_nf, 49344, 0 }, /* MULU */ +{ op_c0d0_0_comp_nf, 49360, 0 }, /* MULU */ +{ op_c0d8_0_comp_nf, 49368, 0 }, /* MULU */ +{ op_c0e0_0_comp_nf, 49376, 0 }, /* MULU */ +{ op_c0e8_0_comp_nf, 49384, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0f0_0_comp_nf, 49392, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0f8_0_comp_nf, 49400, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0f9_0_comp_nf, 49401, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0fa_0_comp_nf, 49402, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0fb_0_comp_nf, 49403, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ op_c0fc_0_comp_nf, 49404, COMP_OPCODE_LONG_OPCODE }, /* MULU */ +{ NULL, 49408, 0 }, /* ABCD */ +{ NULL, 49416, 0 }, /* ABCD */ +{ op_c110_0_comp_nf, 49424, 0 }, /* AND */ +{ op_c118_0_comp_nf, 49432, 0 }, /* AND */ +{ op_c120_0_comp_nf, 49440, 0 }, /* AND */ +{ op_c128_0_comp_nf, 49448, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c130_0_comp_nf, 49456, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c138_0_comp_nf, 49464, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c139_0_comp_nf, 49465, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c140_0_comp_nf, 49472, 0 }, /* EXG */ +{ op_c148_0_comp_nf, 49480, 0 }, /* EXG */ +{ op_c150_0_comp_nf, 49488, 0 }, /* AND */ +{ op_c158_0_comp_nf, 49496, 0 }, /* AND */ +{ op_c160_0_comp_nf, 49504, 0 }, /* AND */ +{ op_c168_0_comp_nf, 49512, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c170_0_comp_nf, 49520, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c178_0_comp_nf, 49528, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c179_0_comp_nf, 49529, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c188_0_comp_nf, 49544, 0 }, /* EXG */ +{ op_c190_0_comp_nf, 49552, 0 }, /* AND */ +{ op_c198_0_comp_nf, 49560, 0 }, /* AND */ +{ op_c1a0_0_comp_nf, 49568, 0 }, /* AND */ +{ op_c1a8_0_comp_nf, 49576, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c1b0_0_comp_nf, 49584, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c1b8_0_comp_nf, 49592, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c1b9_0_comp_nf, 49593, COMP_OPCODE_LONG_OPCODE }, /* AND */ +{ op_c1c0_0_comp_nf, 49600, 0 }, /* MULS */ +{ op_c1d0_0_comp_nf, 49616, 0 }, /* MULS */ +{ op_c1d8_0_comp_nf, 49624, 0 }, /* MULS */ +{ op_c1e0_0_comp_nf, 49632, 0 }, /* MULS */ +{ op_c1e8_0_comp_nf, 49640, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1f0_0_comp_nf, 49648, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1f8_0_comp_nf, 49656, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1f9_0_comp_nf, 49657, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1fa_0_comp_nf, 49658, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1fb_0_comp_nf, 49659, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_c1fc_0_comp_nf, 49660, COMP_OPCODE_LONG_OPCODE }, /* MULS */ +{ op_d000_0_comp_nf, 53248, 0 }, /* ADD */ +{ op_d010_0_comp_nf, 53264, 0 }, /* ADD */ +{ op_d018_0_comp_nf, 53272, 0 }, /* ADD */ +{ op_d020_0_comp_nf, 53280, 0 }, /* ADD */ +{ op_d028_0_comp_nf, 53288, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d030_0_comp_nf, 53296, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d038_0_comp_nf, 53304, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d039_0_comp_nf, 53305, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d03a_0_comp_nf, 53306, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d03b_0_comp_nf, 53307, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d03c_0_comp_nf, 53308, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d040_0_comp_nf, 53312, 0 }, /* ADD */ +{ op_d048_0_comp_nf, 53320, 0 }, /* ADD */ +{ op_d050_0_comp_nf, 53328, 0 }, /* ADD */ +{ op_d058_0_comp_nf, 53336, 0 }, /* ADD */ +{ op_d060_0_comp_nf, 53344, 0 }, /* ADD */ +{ op_d068_0_comp_nf, 53352, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d070_0_comp_nf, 53360, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d078_0_comp_nf, 53368, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d079_0_comp_nf, 53369, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d07a_0_comp_nf, 53370, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d07b_0_comp_nf, 53371, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d07c_0_comp_nf, 53372, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d080_0_comp_nf, 53376, 0 }, /* ADD */ +{ op_d088_0_comp_nf, 53384, 0 }, /* ADD */ +{ op_d090_0_comp_nf, 53392, 0 }, /* ADD */ +{ op_d098_0_comp_nf, 53400, 0 }, /* ADD */ +{ op_d0a0_0_comp_nf, 53408, 0 }, /* ADD */ +{ op_d0a8_0_comp_nf, 53416, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0b0_0_comp_nf, 53424, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0b8_0_comp_nf, 53432, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0b9_0_comp_nf, 53433, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0ba_0_comp_nf, 53434, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0bb_0_comp_nf, 53435, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0bc_0_comp_nf, 53436, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d0c0_0_comp_nf, 53440, 0 }, /* ADDA */ +{ op_d0c8_0_comp_nf, 53448, 0 }, /* ADDA */ +{ op_d0d0_0_comp_nf, 53456, 0 }, /* ADDA */ +{ op_d0d8_0_comp_nf, 53464, 0 }, /* ADDA */ +{ op_d0e0_0_comp_nf, 53472, 0 }, /* ADDA */ +{ op_d0e8_0_comp_nf, 53480, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0f0_0_comp_nf, 53488, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0f8_0_comp_nf, 53496, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0f9_0_comp_nf, 53497, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0fa_0_comp_nf, 53498, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0fb_0_comp_nf, 53499, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d0fc_0_comp_nf, 53500, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d100_0_comp_nf, 53504, COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d108_0_comp_nf, 53512, COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d110_0_comp_nf, 53520, 0 }, /* ADD */ +{ op_d118_0_comp_nf, 53528, 0 }, /* ADD */ +{ op_d120_0_comp_nf, 53536, 0 }, /* ADD */ +{ op_d128_0_comp_nf, 53544, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d130_0_comp_nf, 53552, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d138_0_comp_nf, 53560, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d139_0_comp_nf, 53561, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d140_0_comp_nf, 53568, COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d148_0_comp_nf, 53576, COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d150_0_comp_nf, 53584, 0 }, /* ADD */ +{ op_d158_0_comp_nf, 53592, 0 }, /* ADD */ +{ op_d160_0_comp_nf, 53600, 0 }, /* ADD */ +{ op_d168_0_comp_nf, 53608, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d170_0_comp_nf, 53616, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d178_0_comp_nf, 53624, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d179_0_comp_nf, 53625, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d180_0_comp_nf, 53632, COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d188_0_comp_nf, 53640, COMP_OPCODE_ISADDX }, /* ADDX */ +{ op_d190_0_comp_nf, 53648, 0 }, /* ADD */ +{ op_d198_0_comp_nf, 53656, 0 }, /* ADD */ +{ op_d1a0_0_comp_nf, 53664, 0 }, /* ADD */ +{ op_d1a8_0_comp_nf, 53672, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d1b0_0_comp_nf, 53680, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d1b8_0_comp_nf, 53688, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d1b9_0_comp_nf, 53689, COMP_OPCODE_LONG_OPCODE }, /* ADD */ +{ op_d1c0_0_comp_nf, 53696, 0 }, /* ADDA */ +{ op_d1c8_0_comp_nf, 53704, 0 }, /* ADDA */ +{ op_d1d0_0_comp_nf, 53712, 0 }, /* ADDA */ +{ op_d1d8_0_comp_nf, 53720, 0 }, /* ADDA */ +{ op_d1e0_0_comp_nf, 53728, 0 }, /* ADDA */ +{ op_d1e8_0_comp_nf, 53736, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1f0_0_comp_nf, 53744, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1f8_0_comp_nf, 53752, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1f9_0_comp_nf, 53753, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1fa_0_comp_nf, 53754, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1fb_0_comp_nf, 53755, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_d1fc_0_comp_nf, 53756, COMP_OPCODE_LONG_OPCODE }, /* ADDA */ +{ op_e000_0_comp_nf, 57344, 0 }, /* ASR */ +{ op_e008_0_comp_nf, 57352, 0 }, /* LSR */ +{ NULL, 57360, 0 }, /* ROXR */ +{ op_e018_0_comp_nf, 57368, 0 }, /* ROR */ +{ op_e020_0_comp_nf, 57376, COMP_OPCODE_CMOV }, /* ASR */ +{ op_e028_0_comp_nf, 57384, COMP_OPCODE_CMOV }, /* LSR */ +{ NULL, 57392, 0 }, /* ROXR */ +{ op_e038_0_comp_nf, 57400, 0 }, /* ROR */ +{ op_e040_0_comp_nf, 57408, 0 }, /* ASR */ +{ op_e048_0_comp_nf, 57416, 0 }, /* LSR */ +{ NULL, 57424, 0 }, /* ROXR */ +{ op_e058_0_comp_nf, 57432, 0 }, /* ROR */ +{ op_e060_0_comp_nf, 57440, COMP_OPCODE_CMOV }, /* ASR */ +{ op_e068_0_comp_nf, 57448, COMP_OPCODE_CMOV }, /* LSR */ +{ NULL, 57456, 0 }, /* ROXR */ +{ op_e078_0_comp_nf, 57464, 0 }, /* ROR */ +{ op_e080_0_comp_nf, 57472, 0 }, /* ASR */ +{ op_e088_0_comp_nf, 57480, 0 }, /* LSR */ +{ NULL, 57488, 0 }, /* ROXR */ +{ op_e098_0_comp_nf, 57496, 0 }, /* ROR */ +{ op_e0a0_0_comp_nf, 57504, COMP_OPCODE_CMOV }, /* ASR */ +{ op_e0a8_0_comp_nf, 57512, COMP_OPCODE_CMOV }, /* LSR */ +{ NULL, 57520, 0 }, /* ROXR */ +{ op_e0b8_0_comp_nf, 57528, 0 }, /* ROR */ +{ NULL, 57552, 0 }, /* ASRW */ +{ NULL, 57560, 0 }, /* ASRW */ +{ NULL, 57568, 0 }, /* ASRW */ +{ NULL, 57576, 0 }, /* ASRW */ +{ NULL, 57584, 0 }, /* ASRW */ +{ NULL, 57592, 0 }, /* ASRW */ +{ NULL, 57593, 0 }, /* ASRW */ +{ op_e100_0_comp_nf, 57600, 0 }, /* ASL */ +{ op_e108_0_comp_nf, 57608, 0 }, /* LSL */ +{ NULL, 57616, 0 }, /* ROXL */ +{ op_e118_0_comp_nf, 57624, 0 }, /* ROL */ +{ op_e120_0_comp_nf, 57632, COMP_OPCODE_CMOV }, /* ASL */ +{ op_e128_0_comp_nf, 57640, COMP_OPCODE_CMOV }, /* LSL */ +{ NULL, 57648, 0 }, /* ROXL */ +{ op_e138_0_comp_nf, 57656, 0 }, /* ROL */ +{ op_e140_0_comp_nf, 57664, 0 }, /* ASL */ +{ op_e148_0_comp_nf, 57672, 0 }, /* LSL */ +{ NULL, 57680, 0 }, /* ROXL */ +{ op_e158_0_comp_nf, 57688, 0 }, /* ROL */ +{ op_e160_0_comp_nf, 57696, COMP_OPCODE_CMOV }, /* ASL */ +{ op_e168_0_comp_nf, 57704, COMP_OPCODE_CMOV }, /* LSL */ +{ NULL, 57712, 0 }, /* ROXL */ +{ op_e178_0_comp_nf, 57720, 0 }, /* ROL */ +{ op_e180_0_comp_nf, 57728, 0 }, /* ASL */ +{ op_e188_0_comp_nf, 57736, 0 }, /* LSL */ +{ NULL, 57744, 0 }, /* ROXL */ +{ op_e198_0_comp_nf, 57752, 0 }, /* ROL */ +{ op_e1a0_0_comp_nf, 57760, COMP_OPCODE_CMOV }, /* ASL */ +{ op_e1a8_0_comp_nf, 57768, COMP_OPCODE_CMOV }, /* LSL */ +{ NULL, 57776, 0 }, /* ROXL */ +{ op_e1b8_0_comp_nf, 57784, 0 }, /* ROL */ +{ NULL, 57808, 0 }, /* ASLW */ +{ NULL, 57816, 0 }, /* ASLW */ +{ NULL, 57824, 0 }, /* ASLW */ +{ NULL, 57832, 0 }, /* ASLW */ +{ NULL, 57840, 0 }, /* ASLW */ +{ NULL, 57848, 0 }, /* ASLW */ +{ NULL, 57849, 0 }, /* ASLW */ +{ NULL, 58064, 0 }, /* LSRW */ +{ NULL, 58072, 0 }, /* LSRW */ +{ NULL, 58080, 0 }, /* LSRW */ +{ NULL, 58088, 0 }, /* LSRW */ +{ NULL, 58096, 0 }, /* LSRW */ +{ NULL, 58104, 0 }, /* LSRW */ +{ NULL, 58105, 0 }, /* LSRW */ +{ NULL, 58320, 0 }, /* LSLW */ +{ NULL, 58328, 0 }, /* LSLW */ +{ NULL, 58336, 0 }, /* LSLW */ +{ NULL, 58344, 0 }, /* LSLW */ +{ NULL, 58352, 0 }, /* LSLW */ +{ NULL, 58360, 0 }, /* LSLW */ +{ NULL, 58361, 0 }, /* LSLW */ +{ NULL, 58576, 0 }, /* ROXRW */ +{ NULL, 58584, 0 }, /* ROXRW */ +{ NULL, 58592, 0 }, /* ROXRW */ +{ NULL, 58600, 0 }, /* ROXRW */ +{ NULL, 58608, 0 }, /* ROXRW */ +{ NULL, 58616, 0 }, /* ROXRW */ +{ NULL, 58617, 0 }, /* ROXRW */ +{ NULL, 58832, 0 }, /* ROXLW */ +{ NULL, 58840, 0 }, /* ROXLW */ +{ NULL, 58848, 0 }, /* ROXLW */ +{ NULL, 58856, 0 }, /* ROXLW */ +{ NULL, 58864, 0 }, /* ROXLW */ +{ NULL, 58872, 0 }, /* ROXLW */ +{ NULL, 58873, 0 }, /* ROXLW */ +{ NULL, 59088, 0 }, /* RORW */ +{ NULL, 59096, 0 }, /* RORW */ +{ NULL, 59104, 0 }, /* RORW */ +{ NULL, 59112, 0 }, /* RORW */ +{ NULL, 59120, 0 }, /* RORW */ +{ NULL, 59128, 0 }, /* RORW */ +{ NULL, 59129, 0 }, /* RORW */ +{ NULL, 59344, 0 }, /* ROLW */ +{ NULL, 59352, 0 }, /* ROLW */ +{ NULL, 59360, 0 }, /* ROLW */ +{ NULL, 59368, 0 }, /* ROLW */ +{ NULL, 59376, 0 }, /* ROLW */ +{ NULL, 59384, 0 }, /* ROLW */ +{ NULL, 59385, 0 }, /* ROLW */ +{ NULL, 59584, 0 }, /* BFTST */ +{ NULL, 59600, 0 }, /* BFTST */ +{ NULL, 59624, 0 }, /* BFTST */ +{ NULL, 59632, 0 }, /* BFTST */ +{ NULL, 59640, 0 }, /* BFTST */ +{ NULL, 59641, 0 }, /* BFTST */ +{ NULL, 59642, 0 }, /* BFTST */ +{ NULL, 59643, 0 }, /* BFTST */ +{ NULL, 59840, 0 }, /* BFEXTU */ +{ NULL, 59856, 0 }, /* BFEXTU */ +{ NULL, 59880, 0 }, /* BFEXTU */ +{ NULL, 59888, 0 }, /* BFEXTU */ +{ NULL, 59896, 0 }, /* BFEXTU */ +{ NULL, 59897, 0 }, /* BFEXTU */ +{ NULL, 59898, 0 }, /* BFEXTU */ +{ NULL, 59899, 0 }, /* BFEXTU */ +{ NULL, 60096, 0 }, /* BFCHG */ +{ NULL, 60112, 0 }, /* BFCHG */ +{ NULL, 60136, 0 }, /* BFCHG */ +{ NULL, 60144, 0 }, /* BFCHG */ +{ NULL, 60152, 0 }, /* BFCHG */ +{ NULL, 60153, 0 }, /* BFCHG */ +{ NULL, 60352, 0 }, /* BFEXTS */ +{ NULL, 60368, 0 }, /* BFEXTS */ +{ NULL, 60392, 0 }, /* BFEXTS */ +{ NULL, 60400, 0 }, /* BFEXTS */ +{ NULL, 60408, 0 }, /* BFEXTS */ +{ NULL, 60409, 0 }, /* BFEXTS */ +{ NULL, 60410, 0 }, /* BFEXTS */ +{ NULL, 60411, 0 }, /* BFEXTS */ +{ NULL, 60608, 0 }, /* BFCLR */ +{ NULL, 60624, 0 }, /* BFCLR */ +{ NULL, 60648, 0 }, /* BFCLR */ +{ NULL, 60656, 0 }, /* BFCLR */ +{ NULL, 60664, 0 }, /* BFCLR */ +{ NULL, 60665, 0 }, /* BFCLR */ +{ NULL, 60864, 0 }, /* BFFFO */ +{ NULL, 60880, 0 }, /* BFFFO */ +{ NULL, 60904, 0 }, /* BFFFO */ +{ NULL, 60912, 0 }, /* BFFFO */ +{ NULL, 60920, 0 }, /* BFFFO */ +{ NULL, 60921, 0 }, /* BFFFO */ +{ NULL, 60922, 0 }, /* BFFFO */ +{ NULL, 60923, 0 }, /* BFFFO */ +{ NULL, 61120, 0 }, /* BFSET */ +{ NULL, 61136, 0 }, /* BFSET */ +{ NULL, 61160, 0 }, /* BFSET */ +{ NULL, 61168, 0 }, /* BFSET */ +{ NULL, 61176, 0 }, /* BFSET */ +{ NULL, 61177, 0 }, /* BFSET */ +{ NULL, 61376, 0 }, /* BFINS */ +{ NULL, 61392, 0 }, /* BFINS */ +{ NULL, 61416, 0 }, /* BFINS */ +{ NULL, 61424, 0 }, /* BFINS */ +{ NULL, 61432, 0 }, /* BFINS */ +{ NULL, 61433, 0 }, /* BFINS */ +{ NULL, 61440, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61448, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61456, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61464, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61472, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61480, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61488, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61496, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ NULL, 61497, COMP_OPCODE_ISJUMP }, /* MMUOP030 */ +{ op_f200_0_comp_nf, 61952, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f208_0_comp_nf, 61960, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f210_0_comp_nf, 61968, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f218_0_comp_nf, 61976, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f220_0_comp_nf, 61984, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f228_0_comp_nf, 61992, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f230_0_comp_nf, 62000, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f238_0_comp_nf, 62008, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f239_0_comp_nf, 62009, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f23a_0_comp_nf, 62010, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f23b_0_comp_nf, 62011, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f23c_0_comp_nf, 62012, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_USES_FPU }, /* FPP */ +{ op_f240_0_comp_nf, 62016, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ NULL, 62024, COMP_OPCODE_ISJUMP|COMP_OPCODE_USES_FPU }, /* FDBcc */ +{ op_f250_0_comp_nf, 62032, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f258_0_comp_nf, 62040, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f260_0_comp_nf, 62048, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f268_0_comp_nf, 62056, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f270_0_comp_nf, 62064, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f278_0_comp_nf, 62072, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ op_f279_0_comp_nf, 62073, COMP_OPCODE_LONG_OPCODE|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FScc */ +{ NULL, 62074, COMP_OPCODE_ISJUMP|COMP_OPCODE_USES_FPU }, /* FTRAPcc */ +{ NULL, 62075, COMP_OPCODE_ISJUMP|COMP_OPCODE_USES_FPU }, /* FTRAPcc */ +{ NULL, 62076, COMP_OPCODE_ISJUMP|COMP_OPCODE_USES_FPU }, /* FTRAPcc */ +{ op_f280_0_comp_nf, 62080, COMP_OPCODE_ISJUMP|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FBcc */ +{ op_f2c0_0_comp_nf, 62144, COMP_OPCODE_ISJUMP|COMP_OPCODE_CMOV|COMP_OPCODE_USES_FPU }, /* FBcc */ +{ NULL, 62224, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62240, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62248, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62256, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62264, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62265, COMP_OPCODE_USES_FPU }, /* FSAVE */ +{ NULL, 62288, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62296, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62312, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62320, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62328, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62329, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62330, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62331, COMP_OPCODE_USES_FPU }, /* FRESTORE */ +{ NULL, 62472, COMP_OPCODE_ISJUMP }, /* CINVL */ +{ NULL, 62480, COMP_OPCODE_ISJUMP }, /* CINVP */ +{ NULL, 62488, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62489, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62490, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62491, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62492, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62493, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62494, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62495, COMP_OPCODE_ISJUMP }, /* CINVA */ +{ NULL, 62504, COMP_OPCODE_ISJUMP }, /* CPUSHL */ +{ NULL, 62512, COMP_OPCODE_ISJUMP }, /* CPUSHP */ +{ NULL, 62520, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62521, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62522, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62523, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62524, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62525, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62526, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62527, COMP_OPCODE_ISJUMP }, /* CPUSHA */ +{ NULL, 62720, COMP_OPCODE_ISJUMP }, /* PFLUSHN */ +{ NULL, 62728, COMP_OPCODE_ISJUMP }, /* PFLUSH */ +{ NULL, 62736, COMP_OPCODE_ISJUMP }, /* PFLUSHAN */ +{ NULL, 62744, COMP_OPCODE_ISJUMP }, /* PFLUSHA */ +{ NULL, 62792, COMP_OPCODE_ISJUMP }, /* PTESTW */ +{ NULL, 62824, COMP_OPCODE_ISJUMP }, /* PTESTR */ +{ NULL, 62856, COMP_OPCODE_ISJUMP }, /* PLPAW */ +{ NULL, 62920, COMP_OPCODE_ISJUMP }, /* PLPAR */ +{ op_f600_0_comp_nf, 62976, COMP_OPCODE_LONG_OPCODE }, /* MOVE16 */ +{ op_f608_0_comp_nf, 62984, COMP_OPCODE_LONG_OPCODE }, /* MOVE16 */ +{ op_f610_0_comp_nf, 62992, COMP_OPCODE_LONG_OPCODE }, /* MOVE16 */ +{ op_f618_0_comp_nf, 63000, COMP_OPCODE_LONG_OPCODE }, /* MOVE16 */ +{ op_f620_0_comp_nf, 63008, COMP_OPCODE_LONG_OPCODE }, /* MOVE16 */ +{ NULL, 63488, COMP_OPCODE_ISJUMP }, /* LPSTOP */ +{ 0, 65536, 0 }}; +#endif diff --git a/src/jit/x86/comptbl_x86.h b/src/jit/x86/comptbl_x86.h new file mode 100644 index 000000000..c1adbfc8f --- /dev/null +++ b/src/jit/x86/comptbl_x86.h @@ -0,0 +1,2803 @@ +extern const struct comptbl op_smalltbl_0_comp_nf[]; +extern const struct comptbl op_smalltbl_0_comp_ff[]; +extern compop_func op_0_0_comp_ff; +extern compop_func op_10_0_comp_ff; +extern compop_func op_18_0_comp_ff; +extern compop_func op_20_0_comp_ff; +extern compop_func op_28_0_comp_ff; +extern compop_func op_30_0_comp_ff; +extern compop_func op_38_0_comp_ff; +extern compop_func op_39_0_comp_ff; +extern compop_func op_40_0_comp_ff; +extern compop_func op_50_0_comp_ff; +extern compop_func op_58_0_comp_ff; +extern compop_func op_60_0_comp_ff; +extern compop_func op_68_0_comp_ff; +extern compop_func op_70_0_comp_ff; +extern compop_func op_78_0_comp_ff; +extern compop_func op_79_0_comp_ff; +extern compop_func op_80_0_comp_ff; +extern compop_func op_90_0_comp_ff; +extern compop_func op_98_0_comp_ff; +extern compop_func op_a0_0_comp_ff; +extern compop_func op_a8_0_comp_ff; +extern compop_func op_b0_0_comp_ff; +extern compop_func op_b8_0_comp_ff; +extern compop_func op_b9_0_comp_ff; +extern compop_func op_100_0_comp_ff; +extern compop_func op_110_0_comp_ff; +extern compop_func op_118_0_comp_ff; +extern compop_func op_120_0_comp_ff; +extern compop_func op_128_0_comp_ff; +extern compop_func op_130_0_comp_ff; +extern compop_func op_138_0_comp_ff; +extern compop_func op_139_0_comp_ff; +extern compop_func op_13a_0_comp_ff; +extern compop_func op_13b_0_comp_ff; +extern compop_func op_13c_0_comp_ff; +extern compop_func op_140_0_comp_ff; +extern compop_func op_150_0_comp_ff; +extern compop_func op_158_0_comp_ff; +extern compop_func op_160_0_comp_ff; +extern compop_func op_168_0_comp_ff; +extern compop_func op_170_0_comp_ff; +extern compop_func op_178_0_comp_ff; +extern compop_func op_179_0_comp_ff; +extern compop_func op_180_0_comp_ff; +extern compop_func op_190_0_comp_ff; +extern compop_func op_198_0_comp_ff; +extern compop_func op_1a0_0_comp_ff; +extern compop_func op_1a8_0_comp_ff; +extern compop_func op_1b0_0_comp_ff; +extern compop_func op_1b8_0_comp_ff; +extern compop_func op_1b9_0_comp_ff; +extern compop_func op_1c0_0_comp_ff; +extern compop_func op_1d0_0_comp_ff; +extern compop_func op_1d8_0_comp_ff; +extern compop_func op_1e0_0_comp_ff; +extern compop_func op_1e8_0_comp_ff; +extern compop_func op_1f0_0_comp_ff; +extern compop_func op_1f8_0_comp_ff; +extern compop_func op_1f9_0_comp_ff; +extern compop_func op_200_0_comp_ff; +extern compop_func op_210_0_comp_ff; +extern compop_func op_218_0_comp_ff; +extern compop_func op_220_0_comp_ff; +extern compop_func op_228_0_comp_ff; +extern compop_func op_230_0_comp_ff; +extern compop_func op_238_0_comp_ff; +extern compop_func op_239_0_comp_ff; +extern compop_func op_240_0_comp_ff; +extern compop_func op_250_0_comp_ff; +extern compop_func op_258_0_comp_ff; +extern compop_func op_260_0_comp_ff; +extern compop_func op_268_0_comp_ff; +extern compop_func op_270_0_comp_ff; +extern compop_func op_278_0_comp_ff; +extern compop_func op_279_0_comp_ff; +extern compop_func op_280_0_comp_ff; +extern compop_func op_290_0_comp_ff; +extern compop_func op_298_0_comp_ff; +extern compop_func op_2a0_0_comp_ff; +extern compop_func op_2a8_0_comp_ff; +extern compop_func op_2b0_0_comp_ff; +extern compop_func op_2b8_0_comp_ff; +extern compop_func op_2b9_0_comp_ff; +extern compop_func op_400_0_comp_ff; +extern compop_func op_410_0_comp_ff; +extern compop_func op_418_0_comp_ff; +extern compop_func op_420_0_comp_ff; +extern compop_func op_428_0_comp_ff; +extern compop_func op_430_0_comp_ff; +extern compop_func op_438_0_comp_ff; +extern compop_func op_439_0_comp_ff; +extern compop_func op_440_0_comp_ff; +extern compop_func op_450_0_comp_ff; +extern compop_func op_458_0_comp_ff; +extern compop_func op_460_0_comp_ff; +extern compop_func op_468_0_comp_ff; +extern compop_func op_470_0_comp_ff; +extern compop_func op_478_0_comp_ff; +extern compop_func op_479_0_comp_ff; +extern compop_func op_480_0_comp_ff; +extern compop_func op_490_0_comp_ff; +extern compop_func op_498_0_comp_ff; +extern compop_func op_4a0_0_comp_ff; +extern compop_func op_4a8_0_comp_ff; +extern compop_func op_4b0_0_comp_ff; +extern compop_func op_4b8_0_comp_ff; +extern compop_func op_4b9_0_comp_ff; +extern compop_func op_600_0_comp_ff; +extern compop_func op_610_0_comp_ff; +extern compop_func op_618_0_comp_ff; +extern compop_func op_620_0_comp_ff; +extern compop_func op_628_0_comp_ff; +extern compop_func op_630_0_comp_ff; +extern compop_func op_638_0_comp_ff; +extern compop_func op_639_0_comp_ff; +extern compop_func op_640_0_comp_ff; +extern compop_func op_650_0_comp_ff; +extern compop_func op_658_0_comp_ff; +extern compop_func op_660_0_comp_ff; +extern compop_func op_668_0_comp_ff; +extern compop_func op_670_0_comp_ff; +extern compop_func op_678_0_comp_ff; +extern compop_func op_679_0_comp_ff; +extern compop_func op_680_0_comp_ff; +extern compop_func op_690_0_comp_ff; +extern compop_func op_698_0_comp_ff; +extern compop_func op_6a0_0_comp_ff; +extern compop_func op_6a8_0_comp_ff; +extern compop_func op_6b0_0_comp_ff; +extern compop_func op_6b8_0_comp_ff; +extern compop_func op_6b9_0_comp_ff; +extern compop_func op_800_0_comp_ff; +extern compop_func op_810_0_comp_ff; +extern compop_func op_818_0_comp_ff; +extern compop_func op_820_0_comp_ff; +extern compop_func op_828_0_comp_ff; +extern compop_func op_830_0_comp_ff; +extern compop_func op_838_0_comp_ff; +extern compop_func op_839_0_comp_ff; +extern compop_func op_83a_0_comp_ff; +extern compop_func op_83b_0_comp_ff; +extern compop_func op_840_0_comp_ff; +extern compop_func op_850_0_comp_ff; +extern compop_func op_858_0_comp_ff; +extern compop_func op_860_0_comp_ff; +extern compop_func op_868_0_comp_ff; +extern compop_func op_870_0_comp_ff; +extern compop_func op_878_0_comp_ff; +extern compop_func op_879_0_comp_ff; +extern compop_func op_880_0_comp_ff; +extern compop_func op_890_0_comp_ff; +extern compop_func op_898_0_comp_ff; +extern compop_func op_8a0_0_comp_ff; +extern compop_func op_8a8_0_comp_ff; +extern compop_func op_8b0_0_comp_ff; +extern compop_func op_8b8_0_comp_ff; +extern compop_func op_8b9_0_comp_ff; +extern compop_func op_8c0_0_comp_ff; +extern compop_func op_8d0_0_comp_ff; +extern compop_func op_8d8_0_comp_ff; +extern compop_func op_8e0_0_comp_ff; +extern compop_func op_8e8_0_comp_ff; +extern compop_func op_8f0_0_comp_ff; +extern compop_func op_8f8_0_comp_ff; +extern compop_func op_8f9_0_comp_ff; +extern compop_func op_a00_0_comp_ff; +extern compop_func op_a10_0_comp_ff; +extern compop_func op_a18_0_comp_ff; +extern compop_func op_a20_0_comp_ff; +extern compop_func op_a28_0_comp_ff; +extern compop_func op_a30_0_comp_ff; +extern compop_func op_a38_0_comp_ff; +extern compop_func op_a39_0_comp_ff; +extern compop_func op_a40_0_comp_ff; +extern compop_func op_a50_0_comp_ff; +extern compop_func op_a58_0_comp_ff; +extern compop_func op_a60_0_comp_ff; +extern compop_func op_a68_0_comp_ff; +extern compop_func op_a70_0_comp_ff; +extern compop_func op_a78_0_comp_ff; +extern compop_func op_a79_0_comp_ff; +extern compop_func op_a80_0_comp_ff; +extern compop_func op_a90_0_comp_ff; +extern compop_func op_a98_0_comp_ff; +extern compop_func op_aa0_0_comp_ff; +extern compop_func op_aa8_0_comp_ff; +extern compop_func op_ab0_0_comp_ff; +extern compop_func op_ab8_0_comp_ff; +extern compop_func op_ab9_0_comp_ff; +extern compop_func op_c00_0_comp_ff; +extern compop_func op_c10_0_comp_ff; +extern compop_func op_c18_0_comp_ff; +extern compop_func op_c20_0_comp_ff; +extern compop_func op_c28_0_comp_ff; +extern compop_func op_c30_0_comp_ff; +extern compop_func op_c38_0_comp_ff; +extern compop_func op_c39_0_comp_ff; +extern compop_func op_c3a_0_comp_ff; +extern compop_func op_c3b_0_comp_ff; +extern compop_func op_c40_0_comp_ff; +extern compop_func op_c50_0_comp_ff; +extern compop_func op_c58_0_comp_ff; +extern compop_func op_c60_0_comp_ff; +extern compop_func op_c68_0_comp_ff; +extern compop_func op_c70_0_comp_ff; +extern compop_func op_c78_0_comp_ff; +extern compop_func op_c79_0_comp_ff; +extern compop_func op_c7a_0_comp_ff; +extern compop_func op_c7b_0_comp_ff; +extern compop_func op_c80_0_comp_ff; +extern compop_func op_c90_0_comp_ff; +extern compop_func op_c98_0_comp_ff; +extern compop_func op_ca0_0_comp_ff; +extern compop_func op_ca8_0_comp_ff; +extern compop_func op_cb0_0_comp_ff; +extern compop_func op_cb8_0_comp_ff; +extern compop_func op_cb9_0_comp_ff; +extern compop_func op_cba_0_comp_ff; +extern compop_func op_cbb_0_comp_ff; +extern compop_func op_1000_0_comp_ff; +extern compop_func op_1010_0_comp_ff; +extern compop_func op_1018_0_comp_ff; +extern compop_func op_1020_0_comp_ff; +extern compop_func op_1028_0_comp_ff; +extern compop_func op_1030_0_comp_ff; +extern compop_func op_1038_0_comp_ff; +extern compop_func op_1039_0_comp_ff; +extern compop_func op_103a_0_comp_ff; +extern compop_func op_103b_0_comp_ff; +extern compop_func op_103c_0_comp_ff; +extern compop_func op_1080_0_comp_ff; +extern compop_func op_1090_0_comp_ff; +extern compop_func op_1098_0_comp_ff; +extern compop_func op_10a0_0_comp_ff; +extern compop_func op_10a8_0_comp_ff; +extern compop_func op_10b0_0_comp_ff; +extern compop_func op_10b8_0_comp_ff; +extern compop_func op_10b9_0_comp_ff; +extern compop_func op_10ba_0_comp_ff; +extern compop_func op_10bb_0_comp_ff; +extern compop_func op_10bc_0_comp_ff; +extern compop_func op_10c0_0_comp_ff; +extern compop_func op_10d0_0_comp_ff; +extern compop_func op_10d8_0_comp_ff; +extern compop_func op_10e0_0_comp_ff; +extern compop_func op_10e8_0_comp_ff; +extern compop_func op_10f0_0_comp_ff; +extern compop_func op_10f8_0_comp_ff; +extern compop_func op_10f9_0_comp_ff; +extern compop_func op_10fa_0_comp_ff; +extern compop_func op_10fb_0_comp_ff; +extern compop_func op_10fc_0_comp_ff; +extern compop_func op_1100_0_comp_ff; +extern compop_func op_1110_0_comp_ff; +extern compop_func op_1118_0_comp_ff; +extern compop_func op_1120_0_comp_ff; +extern compop_func op_1128_0_comp_ff; +extern compop_func op_1130_0_comp_ff; +extern compop_func op_1138_0_comp_ff; +extern compop_func op_1139_0_comp_ff; +extern compop_func op_113a_0_comp_ff; +extern compop_func op_113b_0_comp_ff; +extern compop_func op_113c_0_comp_ff; +extern compop_func op_1140_0_comp_ff; +extern compop_func op_1150_0_comp_ff; +extern compop_func op_1158_0_comp_ff; +extern compop_func op_1160_0_comp_ff; +extern compop_func op_1168_0_comp_ff; +extern compop_func op_1170_0_comp_ff; +extern compop_func op_1178_0_comp_ff; +extern compop_func op_1179_0_comp_ff; +extern compop_func op_117a_0_comp_ff; +extern compop_func op_117b_0_comp_ff; +extern compop_func op_117c_0_comp_ff; +extern compop_func op_1180_0_comp_ff; +extern compop_func op_1190_0_comp_ff; +extern compop_func op_1198_0_comp_ff; +extern compop_func op_11a0_0_comp_ff; +extern compop_func op_11a8_0_comp_ff; +extern compop_func op_11b0_0_comp_ff; +extern compop_func op_11b8_0_comp_ff; +extern compop_func op_11b9_0_comp_ff; +extern compop_func op_11ba_0_comp_ff; +extern compop_func op_11bb_0_comp_ff; +extern compop_func op_11bc_0_comp_ff; +extern compop_func op_11c0_0_comp_ff; +extern compop_func op_11d0_0_comp_ff; +extern compop_func op_11d8_0_comp_ff; +extern compop_func op_11e0_0_comp_ff; +extern compop_func op_11e8_0_comp_ff; +extern compop_func op_11f0_0_comp_ff; +extern compop_func op_11f8_0_comp_ff; +extern compop_func op_11f9_0_comp_ff; +extern compop_func op_11fa_0_comp_ff; +extern compop_func op_11fb_0_comp_ff; +extern compop_func op_11fc_0_comp_ff; +extern compop_func op_13c0_0_comp_ff; +extern compop_func op_13d0_0_comp_ff; +extern compop_func op_13d8_0_comp_ff; +extern compop_func op_13e0_0_comp_ff; +extern compop_func op_13e8_0_comp_ff; +extern compop_func op_13f0_0_comp_ff; +extern compop_func op_13f8_0_comp_ff; +extern compop_func op_13f9_0_comp_ff; +extern compop_func op_13fa_0_comp_ff; +extern compop_func op_13fb_0_comp_ff; +extern compop_func op_13fc_0_comp_ff; +extern compop_func op_2000_0_comp_ff; +extern compop_func op_2008_0_comp_ff; +extern compop_func op_2010_0_comp_ff; +extern compop_func op_2018_0_comp_ff; +extern compop_func op_2020_0_comp_ff; +extern compop_func op_2028_0_comp_ff; +extern compop_func op_2030_0_comp_ff; +extern compop_func op_2038_0_comp_ff; +extern compop_func op_2039_0_comp_ff; +extern compop_func op_203a_0_comp_ff; +extern compop_func op_203b_0_comp_ff; +extern compop_func op_203c_0_comp_ff; +extern compop_func op_2040_0_comp_ff; +extern compop_func op_2048_0_comp_ff; +extern compop_func op_2050_0_comp_ff; +extern compop_func op_2058_0_comp_ff; +extern compop_func op_2060_0_comp_ff; +extern compop_func op_2068_0_comp_ff; +extern compop_func op_2070_0_comp_ff; +extern compop_func op_2078_0_comp_ff; +extern compop_func op_2079_0_comp_ff; +extern compop_func op_207a_0_comp_ff; +extern compop_func op_207b_0_comp_ff; +extern compop_func op_207c_0_comp_ff; +extern compop_func op_2080_0_comp_ff; +extern compop_func op_2088_0_comp_ff; +extern compop_func op_2090_0_comp_ff; +extern compop_func op_2098_0_comp_ff; +extern compop_func op_20a0_0_comp_ff; +extern compop_func op_20a8_0_comp_ff; +extern compop_func op_20b0_0_comp_ff; +extern compop_func op_20b8_0_comp_ff; +extern compop_func op_20b9_0_comp_ff; +extern compop_func op_20ba_0_comp_ff; +extern compop_func op_20bb_0_comp_ff; +extern compop_func op_20bc_0_comp_ff; +extern compop_func op_20c0_0_comp_ff; +extern compop_func op_20c8_0_comp_ff; +extern compop_func op_20d0_0_comp_ff; +extern compop_func op_20d8_0_comp_ff; +extern compop_func op_20e0_0_comp_ff; +extern compop_func op_20e8_0_comp_ff; +extern compop_func op_20f0_0_comp_ff; +extern compop_func op_20f8_0_comp_ff; +extern compop_func op_20f9_0_comp_ff; +extern compop_func op_20fa_0_comp_ff; +extern compop_func op_20fb_0_comp_ff; +extern compop_func op_20fc_0_comp_ff; +extern compop_func op_2100_0_comp_ff; +extern compop_func op_2108_0_comp_ff; +extern compop_func op_2110_0_comp_ff; +extern compop_func op_2118_0_comp_ff; +extern compop_func op_2120_0_comp_ff; +extern compop_func op_2128_0_comp_ff; +extern compop_func op_2130_0_comp_ff; +extern compop_func op_2138_0_comp_ff; +extern compop_func op_2139_0_comp_ff; +extern compop_func op_213a_0_comp_ff; +extern compop_func op_213b_0_comp_ff; +extern compop_func op_213c_0_comp_ff; +extern compop_func op_2140_0_comp_ff; +extern compop_func op_2148_0_comp_ff; +extern compop_func op_2150_0_comp_ff; +extern compop_func op_2158_0_comp_ff; +extern compop_func op_2160_0_comp_ff; +extern compop_func op_2168_0_comp_ff; +extern compop_func op_2170_0_comp_ff; +extern compop_func op_2178_0_comp_ff; +extern compop_func op_2179_0_comp_ff; +extern compop_func op_217a_0_comp_ff; +extern compop_func op_217b_0_comp_ff; +extern compop_func op_217c_0_comp_ff; +extern compop_func op_2180_0_comp_ff; +extern compop_func op_2188_0_comp_ff; +extern compop_func op_2190_0_comp_ff; +extern compop_func op_2198_0_comp_ff; +extern compop_func op_21a0_0_comp_ff; +extern compop_func op_21a8_0_comp_ff; +extern compop_func op_21b0_0_comp_ff; +extern compop_func op_21b8_0_comp_ff; +extern compop_func op_21b9_0_comp_ff; +extern compop_func op_21ba_0_comp_ff; +extern compop_func op_21bb_0_comp_ff; +extern compop_func op_21bc_0_comp_ff; +extern compop_func op_21c0_0_comp_ff; +extern compop_func op_21c8_0_comp_ff; +extern compop_func op_21d0_0_comp_ff; +extern compop_func op_21d8_0_comp_ff; +extern compop_func op_21e0_0_comp_ff; +extern compop_func op_21e8_0_comp_ff; +extern compop_func op_21f0_0_comp_ff; +extern compop_func op_21f8_0_comp_ff; +extern compop_func op_21f9_0_comp_ff; +extern compop_func op_21fa_0_comp_ff; +extern compop_func op_21fb_0_comp_ff; +extern compop_func op_21fc_0_comp_ff; +extern compop_func op_23c0_0_comp_ff; +extern compop_func op_23c8_0_comp_ff; +extern compop_func op_23d0_0_comp_ff; +extern compop_func op_23d8_0_comp_ff; +extern compop_func op_23e0_0_comp_ff; +extern compop_func op_23e8_0_comp_ff; +extern compop_func op_23f0_0_comp_ff; +extern compop_func op_23f8_0_comp_ff; +extern compop_func op_23f9_0_comp_ff; +extern compop_func op_23fa_0_comp_ff; +extern compop_func op_23fb_0_comp_ff; +extern compop_func op_23fc_0_comp_ff; +extern compop_func op_3000_0_comp_ff; +extern compop_func op_3008_0_comp_ff; +extern compop_func op_3010_0_comp_ff; +extern compop_func op_3018_0_comp_ff; +extern compop_func op_3020_0_comp_ff; +extern compop_func op_3028_0_comp_ff; +extern compop_func op_3030_0_comp_ff; +extern compop_func op_3038_0_comp_ff; +extern compop_func op_3039_0_comp_ff; +extern compop_func op_303a_0_comp_ff; +extern compop_func op_303b_0_comp_ff; +extern compop_func op_303c_0_comp_ff; +extern compop_func op_3040_0_comp_ff; +extern compop_func op_3048_0_comp_ff; +extern compop_func op_3050_0_comp_ff; +extern compop_func op_3058_0_comp_ff; +extern compop_func op_3060_0_comp_ff; +extern compop_func op_3068_0_comp_ff; +extern compop_func op_3070_0_comp_ff; +extern compop_func op_3078_0_comp_ff; +extern compop_func op_3079_0_comp_ff; +extern compop_func op_307a_0_comp_ff; +extern compop_func op_307b_0_comp_ff; +extern compop_func op_307c_0_comp_ff; +extern compop_func op_3080_0_comp_ff; +extern compop_func op_3088_0_comp_ff; +extern compop_func op_3090_0_comp_ff; +extern compop_func op_3098_0_comp_ff; +extern compop_func op_30a0_0_comp_ff; +extern compop_func op_30a8_0_comp_ff; +extern compop_func op_30b0_0_comp_ff; +extern compop_func op_30b8_0_comp_ff; +extern compop_func op_30b9_0_comp_ff; +extern compop_func op_30ba_0_comp_ff; +extern compop_func op_30bb_0_comp_ff; +extern compop_func op_30bc_0_comp_ff; +extern compop_func op_30c0_0_comp_ff; +extern compop_func op_30c8_0_comp_ff; +extern compop_func op_30d0_0_comp_ff; +extern compop_func op_30d8_0_comp_ff; +extern compop_func op_30e0_0_comp_ff; +extern compop_func op_30e8_0_comp_ff; +extern compop_func op_30f0_0_comp_ff; +extern compop_func op_30f8_0_comp_ff; +extern compop_func op_30f9_0_comp_ff; +extern compop_func op_30fa_0_comp_ff; +extern compop_func op_30fb_0_comp_ff; +extern compop_func op_30fc_0_comp_ff; +extern compop_func op_3100_0_comp_ff; +extern compop_func op_3108_0_comp_ff; +extern compop_func op_3110_0_comp_ff; +extern compop_func op_3118_0_comp_ff; +extern compop_func op_3120_0_comp_ff; +extern compop_func op_3128_0_comp_ff; +extern compop_func op_3130_0_comp_ff; +extern compop_func op_3138_0_comp_ff; +extern compop_func op_3139_0_comp_ff; +extern compop_func op_313a_0_comp_ff; +extern compop_func op_313b_0_comp_ff; +extern compop_func op_313c_0_comp_ff; +extern compop_func op_3140_0_comp_ff; +extern compop_func op_3148_0_comp_ff; +extern compop_func op_3150_0_comp_ff; +extern compop_func op_3158_0_comp_ff; +extern compop_func op_3160_0_comp_ff; +extern compop_func op_3168_0_comp_ff; +extern compop_func op_3170_0_comp_ff; +extern compop_func op_3178_0_comp_ff; +extern compop_func op_3179_0_comp_ff; +extern compop_func op_317a_0_comp_ff; +extern compop_func op_317b_0_comp_ff; +extern compop_func op_317c_0_comp_ff; +extern compop_func op_3180_0_comp_ff; +extern compop_func op_3188_0_comp_ff; +extern compop_func op_3190_0_comp_ff; +extern compop_func op_3198_0_comp_ff; +extern compop_func op_31a0_0_comp_ff; +extern compop_func op_31a8_0_comp_ff; +extern compop_func op_31b0_0_comp_ff; +extern compop_func op_31b8_0_comp_ff; +extern compop_func op_31b9_0_comp_ff; +extern compop_func op_31ba_0_comp_ff; +extern compop_func op_31bb_0_comp_ff; +extern compop_func op_31bc_0_comp_ff; +extern compop_func op_31c0_0_comp_ff; +extern compop_func op_31c8_0_comp_ff; +extern compop_func op_31d0_0_comp_ff; +extern compop_func op_31d8_0_comp_ff; +extern compop_func op_31e0_0_comp_ff; +extern compop_func op_31e8_0_comp_ff; +extern compop_func op_31f0_0_comp_ff; +extern compop_func op_31f8_0_comp_ff; +extern compop_func op_31f9_0_comp_ff; +extern compop_func op_31fa_0_comp_ff; +extern compop_func op_31fb_0_comp_ff; +extern compop_func op_31fc_0_comp_ff; +extern compop_func op_33c0_0_comp_ff; +extern compop_func op_33c8_0_comp_ff; +extern compop_func op_33d0_0_comp_ff; +extern compop_func op_33d8_0_comp_ff; +extern compop_func op_33e0_0_comp_ff; +extern compop_func op_33e8_0_comp_ff; +extern compop_func op_33f0_0_comp_ff; +extern compop_func op_33f8_0_comp_ff; +extern compop_func op_33f9_0_comp_ff; +extern compop_func op_33fa_0_comp_ff; +extern compop_func op_33fb_0_comp_ff; +extern compop_func op_33fc_0_comp_ff; +extern compop_func op_4000_0_comp_ff; +extern compop_func op_4010_0_comp_ff; +extern compop_func op_4018_0_comp_ff; +extern compop_func op_4020_0_comp_ff; +extern compop_func op_4028_0_comp_ff; +extern compop_func op_4030_0_comp_ff; +extern compop_func op_4038_0_comp_ff; +extern compop_func op_4039_0_comp_ff; +extern compop_func op_4040_0_comp_ff; +extern compop_func op_4050_0_comp_ff; +extern compop_func op_4058_0_comp_ff; +extern compop_func op_4060_0_comp_ff; +extern compop_func op_4068_0_comp_ff; +extern compop_func op_4070_0_comp_ff; +extern compop_func op_4078_0_comp_ff; +extern compop_func op_4079_0_comp_ff; +extern compop_func op_4080_0_comp_ff; +extern compop_func op_4090_0_comp_ff; +extern compop_func op_4098_0_comp_ff; +extern compop_func op_40a0_0_comp_ff; +extern compop_func op_40a8_0_comp_ff; +extern compop_func op_40b0_0_comp_ff; +extern compop_func op_40b8_0_comp_ff; +extern compop_func op_40b9_0_comp_ff; +extern compop_func op_41d0_0_comp_ff; +extern compop_func op_41e8_0_comp_ff; +extern compop_func op_41f0_0_comp_ff; +extern compop_func op_41f8_0_comp_ff; +extern compop_func op_41f9_0_comp_ff; +extern compop_func op_41fa_0_comp_ff; +extern compop_func op_41fb_0_comp_ff; +extern compop_func op_4200_0_comp_ff; +extern compop_func op_4210_0_comp_ff; +extern compop_func op_4218_0_comp_ff; +extern compop_func op_4220_0_comp_ff; +extern compop_func op_4228_0_comp_ff; +extern compop_func op_4230_0_comp_ff; +extern compop_func op_4238_0_comp_ff; +extern compop_func op_4239_0_comp_ff; +extern compop_func op_4240_0_comp_ff; +extern compop_func op_4250_0_comp_ff; +extern compop_func op_4258_0_comp_ff; +extern compop_func op_4260_0_comp_ff; +extern compop_func op_4268_0_comp_ff; +extern compop_func op_4270_0_comp_ff; +extern compop_func op_4278_0_comp_ff; +extern compop_func op_4279_0_comp_ff; +extern compop_func op_4280_0_comp_ff; +extern compop_func op_4290_0_comp_ff; +extern compop_func op_4298_0_comp_ff; +extern compop_func op_42a0_0_comp_ff; +extern compop_func op_42a8_0_comp_ff; +extern compop_func op_42b0_0_comp_ff; +extern compop_func op_42b8_0_comp_ff; +extern compop_func op_42b9_0_comp_ff; +extern compop_func op_4400_0_comp_ff; +extern compop_func op_4410_0_comp_ff; +extern compop_func op_4418_0_comp_ff; +extern compop_func op_4420_0_comp_ff; +extern compop_func op_4428_0_comp_ff; +extern compop_func op_4430_0_comp_ff; +extern compop_func op_4438_0_comp_ff; +extern compop_func op_4439_0_comp_ff; +extern compop_func op_4440_0_comp_ff; +extern compop_func op_4450_0_comp_ff; +extern compop_func op_4458_0_comp_ff; +extern compop_func op_4460_0_comp_ff; +extern compop_func op_4468_0_comp_ff; +extern compop_func op_4470_0_comp_ff; +extern compop_func op_4478_0_comp_ff; +extern compop_func op_4479_0_comp_ff; +extern compop_func op_4480_0_comp_ff; +extern compop_func op_4490_0_comp_ff; +extern compop_func op_4498_0_comp_ff; +extern compop_func op_44a0_0_comp_ff; +extern compop_func op_44a8_0_comp_ff; +extern compop_func op_44b0_0_comp_ff; +extern compop_func op_44b8_0_comp_ff; +extern compop_func op_44b9_0_comp_ff; +extern compop_func op_4600_0_comp_ff; +extern compop_func op_4610_0_comp_ff; +extern compop_func op_4618_0_comp_ff; +extern compop_func op_4620_0_comp_ff; +extern compop_func op_4628_0_comp_ff; +extern compop_func op_4630_0_comp_ff; +extern compop_func op_4638_0_comp_ff; +extern compop_func op_4639_0_comp_ff; +extern compop_func op_4640_0_comp_ff; +extern compop_func op_4650_0_comp_ff; +extern compop_func op_4658_0_comp_ff; +extern compop_func op_4660_0_comp_ff; +extern compop_func op_4668_0_comp_ff; +extern compop_func op_4670_0_comp_ff; +extern compop_func op_4678_0_comp_ff; +extern compop_func op_4679_0_comp_ff; +extern compop_func op_4680_0_comp_ff; +extern compop_func op_4690_0_comp_ff; +extern compop_func op_4698_0_comp_ff; +extern compop_func op_46a0_0_comp_ff; +extern compop_func op_46a8_0_comp_ff; +extern compop_func op_46b0_0_comp_ff; +extern compop_func op_46b8_0_comp_ff; +extern compop_func op_46b9_0_comp_ff; +extern compop_func op_4808_0_comp_ff; +extern compop_func op_4840_0_comp_ff; +extern compop_func op_4850_0_comp_ff; +extern compop_func op_4868_0_comp_ff; +extern compop_func op_4870_0_comp_ff; +extern compop_func op_4878_0_comp_ff; +extern compop_func op_4879_0_comp_ff; +extern compop_func op_487a_0_comp_ff; +extern compop_func op_487b_0_comp_ff; +extern compop_func op_4880_0_comp_ff; +extern compop_func op_4890_0_comp_ff; +extern compop_func op_48a0_0_comp_ff; +extern compop_func op_48a8_0_comp_ff; +extern compop_func op_48b0_0_comp_ff; +extern compop_func op_48b8_0_comp_ff; +extern compop_func op_48b9_0_comp_ff; +extern compop_func op_48c0_0_comp_ff; +extern compop_func op_48d0_0_comp_ff; +extern compop_func op_48e0_0_comp_ff; +extern compop_func op_48e8_0_comp_ff; +extern compop_func op_48f0_0_comp_ff; +extern compop_func op_48f8_0_comp_ff; +extern compop_func op_48f9_0_comp_ff; +extern compop_func op_49c0_0_comp_ff; +extern compop_func op_4a00_0_comp_ff; +extern compop_func op_4a10_0_comp_ff; +extern compop_func op_4a18_0_comp_ff; +extern compop_func op_4a20_0_comp_ff; +extern compop_func op_4a28_0_comp_ff; +extern compop_func op_4a30_0_comp_ff; +extern compop_func op_4a38_0_comp_ff; +extern compop_func op_4a39_0_comp_ff; +extern compop_func op_4a3a_0_comp_ff; +extern compop_func op_4a3b_0_comp_ff; +extern compop_func op_4a3c_0_comp_ff; +extern compop_func op_4a40_0_comp_ff; +extern compop_func op_4a48_0_comp_ff; +extern compop_func op_4a50_0_comp_ff; +extern compop_func op_4a58_0_comp_ff; +extern compop_func op_4a60_0_comp_ff; +extern compop_func op_4a68_0_comp_ff; +extern compop_func op_4a70_0_comp_ff; +extern compop_func op_4a78_0_comp_ff; +extern compop_func op_4a79_0_comp_ff; +extern compop_func op_4a7a_0_comp_ff; +extern compop_func op_4a7b_0_comp_ff; +extern compop_func op_4a7c_0_comp_ff; +extern compop_func op_4a80_0_comp_ff; +extern compop_func op_4a88_0_comp_ff; +extern compop_func op_4a90_0_comp_ff; +extern compop_func op_4a98_0_comp_ff; +extern compop_func op_4aa0_0_comp_ff; +extern compop_func op_4aa8_0_comp_ff; +extern compop_func op_4ab0_0_comp_ff; +extern compop_func op_4ab8_0_comp_ff; +extern compop_func op_4ab9_0_comp_ff; +extern compop_func op_4aba_0_comp_ff; +extern compop_func op_4abb_0_comp_ff; +extern compop_func op_4abc_0_comp_ff; +extern compop_func op_4c90_0_comp_ff; +extern compop_func op_4c98_0_comp_ff; +extern compop_func op_4ca8_0_comp_ff; +extern compop_func op_4cb0_0_comp_ff; +extern compop_func op_4cb8_0_comp_ff; +extern compop_func op_4cb9_0_comp_ff; +extern compop_func op_4cba_0_comp_ff; +extern compop_func op_4cbb_0_comp_ff; +extern compop_func op_4cd0_0_comp_ff; +extern compop_func op_4cd8_0_comp_ff; +extern compop_func op_4ce8_0_comp_ff; +extern compop_func op_4cf0_0_comp_ff; +extern compop_func op_4cf8_0_comp_ff; +extern compop_func op_4cf9_0_comp_ff; +extern compop_func op_4cfa_0_comp_ff; +extern compop_func op_4cfb_0_comp_ff; +extern compop_func op_4e50_0_comp_ff; +extern compop_func op_4e58_0_comp_ff; +extern compop_func op_4e71_0_comp_ff; +extern compop_func op_4e74_0_comp_ff; +extern compop_func op_4e75_0_comp_ff; +extern compop_func op_4e90_0_comp_ff; +extern compop_func op_4ea8_0_comp_ff; +extern compop_func op_4eb0_0_comp_ff; +extern compop_func op_4eb8_0_comp_ff; +extern compop_func op_4eb9_0_comp_ff; +extern compop_func op_4eba_0_comp_ff; +extern compop_func op_4ebb_0_comp_ff; +extern compop_func op_4ed0_0_comp_ff; +extern compop_func op_4ee8_0_comp_ff; +extern compop_func op_4ef0_0_comp_ff; +extern compop_func op_4ef8_0_comp_ff; +extern compop_func op_4ef9_0_comp_ff; +extern compop_func op_4efa_0_comp_ff; +extern compop_func op_4efb_0_comp_ff; +extern compop_func op_5000_0_comp_ff; +extern compop_func op_5010_0_comp_ff; +extern compop_func op_5018_0_comp_ff; +extern compop_func op_5020_0_comp_ff; +extern compop_func op_5028_0_comp_ff; +extern compop_func op_5030_0_comp_ff; +extern compop_func op_5038_0_comp_ff; +extern compop_func op_5039_0_comp_ff; +extern compop_func op_5040_0_comp_ff; +extern compop_func op_5048_0_comp_ff; +extern compop_func op_5050_0_comp_ff; +extern compop_func op_5058_0_comp_ff; +extern compop_func op_5060_0_comp_ff; +extern compop_func op_5068_0_comp_ff; +extern compop_func op_5070_0_comp_ff; +extern compop_func op_5078_0_comp_ff; +extern compop_func op_5079_0_comp_ff; +extern compop_func op_5080_0_comp_ff; +extern compop_func op_5088_0_comp_ff; +extern compop_func op_5090_0_comp_ff; +extern compop_func op_5098_0_comp_ff; +extern compop_func op_50a0_0_comp_ff; +extern compop_func op_50a8_0_comp_ff; +extern compop_func op_50b0_0_comp_ff; +extern compop_func op_50b8_0_comp_ff; +extern compop_func op_50b9_0_comp_ff; +extern compop_func op_50c0_0_comp_ff; +extern compop_func op_50c8_0_comp_ff; +extern compop_func op_50d0_0_comp_ff; +extern compop_func op_50d8_0_comp_ff; +extern compop_func op_50e0_0_comp_ff; +extern compop_func op_50e8_0_comp_ff; +extern compop_func op_50f0_0_comp_ff; +extern compop_func op_50f8_0_comp_ff; +extern compop_func op_50f9_0_comp_ff; +extern compop_func op_5100_0_comp_ff; +extern compop_func op_5110_0_comp_ff; +extern compop_func op_5118_0_comp_ff; +extern compop_func op_5120_0_comp_ff; +extern compop_func op_5128_0_comp_ff; +extern compop_func op_5130_0_comp_ff; +extern compop_func op_5138_0_comp_ff; +extern compop_func op_5139_0_comp_ff; +extern compop_func op_5140_0_comp_ff; +extern compop_func op_5148_0_comp_ff; +extern compop_func op_5150_0_comp_ff; +extern compop_func op_5158_0_comp_ff; +extern compop_func op_5160_0_comp_ff; +extern compop_func op_5168_0_comp_ff; +extern compop_func op_5170_0_comp_ff; +extern compop_func op_5178_0_comp_ff; +extern compop_func op_5179_0_comp_ff; +extern compop_func op_5180_0_comp_ff; +extern compop_func op_5188_0_comp_ff; +extern compop_func op_5190_0_comp_ff; +extern compop_func op_5198_0_comp_ff; +extern compop_func op_51a0_0_comp_ff; +extern compop_func op_51a8_0_comp_ff; +extern compop_func op_51b0_0_comp_ff; +extern compop_func op_51b8_0_comp_ff; +extern compop_func op_51b9_0_comp_ff; +extern compop_func op_51c0_0_comp_ff; +extern compop_func op_51c8_0_comp_ff; +extern compop_func op_51d0_0_comp_ff; +extern compop_func op_51d8_0_comp_ff; +extern compop_func op_51e0_0_comp_ff; +extern compop_func op_51e8_0_comp_ff; +extern compop_func op_51f0_0_comp_ff; +extern compop_func op_51f8_0_comp_ff; +extern compop_func op_51f9_0_comp_ff; +extern compop_func op_52c0_0_comp_ff; +extern compop_func op_52c8_0_comp_ff; +extern compop_func op_52d0_0_comp_ff; +extern compop_func op_52d8_0_comp_ff; +extern compop_func op_52e0_0_comp_ff; +extern compop_func op_52e8_0_comp_ff; +extern compop_func op_52f0_0_comp_ff; +extern compop_func op_52f8_0_comp_ff; +extern compop_func op_52f9_0_comp_ff; +extern compop_func op_53c0_0_comp_ff; +extern compop_func op_53c8_0_comp_ff; +extern compop_func op_53d0_0_comp_ff; +extern compop_func op_53d8_0_comp_ff; +extern compop_func op_53e0_0_comp_ff; +extern compop_func op_53e8_0_comp_ff; +extern compop_func op_53f0_0_comp_ff; +extern compop_func op_53f8_0_comp_ff; +extern compop_func op_53f9_0_comp_ff; +extern compop_func op_54c0_0_comp_ff; +extern compop_func op_54c8_0_comp_ff; +extern compop_func op_54d0_0_comp_ff; +extern compop_func op_54d8_0_comp_ff; +extern compop_func op_54e0_0_comp_ff; +extern compop_func op_54e8_0_comp_ff; +extern compop_func op_54f0_0_comp_ff; +extern compop_func op_54f8_0_comp_ff; +extern compop_func op_54f9_0_comp_ff; +extern compop_func op_55c0_0_comp_ff; +extern compop_func op_55c8_0_comp_ff; +extern compop_func op_55d0_0_comp_ff; +extern compop_func op_55d8_0_comp_ff; +extern compop_func op_55e0_0_comp_ff; +extern compop_func op_55e8_0_comp_ff; +extern compop_func op_55f0_0_comp_ff; +extern compop_func op_55f8_0_comp_ff; +extern compop_func op_55f9_0_comp_ff; +extern compop_func op_56c0_0_comp_ff; +extern compop_func op_56c8_0_comp_ff; +extern compop_func op_56d0_0_comp_ff; +extern compop_func op_56d8_0_comp_ff; +extern compop_func op_56e0_0_comp_ff; +extern compop_func op_56e8_0_comp_ff; +extern compop_func op_56f0_0_comp_ff; +extern compop_func op_56f8_0_comp_ff; +extern compop_func op_56f9_0_comp_ff; +extern compop_func op_57c0_0_comp_ff; +extern compop_func op_57c8_0_comp_ff; +extern compop_func op_57d0_0_comp_ff; +extern compop_func op_57d8_0_comp_ff; +extern compop_func op_57e0_0_comp_ff; +extern compop_func op_57e8_0_comp_ff; +extern compop_func op_57f0_0_comp_ff; +extern compop_func op_57f8_0_comp_ff; +extern compop_func op_57f9_0_comp_ff; +extern compop_func op_5ac0_0_comp_ff; +extern compop_func op_5ac8_0_comp_ff; +extern compop_func op_5ad0_0_comp_ff; +extern compop_func op_5ad8_0_comp_ff; +extern compop_func op_5ae0_0_comp_ff; +extern compop_func op_5ae8_0_comp_ff; +extern compop_func op_5af0_0_comp_ff; +extern compop_func op_5af8_0_comp_ff; +extern compop_func op_5af9_0_comp_ff; +extern compop_func op_5bc0_0_comp_ff; +extern compop_func op_5bc8_0_comp_ff; +extern compop_func op_5bd0_0_comp_ff; +extern compop_func op_5bd8_0_comp_ff; +extern compop_func op_5be0_0_comp_ff; +extern compop_func op_5be8_0_comp_ff; +extern compop_func op_5bf0_0_comp_ff; +extern compop_func op_5bf8_0_comp_ff; +extern compop_func op_5bf9_0_comp_ff; +extern compop_func op_5cc0_0_comp_ff; +extern compop_func op_5cc8_0_comp_ff; +extern compop_func op_5cd0_0_comp_ff; +extern compop_func op_5cd8_0_comp_ff; +extern compop_func op_5ce0_0_comp_ff; +extern compop_func op_5ce8_0_comp_ff; +extern compop_func op_5cf0_0_comp_ff; +extern compop_func op_5cf8_0_comp_ff; +extern compop_func op_5cf9_0_comp_ff; +extern compop_func op_5dc0_0_comp_ff; +extern compop_func op_5dc8_0_comp_ff; +extern compop_func op_5dd0_0_comp_ff; +extern compop_func op_5dd8_0_comp_ff; +extern compop_func op_5de0_0_comp_ff; +extern compop_func op_5de8_0_comp_ff; +extern compop_func op_5df0_0_comp_ff; +extern compop_func op_5df8_0_comp_ff; +extern compop_func op_5df9_0_comp_ff; +extern compop_func op_5ec0_0_comp_ff; +extern compop_func op_5ec8_0_comp_ff; +extern compop_func op_5ed0_0_comp_ff; +extern compop_func op_5ed8_0_comp_ff; +extern compop_func op_5ee0_0_comp_ff; +extern compop_func op_5ee8_0_comp_ff; +extern compop_func op_5ef0_0_comp_ff; +extern compop_func op_5ef8_0_comp_ff; +extern compop_func op_5ef9_0_comp_ff; +extern compop_func op_5fc0_0_comp_ff; +extern compop_func op_5fc8_0_comp_ff; +extern compop_func op_5fd0_0_comp_ff; +extern compop_func op_5fd8_0_comp_ff; +extern compop_func op_5fe0_0_comp_ff; +extern compop_func op_5fe8_0_comp_ff; +extern compop_func op_5ff0_0_comp_ff; +extern compop_func op_5ff8_0_comp_ff; +extern compop_func op_5ff9_0_comp_ff; +extern compop_func op_6000_0_comp_ff; +extern compop_func op_6001_0_comp_ff; +extern compop_func op_60ff_0_comp_ff; +extern compop_func op_6100_0_comp_ff; +extern compop_func op_6101_0_comp_ff; +extern compop_func op_61ff_0_comp_ff; +extern compop_func op_6200_0_comp_ff; +extern compop_func op_6201_0_comp_ff; +extern compop_func op_62ff_0_comp_ff; +extern compop_func op_6300_0_comp_ff; +extern compop_func op_6301_0_comp_ff; +extern compop_func op_63ff_0_comp_ff; +extern compop_func op_6400_0_comp_ff; +extern compop_func op_6401_0_comp_ff; +extern compop_func op_64ff_0_comp_ff; +extern compop_func op_6500_0_comp_ff; +extern compop_func op_6501_0_comp_ff; +extern compop_func op_65ff_0_comp_ff; +extern compop_func op_6600_0_comp_ff; +extern compop_func op_6601_0_comp_ff; +extern compop_func op_66ff_0_comp_ff; +extern compop_func op_6700_0_comp_ff; +extern compop_func op_6701_0_comp_ff; +extern compop_func op_67ff_0_comp_ff; +extern compop_func op_6a00_0_comp_ff; +extern compop_func op_6a01_0_comp_ff; +extern compop_func op_6aff_0_comp_ff; +extern compop_func op_6b00_0_comp_ff; +extern compop_func op_6b01_0_comp_ff; +extern compop_func op_6bff_0_comp_ff; +extern compop_func op_6c00_0_comp_ff; +extern compop_func op_6c01_0_comp_ff; +extern compop_func op_6cff_0_comp_ff; +extern compop_func op_6d00_0_comp_ff; +extern compop_func op_6d01_0_comp_ff; +extern compop_func op_6dff_0_comp_ff; +extern compop_func op_6e00_0_comp_ff; +extern compop_func op_6e01_0_comp_ff; +extern compop_func op_6eff_0_comp_ff; +extern compop_func op_6f00_0_comp_ff; +extern compop_func op_6f01_0_comp_ff; +extern compop_func op_6fff_0_comp_ff; +extern compop_func op_7000_0_comp_ff; +extern compop_func op_8000_0_comp_ff; +extern compop_func op_8010_0_comp_ff; +extern compop_func op_8018_0_comp_ff; +extern compop_func op_8020_0_comp_ff; +extern compop_func op_8028_0_comp_ff; +extern compop_func op_8030_0_comp_ff; +extern compop_func op_8038_0_comp_ff; +extern compop_func op_8039_0_comp_ff; +extern compop_func op_803a_0_comp_ff; +extern compop_func op_803b_0_comp_ff; +extern compop_func op_803c_0_comp_ff; +extern compop_func op_8040_0_comp_ff; +extern compop_func op_8050_0_comp_ff; +extern compop_func op_8058_0_comp_ff; +extern compop_func op_8060_0_comp_ff; +extern compop_func op_8068_0_comp_ff; +extern compop_func op_8070_0_comp_ff; +extern compop_func op_8078_0_comp_ff; +extern compop_func op_8079_0_comp_ff; +extern compop_func op_807a_0_comp_ff; +extern compop_func op_807b_0_comp_ff; +extern compop_func op_807c_0_comp_ff; +extern compop_func op_8080_0_comp_ff; +extern compop_func op_8090_0_comp_ff; +extern compop_func op_8098_0_comp_ff; +extern compop_func op_80a0_0_comp_ff; +extern compop_func op_80a8_0_comp_ff; +extern compop_func op_80b0_0_comp_ff; +extern compop_func op_80b8_0_comp_ff; +extern compop_func op_80b9_0_comp_ff; +extern compop_func op_80ba_0_comp_ff; +extern compop_func op_80bb_0_comp_ff; +extern compop_func op_80bc_0_comp_ff; +extern compop_func op_8110_0_comp_ff; +extern compop_func op_8118_0_comp_ff; +extern compop_func op_8120_0_comp_ff; +extern compop_func op_8128_0_comp_ff; +extern compop_func op_8130_0_comp_ff; +extern compop_func op_8138_0_comp_ff; +extern compop_func op_8139_0_comp_ff; +extern compop_func op_8150_0_comp_ff; +extern compop_func op_8158_0_comp_ff; +extern compop_func op_8160_0_comp_ff; +extern compop_func op_8168_0_comp_ff; +extern compop_func op_8170_0_comp_ff; +extern compop_func op_8178_0_comp_ff; +extern compop_func op_8179_0_comp_ff; +extern compop_func op_8190_0_comp_ff; +extern compop_func op_8198_0_comp_ff; +extern compop_func op_81a0_0_comp_ff; +extern compop_func op_81a8_0_comp_ff; +extern compop_func op_81b0_0_comp_ff; +extern compop_func op_81b8_0_comp_ff; +extern compop_func op_81b9_0_comp_ff; +extern compop_func op_9000_0_comp_ff; +extern compop_func op_9010_0_comp_ff; +extern compop_func op_9018_0_comp_ff; +extern compop_func op_9020_0_comp_ff; +extern compop_func op_9028_0_comp_ff; +extern compop_func op_9030_0_comp_ff; +extern compop_func op_9038_0_comp_ff; +extern compop_func op_9039_0_comp_ff; +extern compop_func op_903a_0_comp_ff; +extern compop_func op_903b_0_comp_ff; +extern compop_func op_903c_0_comp_ff; +extern compop_func op_9040_0_comp_ff; +extern compop_func op_9048_0_comp_ff; +extern compop_func op_9050_0_comp_ff; +extern compop_func op_9058_0_comp_ff; +extern compop_func op_9060_0_comp_ff; +extern compop_func op_9068_0_comp_ff; +extern compop_func op_9070_0_comp_ff; +extern compop_func op_9078_0_comp_ff; +extern compop_func op_9079_0_comp_ff; +extern compop_func op_907a_0_comp_ff; +extern compop_func op_907b_0_comp_ff; +extern compop_func op_907c_0_comp_ff; +extern compop_func op_9080_0_comp_ff; +extern compop_func op_9088_0_comp_ff; +extern compop_func op_9090_0_comp_ff; +extern compop_func op_9098_0_comp_ff; +extern compop_func op_90a0_0_comp_ff; +extern compop_func op_90a8_0_comp_ff; +extern compop_func op_90b0_0_comp_ff; +extern compop_func op_90b8_0_comp_ff; +extern compop_func op_90b9_0_comp_ff; +extern compop_func op_90ba_0_comp_ff; +extern compop_func op_90bb_0_comp_ff; +extern compop_func op_90bc_0_comp_ff; +extern compop_func op_90c0_0_comp_ff; +extern compop_func op_90c8_0_comp_ff; +extern compop_func op_90d0_0_comp_ff; +extern compop_func op_90d8_0_comp_ff; +extern compop_func op_90e0_0_comp_ff; +extern compop_func op_90e8_0_comp_ff; +extern compop_func op_90f0_0_comp_ff; +extern compop_func op_90f8_0_comp_ff; +extern compop_func op_90f9_0_comp_ff; +extern compop_func op_90fa_0_comp_ff; +extern compop_func op_90fb_0_comp_ff; +extern compop_func op_90fc_0_comp_ff; +extern compop_func op_9100_0_comp_ff; +extern compop_func op_9108_0_comp_ff; +extern compop_func op_9110_0_comp_ff; +extern compop_func op_9118_0_comp_ff; +extern compop_func op_9120_0_comp_ff; +extern compop_func op_9128_0_comp_ff; +extern compop_func op_9130_0_comp_ff; +extern compop_func op_9138_0_comp_ff; +extern compop_func op_9139_0_comp_ff; +extern compop_func op_9140_0_comp_ff; +extern compop_func op_9148_0_comp_ff; +extern compop_func op_9150_0_comp_ff; +extern compop_func op_9158_0_comp_ff; +extern compop_func op_9160_0_comp_ff; +extern compop_func op_9168_0_comp_ff; +extern compop_func op_9170_0_comp_ff; +extern compop_func op_9178_0_comp_ff; +extern compop_func op_9179_0_comp_ff; +extern compop_func op_9180_0_comp_ff; +extern compop_func op_9188_0_comp_ff; +extern compop_func op_9190_0_comp_ff; +extern compop_func op_9198_0_comp_ff; +extern compop_func op_91a0_0_comp_ff; +extern compop_func op_91a8_0_comp_ff; +extern compop_func op_91b0_0_comp_ff; +extern compop_func op_91b8_0_comp_ff; +extern compop_func op_91b9_0_comp_ff; +extern compop_func op_91c0_0_comp_ff; +extern compop_func op_91c8_0_comp_ff; +extern compop_func op_91d0_0_comp_ff; +extern compop_func op_91d8_0_comp_ff; +extern compop_func op_91e0_0_comp_ff; +extern compop_func op_91e8_0_comp_ff; +extern compop_func op_91f0_0_comp_ff; +extern compop_func op_91f8_0_comp_ff; +extern compop_func op_91f9_0_comp_ff; +extern compop_func op_91fa_0_comp_ff; +extern compop_func op_91fb_0_comp_ff; +extern compop_func op_91fc_0_comp_ff; +extern compop_func op_b000_0_comp_ff; +extern compop_func op_b010_0_comp_ff; +extern compop_func op_b018_0_comp_ff; +extern compop_func op_b020_0_comp_ff; +extern compop_func op_b028_0_comp_ff; +extern compop_func op_b030_0_comp_ff; +extern compop_func op_b038_0_comp_ff; +extern compop_func op_b039_0_comp_ff; +extern compop_func op_b03a_0_comp_ff; +extern compop_func op_b03b_0_comp_ff; +extern compop_func op_b03c_0_comp_ff; +extern compop_func op_b040_0_comp_ff; +extern compop_func op_b048_0_comp_ff; +extern compop_func op_b050_0_comp_ff; +extern compop_func op_b058_0_comp_ff; +extern compop_func op_b060_0_comp_ff; +extern compop_func op_b068_0_comp_ff; +extern compop_func op_b070_0_comp_ff; +extern compop_func op_b078_0_comp_ff; +extern compop_func op_b079_0_comp_ff; +extern compop_func op_b07a_0_comp_ff; +extern compop_func op_b07b_0_comp_ff; +extern compop_func op_b07c_0_comp_ff; +extern compop_func op_b080_0_comp_ff; +extern compop_func op_b088_0_comp_ff; +extern compop_func op_b090_0_comp_ff; +extern compop_func op_b098_0_comp_ff; +extern compop_func op_b0a0_0_comp_ff; +extern compop_func op_b0a8_0_comp_ff; +extern compop_func op_b0b0_0_comp_ff; +extern compop_func op_b0b8_0_comp_ff; +extern compop_func op_b0b9_0_comp_ff; +extern compop_func op_b0ba_0_comp_ff; +extern compop_func op_b0bb_0_comp_ff; +extern compop_func op_b0bc_0_comp_ff; +extern compop_func op_b0c0_0_comp_ff; +extern compop_func op_b0c8_0_comp_ff; +extern compop_func op_b0d0_0_comp_ff; +extern compop_func op_b0d8_0_comp_ff; +extern compop_func op_b0e0_0_comp_ff; +extern compop_func op_b0e8_0_comp_ff; +extern compop_func op_b0f0_0_comp_ff; +extern compop_func op_b0f8_0_comp_ff; +extern compop_func op_b0f9_0_comp_ff; +extern compop_func op_b0fa_0_comp_ff; +extern compop_func op_b0fb_0_comp_ff; +extern compop_func op_b0fc_0_comp_ff; +extern compop_func op_b100_0_comp_ff; +extern compop_func op_b108_0_comp_ff; +extern compop_func op_b110_0_comp_ff; +extern compop_func op_b118_0_comp_ff; +extern compop_func op_b120_0_comp_ff; +extern compop_func op_b128_0_comp_ff; +extern compop_func op_b130_0_comp_ff; +extern compop_func op_b138_0_comp_ff; +extern compop_func op_b139_0_comp_ff; +extern compop_func op_b140_0_comp_ff; +extern compop_func op_b148_0_comp_ff; +extern compop_func op_b150_0_comp_ff; +extern compop_func op_b158_0_comp_ff; +extern compop_func op_b160_0_comp_ff; +extern compop_func op_b168_0_comp_ff; +extern compop_func op_b170_0_comp_ff; +extern compop_func op_b178_0_comp_ff; +extern compop_func op_b179_0_comp_ff; +extern compop_func op_b180_0_comp_ff; +extern compop_func op_b188_0_comp_ff; +extern compop_func op_b190_0_comp_ff; +extern compop_func op_b198_0_comp_ff; +extern compop_func op_b1a0_0_comp_ff; +extern compop_func op_b1a8_0_comp_ff; +extern compop_func op_b1b0_0_comp_ff; +extern compop_func op_b1b8_0_comp_ff; +extern compop_func op_b1b9_0_comp_ff; +extern compop_func op_b1c0_0_comp_ff; +extern compop_func op_b1c8_0_comp_ff; +extern compop_func op_b1d0_0_comp_ff; +extern compop_func op_b1d8_0_comp_ff; +extern compop_func op_b1e0_0_comp_ff; +extern compop_func op_b1e8_0_comp_ff; +extern compop_func op_b1f0_0_comp_ff; +extern compop_func op_b1f8_0_comp_ff; +extern compop_func op_b1f9_0_comp_ff; +extern compop_func op_b1fa_0_comp_ff; +extern compop_func op_b1fb_0_comp_ff; +extern compop_func op_b1fc_0_comp_ff; +extern compop_func op_c000_0_comp_ff; +extern compop_func op_c010_0_comp_ff; +extern compop_func op_c018_0_comp_ff; +extern compop_func op_c020_0_comp_ff; +extern compop_func op_c028_0_comp_ff; +extern compop_func op_c030_0_comp_ff; +extern compop_func op_c038_0_comp_ff; +extern compop_func op_c039_0_comp_ff; +extern compop_func op_c03a_0_comp_ff; +extern compop_func op_c03b_0_comp_ff; +extern compop_func op_c03c_0_comp_ff; +extern compop_func op_c040_0_comp_ff; +extern compop_func op_c050_0_comp_ff; +extern compop_func op_c058_0_comp_ff; +extern compop_func op_c060_0_comp_ff; +extern compop_func op_c068_0_comp_ff; +extern compop_func op_c070_0_comp_ff; +extern compop_func op_c078_0_comp_ff; +extern compop_func op_c079_0_comp_ff; +extern compop_func op_c07a_0_comp_ff; +extern compop_func op_c07b_0_comp_ff; +extern compop_func op_c07c_0_comp_ff; +extern compop_func op_c080_0_comp_ff; +extern compop_func op_c090_0_comp_ff; +extern compop_func op_c098_0_comp_ff; +extern compop_func op_c0a0_0_comp_ff; +extern compop_func op_c0a8_0_comp_ff; +extern compop_func op_c0b0_0_comp_ff; +extern compop_func op_c0b8_0_comp_ff; +extern compop_func op_c0b9_0_comp_ff; +extern compop_func op_c0ba_0_comp_ff; +extern compop_func op_c0bb_0_comp_ff; +extern compop_func op_c0bc_0_comp_ff; +extern compop_func op_c0c0_0_comp_ff; +extern compop_func op_c0d0_0_comp_ff; +extern compop_func op_c0d8_0_comp_ff; +extern compop_func op_c0e0_0_comp_ff; +extern compop_func op_c0e8_0_comp_ff; +extern compop_func op_c0f0_0_comp_ff; +extern compop_func op_c0f8_0_comp_ff; +extern compop_func op_c0f9_0_comp_ff; +extern compop_func op_c0fa_0_comp_ff; +extern compop_func op_c0fb_0_comp_ff; +extern compop_func op_c0fc_0_comp_ff; +extern compop_func op_c110_0_comp_ff; +extern compop_func op_c118_0_comp_ff; +extern compop_func op_c120_0_comp_ff; +extern compop_func op_c128_0_comp_ff; +extern compop_func op_c130_0_comp_ff; +extern compop_func op_c138_0_comp_ff; +extern compop_func op_c139_0_comp_ff; +extern compop_func op_c140_0_comp_ff; +extern compop_func op_c148_0_comp_ff; +extern compop_func op_c150_0_comp_ff; +extern compop_func op_c158_0_comp_ff; +extern compop_func op_c160_0_comp_ff; +extern compop_func op_c168_0_comp_ff; +extern compop_func op_c170_0_comp_ff; +extern compop_func op_c178_0_comp_ff; +extern compop_func op_c179_0_comp_ff; +extern compop_func op_c188_0_comp_ff; +extern compop_func op_c190_0_comp_ff; +extern compop_func op_c198_0_comp_ff; +extern compop_func op_c1a0_0_comp_ff; +extern compop_func op_c1a8_0_comp_ff; +extern compop_func op_c1b0_0_comp_ff; +extern compop_func op_c1b8_0_comp_ff; +extern compop_func op_c1b9_0_comp_ff; +extern compop_func op_c1c0_0_comp_ff; +extern compop_func op_c1d0_0_comp_ff; +extern compop_func op_c1d8_0_comp_ff; +extern compop_func op_c1e0_0_comp_ff; +extern compop_func op_c1e8_0_comp_ff; +extern compop_func op_c1f0_0_comp_ff; +extern compop_func op_c1f8_0_comp_ff; +extern compop_func op_c1f9_0_comp_ff; +extern compop_func op_c1fa_0_comp_ff; +extern compop_func op_c1fb_0_comp_ff; +extern compop_func op_c1fc_0_comp_ff; +extern compop_func op_d000_0_comp_ff; +extern compop_func op_d010_0_comp_ff; +extern compop_func op_d018_0_comp_ff; +extern compop_func op_d020_0_comp_ff; +extern compop_func op_d028_0_comp_ff; +extern compop_func op_d030_0_comp_ff; +extern compop_func op_d038_0_comp_ff; +extern compop_func op_d039_0_comp_ff; +extern compop_func op_d03a_0_comp_ff; +extern compop_func op_d03b_0_comp_ff; +extern compop_func op_d03c_0_comp_ff; +extern compop_func op_d040_0_comp_ff; +extern compop_func op_d048_0_comp_ff; +extern compop_func op_d050_0_comp_ff; +extern compop_func op_d058_0_comp_ff; +extern compop_func op_d060_0_comp_ff; +extern compop_func op_d068_0_comp_ff; +extern compop_func op_d070_0_comp_ff; +extern compop_func op_d078_0_comp_ff; +extern compop_func op_d079_0_comp_ff; +extern compop_func op_d07a_0_comp_ff; +extern compop_func op_d07b_0_comp_ff; +extern compop_func op_d07c_0_comp_ff; +extern compop_func op_d080_0_comp_ff; +extern compop_func op_d088_0_comp_ff; +extern compop_func op_d090_0_comp_ff; +extern compop_func op_d098_0_comp_ff; +extern compop_func op_d0a0_0_comp_ff; +extern compop_func op_d0a8_0_comp_ff; +extern compop_func op_d0b0_0_comp_ff; +extern compop_func op_d0b8_0_comp_ff; +extern compop_func op_d0b9_0_comp_ff; +extern compop_func op_d0ba_0_comp_ff; +extern compop_func op_d0bb_0_comp_ff; +extern compop_func op_d0bc_0_comp_ff; +extern compop_func op_d0c0_0_comp_ff; +extern compop_func op_d0c8_0_comp_ff; +extern compop_func op_d0d0_0_comp_ff; +extern compop_func op_d0d8_0_comp_ff; +extern compop_func op_d0e0_0_comp_ff; +extern compop_func op_d0e8_0_comp_ff; +extern compop_func op_d0f0_0_comp_ff; +extern compop_func op_d0f8_0_comp_ff; +extern compop_func op_d0f9_0_comp_ff; +extern compop_func op_d0fa_0_comp_ff; +extern compop_func op_d0fb_0_comp_ff; +extern compop_func op_d0fc_0_comp_ff; +extern compop_func op_d100_0_comp_ff; +extern compop_func op_d108_0_comp_ff; +extern compop_func op_d110_0_comp_ff; +extern compop_func op_d118_0_comp_ff; +extern compop_func op_d120_0_comp_ff; +extern compop_func op_d128_0_comp_ff; +extern compop_func op_d130_0_comp_ff; +extern compop_func op_d138_0_comp_ff; +extern compop_func op_d139_0_comp_ff; +extern compop_func op_d140_0_comp_ff; +extern compop_func op_d148_0_comp_ff; +extern compop_func op_d150_0_comp_ff; +extern compop_func op_d158_0_comp_ff; +extern compop_func op_d160_0_comp_ff; +extern compop_func op_d168_0_comp_ff; +extern compop_func op_d170_0_comp_ff; +extern compop_func op_d178_0_comp_ff; +extern compop_func op_d179_0_comp_ff; +extern compop_func op_d180_0_comp_ff; +extern compop_func op_d188_0_comp_ff; +extern compop_func op_d190_0_comp_ff; +extern compop_func op_d198_0_comp_ff; +extern compop_func op_d1a0_0_comp_ff; +extern compop_func op_d1a8_0_comp_ff; +extern compop_func op_d1b0_0_comp_ff; +extern compop_func op_d1b8_0_comp_ff; +extern compop_func op_d1b9_0_comp_ff; +extern compop_func op_d1c0_0_comp_ff; +extern compop_func op_d1c8_0_comp_ff; +extern compop_func op_d1d0_0_comp_ff; +extern compop_func op_d1d8_0_comp_ff; +extern compop_func op_d1e0_0_comp_ff; +extern compop_func op_d1e8_0_comp_ff; +extern compop_func op_d1f0_0_comp_ff; +extern compop_func op_d1f8_0_comp_ff; +extern compop_func op_d1f9_0_comp_ff; +extern compop_func op_d1fa_0_comp_ff; +extern compop_func op_d1fb_0_comp_ff; +extern compop_func op_d1fc_0_comp_ff; +extern compop_func op_e000_0_comp_ff; +extern compop_func op_e008_0_comp_ff; +extern compop_func op_e018_0_comp_ff; +extern compop_func op_e020_0_comp_ff; +extern compop_func op_e028_0_comp_ff; +extern compop_func op_e038_0_comp_ff; +extern compop_func op_e040_0_comp_ff; +extern compop_func op_e048_0_comp_ff; +extern compop_func op_e058_0_comp_ff; +extern compop_func op_e060_0_comp_ff; +extern compop_func op_e068_0_comp_ff; +extern compop_func op_e078_0_comp_ff; +extern compop_func op_e080_0_comp_ff; +extern compop_func op_e088_0_comp_ff; +extern compop_func op_e098_0_comp_ff; +extern compop_func op_e0a0_0_comp_ff; +extern compop_func op_e0a8_0_comp_ff; +extern compop_func op_e0b8_0_comp_ff; +extern compop_func op_e100_0_comp_ff; +extern compop_func op_e108_0_comp_ff; +extern compop_func op_e118_0_comp_ff; +extern compop_func op_e120_0_comp_ff; +extern compop_func op_e128_0_comp_ff; +extern compop_func op_e138_0_comp_ff; +extern compop_func op_e140_0_comp_ff; +extern compop_func op_e148_0_comp_ff; +extern compop_func op_e158_0_comp_ff; +extern compop_func op_e160_0_comp_ff; +extern compop_func op_e168_0_comp_ff; +extern compop_func op_e178_0_comp_ff; +extern compop_func op_e180_0_comp_ff; +extern compop_func op_e188_0_comp_ff; +extern compop_func op_e198_0_comp_ff; +extern compop_func op_e1a0_0_comp_ff; +extern compop_func op_e1a8_0_comp_ff; +extern compop_func op_e1b8_0_comp_ff; +extern compop_func op_f200_0_comp_ff; +extern compop_func op_f208_0_comp_ff; +extern compop_func op_f210_0_comp_ff; +extern compop_func op_f218_0_comp_ff; +extern compop_func op_f220_0_comp_ff; +extern compop_func op_f228_0_comp_ff; +extern compop_func op_f230_0_comp_ff; +extern compop_func op_f238_0_comp_ff; +extern compop_func op_f239_0_comp_ff; +extern compop_func op_f23a_0_comp_ff; +extern compop_func op_f23b_0_comp_ff; +extern compop_func op_f23c_0_comp_ff; +extern compop_func op_f240_0_comp_ff; +extern compop_func op_f250_0_comp_ff; +extern compop_func op_f258_0_comp_ff; +extern compop_func op_f260_0_comp_ff; +extern compop_func op_f268_0_comp_ff; +extern compop_func op_f270_0_comp_ff; +extern compop_func op_f278_0_comp_ff; +extern compop_func op_f279_0_comp_ff; +extern compop_func op_f280_0_comp_ff; +extern compop_func op_f2c0_0_comp_ff; +extern compop_func op_f600_0_comp_ff; +extern compop_func op_f608_0_comp_ff; +extern compop_func op_f610_0_comp_ff; +extern compop_func op_f618_0_comp_ff; +extern compop_func op_f620_0_comp_ff; +extern compop_func op_0_0_comp_nf; +extern compop_func op_10_0_comp_nf; +extern compop_func op_18_0_comp_nf; +extern compop_func op_20_0_comp_nf; +extern compop_func op_28_0_comp_nf; +extern compop_func op_30_0_comp_nf; +extern compop_func op_38_0_comp_nf; +extern compop_func op_39_0_comp_nf; +extern compop_func op_40_0_comp_nf; +extern compop_func op_50_0_comp_nf; +extern compop_func op_58_0_comp_nf; +extern compop_func op_60_0_comp_nf; +extern compop_func op_68_0_comp_nf; +extern compop_func op_70_0_comp_nf; +extern compop_func op_78_0_comp_nf; +extern compop_func op_79_0_comp_nf; +extern compop_func op_80_0_comp_nf; +extern compop_func op_90_0_comp_nf; +extern compop_func op_98_0_comp_nf; +extern compop_func op_a0_0_comp_nf; +extern compop_func op_a8_0_comp_nf; +extern compop_func op_b0_0_comp_nf; +extern compop_func op_b8_0_comp_nf; +extern compop_func op_b9_0_comp_nf; +extern compop_func op_100_0_comp_nf; +extern compop_func op_110_0_comp_nf; +extern compop_func op_118_0_comp_nf; +extern compop_func op_120_0_comp_nf; +extern compop_func op_128_0_comp_nf; +extern compop_func op_130_0_comp_nf; +extern compop_func op_138_0_comp_nf; +extern compop_func op_139_0_comp_nf; +extern compop_func op_13a_0_comp_nf; +extern compop_func op_13b_0_comp_nf; +extern compop_func op_13c_0_comp_nf; +extern compop_func op_140_0_comp_nf; +extern compop_func op_150_0_comp_nf; +extern compop_func op_158_0_comp_nf; +extern compop_func op_160_0_comp_nf; +extern compop_func op_168_0_comp_nf; +extern compop_func op_170_0_comp_nf; +extern compop_func op_178_0_comp_nf; +extern compop_func op_179_0_comp_nf; +extern compop_func op_180_0_comp_nf; +extern compop_func op_190_0_comp_nf; +extern compop_func op_198_0_comp_nf; +extern compop_func op_1a0_0_comp_nf; +extern compop_func op_1a8_0_comp_nf; +extern compop_func op_1b0_0_comp_nf; +extern compop_func op_1b8_0_comp_nf; +extern compop_func op_1b9_0_comp_nf; +extern compop_func op_1c0_0_comp_nf; +extern compop_func op_1d0_0_comp_nf; +extern compop_func op_1d8_0_comp_nf; +extern compop_func op_1e0_0_comp_nf; +extern compop_func op_1e8_0_comp_nf; +extern compop_func op_1f0_0_comp_nf; +extern compop_func op_1f8_0_comp_nf; +extern compop_func op_1f9_0_comp_nf; +extern compop_func op_200_0_comp_nf; +extern compop_func op_210_0_comp_nf; +extern compop_func op_218_0_comp_nf; +extern compop_func op_220_0_comp_nf; +extern compop_func op_228_0_comp_nf; +extern compop_func op_230_0_comp_nf; +extern compop_func op_238_0_comp_nf; +extern compop_func op_239_0_comp_nf; +extern compop_func op_240_0_comp_nf; +extern compop_func op_250_0_comp_nf; +extern compop_func op_258_0_comp_nf; +extern compop_func op_260_0_comp_nf; +extern compop_func op_268_0_comp_nf; +extern compop_func op_270_0_comp_nf; +extern compop_func op_278_0_comp_nf; +extern compop_func op_279_0_comp_nf; +extern compop_func op_280_0_comp_nf; +extern compop_func op_290_0_comp_nf; +extern compop_func op_298_0_comp_nf; +extern compop_func op_2a0_0_comp_nf; +extern compop_func op_2a8_0_comp_nf; +extern compop_func op_2b0_0_comp_nf; +extern compop_func op_2b8_0_comp_nf; +extern compop_func op_2b9_0_comp_nf; +extern compop_func op_400_0_comp_nf; +extern compop_func op_410_0_comp_nf; +extern compop_func op_418_0_comp_nf; +extern compop_func op_420_0_comp_nf; +extern compop_func op_428_0_comp_nf; +extern compop_func op_430_0_comp_nf; +extern compop_func op_438_0_comp_nf; +extern compop_func op_439_0_comp_nf; +extern compop_func op_440_0_comp_nf; +extern compop_func op_450_0_comp_nf; +extern compop_func op_458_0_comp_nf; +extern compop_func op_460_0_comp_nf; +extern compop_func op_468_0_comp_nf; +extern compop_func op_470_0_comp_nf; +extern compop_func op_478_0_comp_nf; +extern compop_func op_479_0_comp_nf; +extern compop_func op_480_0_comp_nf; +extern compop_func op_490_0_comp_nf; +extern compop_func op_498_0_comp_nf; +extern compop_func op_4a0_0_comp_nf; +extern compop_func op_4a8_0_comp_nf; +extern compop_func op_4b0_0_comp_nf; +extern compop_func op_4b8_0_comp_nf; +extern compop_func op_4b9_0_comp_nf; +extern compop_func op_600_0_comp_nf; +extern compop_func op_610_0_comp_nf; +extern compop_func op_618_0_comp_nf; +extern compop_func op_620_0_comp_nf; +extern compop_func op_628_0_comp_nf; +extern compop_func op_630_0_comp_nf; +extern compop_func op_638_0_comp_nf; +extern compop_func op_639_0_comp_nf; +extern compop_func op_640_0_comp_nf; +extern compop_func op_650_0_comp_nf; +extern compop_func op_658_0_comp_nf; +extern compop_func op_660_0_comp_nf; +extern compop_func op_668_0_comp_nf; +extern compop_func op_670_0_comp_nf; +extern compop_func op_678_0_comp_nf; +extern compop_func op_679_0_comp_nf; +extern compop_func op_680_0_comp_nf; +extern compop_func op_690_0_comp_nf; +extern compop_func op_698_0_comp_nf; +extern compop_func op_6a0_0_comp_nf; +extern compop_func op_6a8_0_comp_nf; +extern compop_func op_6b0_0_comp_nf; +extern compop_func op_6b8_0_comp_nf; +extern compop_func op_6b9_0_comp_nf; +extern compop_func op_800_0_comp_nf; +extern compop_func op_810_0_comp_nf; +extern compop_func op_818_0_comp_nf; +extern compop_func op_820_0_comp_nf; +extern compop_func op_828_0_comp_nf; +extern compop_func op_830_0_comp_nf; +extern compop_func op_838_0_comp_nf; +extern compop_func op_839_0_comp_nf; +extern compop_func op_83a_0_comp_nf; +extern compop_func op_83b_0_comp_nf; +extern compop_func op_840_0_comp_nf; +extern compop_func op_850_0_comp_nf; +extern compop_func op_858_0_comp_nf; +extern compop_func op_860_0_comp_nf; +extern compop_func op_868_0_comp_nf; +extern compop_func op_870_0_comp_nf; +extern compop_func op_878_0_comp_nf; +extern compop_func op_879_0_comp_nf; +extern compop_func op_880_0_comp_nf; +extern compop_func op_890_0_comp_nf; +extern compop_func op_898_0_comp_nf; +extern compop_func op_8a0_0_comp_nf; +extern compop_func op_8a8_0_comp_nf; +extern compop_func op_8b0_0_comp_nf; +extern compop_func op_8b8_0_comp_nf; +extern compop_func op_8b9_0_comp_nf; +extern compop_func op_8c0_0_comp_nf; +extern compop_func op_8d0_0_comp_nf; +extern compop_func op_8d8_0_comp_nf; +extern compop_func op_8e0_0_comp_nf; +extern compop_func op_8e8_0_comp_nf; +extern compop_func op_8f0_0_comp_nf; +extern compop_func op_8f8_0_comp_nf; +extern compop_func op_8f9_0_comp_nf; +extern compop_func op_a00_0_comp_nf; +extern compop_func op_a10_0_comp_nf; +extern compop_func op_a18_0_comp_nf; +extern compop_func op_a20_0_comp_nf; +extern compop_func op_a28_0_comp_nf; +extern compop_func op_a30_0_comp_nf; +extern compop_func op_a38_0_comp_nf; +extern compop_func op_a39_0_comp_nf; +extern compop_func op_a40_0_comp_nf; +extern compop_func op_a50_0_comp_nf; +extern compop_func op_a58_0_comp_nf; +extern compop_func op_a60_0_comp_nf; +extern compop_func op_a68_0_comp_nf; +extern compop_func op_a70_0_comp_nf; +extern compop_func op_a78_0_comp_nf; +extern compop_func op_a79_0_comp_nf; +extern compop_func op_a80_0_comp_nf; +extern compop_func op_a90_0_comp_nf; +extern compop_func op_a98_0_comp_nf; +extern compop_func op_aa0_0_comp_nf; +extern compop_func op_aa8_0_comp_nf; +extern compop_func op_ab0_0_comp_nf; +extern compop_func op_ab8_0_comp_nf; +extern compop_func op_ab9_0_comp_nf; +extern compop_func op_c00_0_comp_nf; +extern compop_func op_c10_0_comp_nf; +extern compop_func op_c18_0_comp_nf; +extern compop_func op_c20_0_comp_nf; +extern compop_func op_c28_0_comp_nf; +extern compop_func op_c30_0_comp_nf; +extern compop_func op_c38_0_comp_nf; +extern compop_func op_c39_0_comp_nf; +extern compop_func op_c3a_0_comp_nf; +extern compop_func op_c3b_0_comp_nf; +extern compop_func op_c40_0_comp_nf; +extern compop_func op_c50_0_comp_nf; +extern compop_func op_c58_0_comp_nf; +extern compop_func op_c60_0_comp_nf; +extern compop_func op_c68_0_comp_nf; +extern compop_func op_c70_0_comp_nf; +extern compop_func op_c78_0_comp_nf; +extern compop_func op_c79_0_comp_nf; +extern compop_func op_c7a_0_comp_nf; +extern compop_func op_c7b_0_comp_nf; +extern compop_func op_c80_0_comp_nf; +extern compop_func op_c90_0_comp_nf; +extern compop_func op_c98_0_comp_nf; +extern compop_func op_ca0_0_comp_nf; +extern compop_func op_ca8_0_comp_nf; +extern compop_func op_cb0_0_comp_nf; +extern compop_func op_cb8_0_comp_nf; +extern compop_func op_cb9_0_comp_nf; +extern compop_func op_cba_0_comp_nf; +extern compop_func op_cbb_0_comp_nf; +extern compop_func op_1000_0_comp_nf; +extern compop_func op_1010_0_comp_nf; +extern compop_func op_1018_0_comp_nf; +extern compop_func op_1020_0_comp_nf; +extern compop_func op_1028_0_comp_nf; +extern compop_func op_1030_0_comp_nf; +extern compop_func op_1038_0_comp_nf; +extern compop_func op_1039_0_comp_nf; +extern compop_func op_103a_0_comp_nf; +extern compop_func op_103b_0_comp_nf; +extern compop_func op_103c_0_comp_nf; +extern compop_func op_1080_0_comp_nf; +extern compop_func op_1090_0_comp_nf; +extern compop_func op_1098_0_comp_nf; +extern compop_func op_10a0_0_comp_nf; +extern compop_func op_10a8_0_comp_nf; +extern compop_func op_10b0_0_comp_nf; +extern compop_func op_10b8_0_comp_nf; +extern compop_func op_10b9_0_comp_nf; +extern compop_func op_10ba_0_comp_nf; +extern compop_func op_10bb_0_comp_nf; +extern compop_func op_10bc_0_comp_nf; +extern compop_func op_10c0_0_comp_nf; +extern compop_func op_10d0_0_comp_nf; +extern compop_func op_10d8_0_comp_nf; +extern compop_func op_10e0_0_comp_nf; +extern compop_func op_10e8_0_comp_nf; +extern compop_func op_10f0_0_comp_nf; +extern compop_func op_10f8_0_comp_nf; +extern compop_func op_10f9_0_comp_nf; +extern compop_func op_10fa_0_comp_nf; +extern compop_func op_10fb_0_comp_nf; +extern compop_func op_10fc_0_comp_nf; +extern compop_func op_1100_0_comp_nf; +extern compop_func op_1110_0_comp_nf; +extern compop_func op_1118_0_comp_nf; +extern compop_func op_1120_0_comp_nf; +extern compop_func op_1128_0_comp_nf; +extern compop_func op_1130_0_comp_nf; +extern compop_func op_1138_0_comp_nf; +extern compop_func op_1139_0_comp_nf; +extern compop_func op_113a_0_comp_nf; +extern compop_func op_113b_0_comp_nf; +extern compop_func op_113c_0_comp_nf; +extern compop_func op_1140_0_comp_nf; +extern compop_func op_1150_0_comp_nf; +extern compop_func op_1158_0_comp_nf; +extern compop_func op_1160_0_comp_nf; +extern compop_func op_1168_0_comp_nf; +extern compop_func op_1170_0_comp_nf; +extern compop_func op_1178_0_comp_nf; +extern compop_func op_1179_0_comp_nf; +extern compop_func op_117a_0_comp_nf; +extern compop_func op_117b_0_comp_nf; +extern compop_func op_117c_0_comp_nf; +extern compop_func op_1180_0_comp_nf; +extern compop_func op_1190_0_comp_nf; +extern compop_func op_1198_0_comp_nf; +extern compop_func op_11a0_0_comp_nf; +extern compop_func op_11a8_0_comp_nf; +extern compop_func op_11b0_0_comp_nf; +extern compop_func op_11b8_0_comp_nf; +extern compop_func op_11b9_0_comp_nf; +extern compop_func op_11ba_0_comp_nf; +extern compop_func op_11bb_0_comp_nf; +extern compop_func op_11bc_0_comp_nf; +extern compop_func op_11c0_0_comp_nf; +extern compop_func op_11d0_0_comp_nf; +extern compop_func op_11d8_0_comp_nf; +extern compop_func op_11e0_0_comp_nf; +extern compop_func op_11e8_0_comp_nf; +extern compop_func op_11f0_0_comp_nf; +extern compop_func op_11f8_0_comp_nf; +extern compop_func op_11f9_0_comp_nf; +extern compop_func op_11fa_0_comp_nf; +extern compop_func op_11fb_0_comp_nf; +extern compop_func op_11fc_0_comp_nf; +extern compop_func op_13c0_0_comp_nf; +extern compop_func op_13d0_0_comp_nf; +extern compop_func op_13d8_0_comp_nf; +extern compop_func op_13e0_0_comp_nf; +extern compop_func op_13e8_0_comp_nf; +extern compop_func op_13f0_0_comp_nf; +extern compop_func op_13f8_0_comp_nf; +extern compop_func op_13f9_0_comp_nf; +extern compop_func op_13fa_0_comp_nf; +extern compop_func op_13fb_0_comp_nf; +extern compop_func op_13fc_0_comp_nf; +extern compop_func op_2000_0_comp_nf; +extern compop_func op_2008_0_comp_nf; +extern compop_func op_2010_0_comp_nf; +extern compop_func op_2018_0_comp_nf; +extern compop_func op_2020_0_comp_nf; +extern compop_func op_2028_0_comp_nf; +extern compop_func op_2030_0_comp_nf; +extern compop_func op_2038_0_comp_nf; +extern compop_func op_2039_0_comp_nf; +extern compop_func op_203a_0_comp_nf; +extern compop_func op_203b_0_comp_nf; +extern compop_func op_203c_0_comp_nf; +extern compop_func op_2040_0_comp_nf; +extern compop_func op_2048_0_comp_nf; +extern compop_func op_2050_0_comp_nf; +extern compop_func op_2058_0_comp_nf; +extern compop_func op_2060_0_comp_nf; +extern compop_func op_2068_0_comp_nf; +extern compop_func op_2070_0_comp_nf; +extern compop_func op_2078_0_comp_nf; +extern compop_func op_2079_0_comp_nf; +extern compop_func op_207a_0_comp_nf; +extern compop_func op_207b_0_comp_nf; +extern compop_func op_207c_0_comp_nf; +extern compop_func op_2080_0_comp_nf; +extern compop_func op_2088_0_comp_nf; +extern compop_func op_2090_0_comp_nf; +extern compop_func op_2098_0_comp_nf; +extern compop_func op_20a0_0_comp_nf; +extern compop_func op_20a8_0_comp_nf; +extern compop_func op_20b0_0_comp_nf; +extern compop_func op_20b8_0_comp_nf; +extern compop_func op_20b9_0_comp_nf; +extern compop_func op_20ba_0_comp_nf; +extern compop_func op_20bb_0_comp_nf; +extern compop_func op_20bc_0_comp_nf; +extern compop_func op_20c0_0_comp_nf; +extern compop_func op_20c8_0_comp_nf; +extern compop_func op_20d0_0_comp_nf; +extern compop_func op_20d8_0_comp_nf; +extern compop_func op_20e0_0_comp_nf; +extern compop_func op_20e8_0_comp_nf; +extern compop_func op_20f0_0_comp_nf; +extern compop_func op_20f8_0_comp_nf; +extern compop_func op_20f9_0_comp_nf; +extern compop_func op_20fa_0_comp_nf; +extern compop_func op_20fb_0_comp_nf; +extern compop_func op_20fc_0_comp_nf; +extern compop_func op_2100_0_comp_nf; +extern compop_func op_2108_0_comp_nf; +extern compop_func op_2110_0_comp_nf; +extern compop_func op_2118_0_comp_nf; +extern compop_func op_2120_0_comp_nf; +extern compop_func op_2128_0_comp_nf; +extern compop_func op_2130_0_comp_nf; +extern compop_func op_2138_0_comp_nf; +extern compop_func op_2139_0_comp_nf; +extern compop_func op_213a_0_comp_nf; +extern compop_func op_213b_0_comp_nf; +extern compop_func op_213c_0_comp_nf; +extern compop_func op_2140_0_comp_nf; +extern compop_func op_2148_0_comp_nf; +extern compop_func op_2150_0_comp_nf; +extern compop_func op_2158_0_comp_nf; +extern compop_func op_2160_0_comp_nf; +extern compop_func op_2168_0_comp_nf; +extern compop_func op_2170_0_comp_nf; +extern compop_func op_2178_0_comp_nf; +extern compop_func op_2179_0_comp_nf; +extern compop_func op_217a_0_comp_nf; +extern compop_func op_217b_0_comp_nf; +extern compop_func op_217c_0_comp_nf; +extern compop_func op_2180_0_comp_nf; +extern compop_func op_2188_0_comp_nf; +extern compop_func op_2190_0_comp_nf; +extern compop_func op_2198_0_comp_nf; +extern compop_func op_21a0_0_comp_nf; +extern compop_func op_21a8_0_comp_nf; +extern compop_func op_21b0_0_comp_nf; +extern compop_func op_21b8_0_comp_nf; +extern compop_func op_21b9_0_comp_nf; +extern compop_func op_21ba_0_comp_nf; +extern compop_func op_21bb_0_comp_nf; +extern compop_func op_21bc_0_comp_nf; +extern compop_func op_21c0_0_comp_nf; +extern compop_func op_21c8_0_comp_nf; +extern compop_func op_21d0_0_comp_nf; +extern compop_func op_21d8_0_comp_nf; +extern compop_func op_21e0_0_comp_nf; +extern compop_func op_21e8_0_comp_nf; +extern compop_func op_21f0_0_comp_nf; +extern compop_func op_21f8_0_comp_nf; +extern compop_func op_21f9_0_comp_nf; +extern compop_func op_21fa_0_comp_nf; +extern compop_func op_21fb_0_comp_nf; +extern compop_func op_21fc_0_comp_nf; +extern compop_func op_23c0_0_comp_nf; +extern compop_func op_23c8_0_comp_nf; +extern compop_func op_23d0_0_comp_nf; +extern compop_func op_23d8_0_comp_nf; +extern compop_func op_23e0_0_comp_nf; +extern compop_func op_23e8_0_comp_nf; +extern compop_func op_23f0_0_comp_nf; +extern compop_func op_23f8_0_comp_nf; +extern compop_func op_23f9_0_comp_nf; +extern compop_func op_23fa_0_comp_nf; +extern compop_func op_23fb_0_comp_nf; +extern compop_func op_23fc_0_comp_nf; +extern compop_func op_3000_0_comp_nf; +extern compop_func op_3008_0_comp_nf; +extern compop_func op_3010_0_comp_nf; +extern compop_func op_3018_0_comp_nf; +extern compop_func op_3020_0_comp_nf; +extern compop_func op_3028_0_comp_nf; +extern compop_func op_3030_0_comp_nf; +extern compop_func op_3038_0_comp_nf; +extern compop_func op_3039_0_comp_nf; +extern compop_func op_303a_0_comp_nf; +extern compop_func op_303b_0_comp_nf; +extern compop_func op_303c_0_comp_nf; +extern compop_func op_3040_0_comp_nf; +extern compop_func op_3048_0_comp_nf; +extern compop_func op_3050_0_comp_nf; +extern compop_func op_3058_0_comp_nf; +extern compop_func op_3060_0_comp_nf; +extern compop_func op_3068_0_comp_nf; +extern compop_func op_3070_0_comp_nf; +extern compop_func op_3078_0_comp_nf; +extern compop_func op_3079_0_comp_nf; +extern compop_func op_307a_0_comp_nf; +extern compop_func op_307b_0_comp_nf; +extern compop_func op_307c_0_comp_nf; +extern compop_func op_3080_0_comp_nf; +extern compop_func op_3088_0_comp_nf; +extern compop_func op_3090_0_comp_nf; +extern compop_func op_3098_0_comp_nf; +extern compop_func op_30a0_0_comp_nf; +extern compop_func op_30a8_0_comp_nf; +extern compop_func op_30b0_0_comp_nf; +extern compop_func op_30b8_0_comp_nf; +extern compop_func op_30b9_0_comp_nf; +extern compop_func op_30ba_0_comp_nf; +extern compop_func op_30bb_0_comp_nf; +extern compop_func op_30bc_0_comp_nf; +extern compop_func op_30c0_0_comp_nf; +extern compop_func op_30c8_0_comp_nf; +extern compop_func op_30d0_0_comp_nf; +extern compop_func op_30d8_0_comp_nf; +extern compop_func op_30e0_0_comp_nf; +extern compop_func op_30e8_0_comp_nf; +extern compop_func op_30f0_0_comp_nf; +extern compop_func op_30f8_0_comp_nf; +extern compop_func op_30f9_0_comp_nf; +extern compop_func op_30fa_0_comp_nf; +extern compop_func op_30fb_0_comp_nf; +extern compop_func op_30fc_0_comp_nf; +extern compop_func op_3100_0_comp_nf; +extern compop_func op_3108_0_comp_nf; +extern compop_func op_3110_0_comp_nf; +extern compop_func op_3118_0_comp_nf; +extern compop_func op_3120_0_comp_nf; +extern compop_func op_3128_0_comp_nf; +extern compop_func op_3130_0_comp_nf; +extern compop_func op_3138_0_comp_nf; +extern compop_func op_3139_0_comp_nf; +extern compop_func op_313a_0_comp_nf; +extern compop_func op_313b_0_comp_nf; +extern compop_func op_313c_0_comp_nf; +extern compop_func op_3140_0_comp_nf; +extern compop_func op_3148_0_comp_nf; +extern compop_func op_3150_0_comp_nf; +extern compop_func op_3158_0_comp_nf; +extern compop_func op_3160_0_comp_nf; +extern compop_func op_3168_0_comp_nf; +extern compop_func op_3170_0_comp_nf; +extern compop_func op_3178_0_comp_nf; +extern compop_func op_3179_0_comp_nf; +extern compop_func op_317a_0_comp_nf; +extern compop_func op_317b_0_comp_nf; +extern compop_func op_317c_0_comp_nf; +extern compop_func op_3180_0_comp_nf; +extern compop_func op_3188_0_comp_nf; +extern compop_func op_3190_0_comp_nf; +extern compop_func op_3198_0_comp_nf; +extern compop_func op_31a0_0_comp_nf; +extern compop_func op_31a8_0_comp_nf; +extern compop_func op_31b0_0_comp_nf; +extern compop_func op_31b8_0_comp_nf; +extern compop_func op_31b9_0_comp_nf; +extern compop_func op_31ba_0_comp_nf; +extern compop_func op_31bb_0_comp_nf; +extern compop_func op_31bc_0_comp_nf; +extern compop_func op_31c0_0_comp_nf; +extern compop_func op_31c8_0_comp_nf; +extern compop_func op_31d0_0_comp_nf; +extern compop_func op_31d8_0_comp_nf; +extern compop_func op_31e0_0_comp_nf; +extern compop_func op_31e8_0_comp_nf; +extern compop_func op_31f0_0_comp_nf; +extern compop_func op_31f8_0_comp_nf; +extern compop_func op_31f9_0_comp_nf; +extern compop_func op_31fa_0_comp_nf; +extern compop_func op_31fb_0_comp_nf; +extern compop_func op_31fc_0_comp_nf; +extern compop_func op_33c0_0_comp_nf; +extern compop_func op_33c8_0_comp_nf; +extern compop_func op_33d0_0_comp_nf; +extern compop_func op_33d8_0_comp_nf; +extern compop_func op_33e0_0_comp_nf; +extern compop_func op_33e8_0_comp_nf; +extern compop_func op_33f0_0_comp_nf; +extern compop_func op_33f8_0_comp_nf; +extern compop_func op_33f9_0_comp_nf; +extern compop_func op_33fa_0_comp_nf; +extern compop_func op_33fb_0_comp_nf; +extern compop_func op_33fc_0_comp_nf; +extern compop_func op_4000_0_comp_nf; +extern compop_func op_4010_0_comp_nf; +extern compop_func op_4018_0_comp_nf; +extern compop_func op_4020_0_comp_nf; +extern compop_func op_4028_0_comp_nf; +extern compop_func op_4030_0_comp_nf; +extern compop_func op_4038_0_comp_nf; +extern compop_func op_4039_0_comp_nf; +extern compop_func op_4040_0_comp_nf; +extern compop_func op_4050_0_comp_nf; +extern compop_func op_4058_0_comp_nf; +extern compop_func op_4060_0_comp_nf; +extern compop_func op_4068_0_comp_nf; +extern compop_func op_4070_0_comp_nf; +extern compop_func op_4078_0_comp_nf; +extern compop_func op_4079_0_comp_nf; +extern compop_func op_4080_0_comp_nf; +extern compop_func op_4090_0_comp_nf; +extern compop_func op_4098_0_comp_nf; +extern compop_func op_40a0_0_comp_nf; +extern compop_func op_40a8_0_comp_nf; +extern compop_func op_40b0_0_comp_nf; +extern compop_func op_40b8_0_comp_nf; +extern compop_func op_40b9_0_comp_nf; +extern compop_func op_41d0_0_comp_nf; +extern compop_func op_41e8_0_comp_nf; +extern compop_func op_41f0_0_comp_nf; +extern compop_func op_41f8_0_comp_nf; +extern compop_func op_41f9_0_comp_nf; +extern compop_func op_41fa_0_comp_nf; +extern compop_func op_41fb_0_comp_nf; +extern compop_func op_4200_0_comp_nf; +extern compop_func op_4210_0_comp_nf; +extern compop_func op_4218_0_comp_nf; +extern compop_func op_4220_0_comp_nf; +extern compop_func op_4228_0_comp_nf; +extern compop_func op_4230_0_comp_nf; +extern compop_func op_4238_0_comp_nf; +extern compop_func op_4239_0_comp_nf; +extern compop_func op_4240_0_comp_nf; +extern compop_func op_4250_0_comp_nf; +extern compop_func op_4258_0_comp_nf; +extern compop_func op_4260_0_comp_nf; +extern compop_func op_4268_0_comp_nf; +extern compop_func op_4270_0_comp_nf; +extern compop_func op_4278_0_comp_nf; +extern compop_func op_4279_0_comp_nf; +extern compop_func op_4280_0_comp_nf; +extern compop_func op_4290_0_comp_nf; +extern compop_func op_4298_0_comp_nf; +extern compop_func op_42a0_0_comp_nf; +extern compop_func op_42a8_0_comp_nf; +extern compop_func op_42b0_0_comp_nf; +extern compop_func op_42b8_0_comp_nf; +extern compop_func op_42b9_0_comp_nf; +extern compop_func op_4400_0_comp_nf; +extern compop_func op_4410_0_comp_nf; +extern compop_func op_4418_0_comp_nf; +extern compop_func op_4420_0_comp_nf; +extern compop_func op_4428_0_comp_nf; +extern compop_func op_4430_0_comp_nf; +extern compop_func op_4438_0_comp_nf; +extern compop_func op_4439_0_comp_nf; +extern compop_func op_4440_0_comp_nf; +extern compop_func op_4450_0_comp_nf; +extern compop_func op_4458_0_comp_nf; +extern compop_func op_4460_0_comp_nf; +extern compop_func op_4468_0_comp_nf; +extern compop_func op_4470_0_comp_nf; +extern compop_func op_4478_0_comp_nf; +extern compop_func op_4479_0_comp_nf; +extern compop_func op_4480_0_comp_nf; +extern compop_func op_4490_0_comp_nf; +extern compop_func op_4498_0_comp_nf; +extern compop_func op_44a0_0_comp_nf; +extern compop_func op_44a8_0_comp_nf; +extern compop_func op_44b0_0_comp_nf; +extern compop_func op_44b8_0_comp_nf; +extern compop_func op_44b9_0_comp_nf; +extern compop_func op_4600_0_comp_nf; +extern compop_func op_4610_0_comp_nf; +extern compop_func op_4618_0_comp_nf; +extern compop_func op_4620_0_comp_nf; +extern compop_func op_4628_0_comp_nf; +extern compop_func op_4630_0_comp_nf; +extern compop_func op_4638_0_comp_nf; +extern compop_func op_4639_0_comp_nf; +extern compop_func op_4640_0_comp_nf; +extern compop_func op_4650_0_comp_nf; +extern compop_func op_4658_0_comp_nf; +extern compop_func op_4660_0_comp_nf; +extern compop_func op_4668_0_comp_nf; +extern compop_func op_4670_0_comp_nf; +extern compop_func op_4678_0_comp_nf; +extern compop_func op_4679_0_comp_nf; +extern compop_func op_4680_0_comp_nf; +extern compop_func op_4690_0_comp_nf; +extern compop_func op_4698_0_comp_nf; +extern compop_func op_46a0_0_comp_nf; +extern compop_func op_46a8_0_comp_nf; +extern compop_func op_46b0_0_comp_nf; +extern compop_func op_46b8_0_comp_nf; +extern compop_func op_46b9_0_comp_nf; +extern compop_func op_4808_0_comp_nf; +extern compop_func op_4840_0_comp_nf; +extern compop_func op_4850_0_comp_nf; +extern compop_func op_4868_0_comp_nf; +extern compop_func op_4870_0_comp_nf; +extern compop_func op_4878_0_comp_nf; +extern compop_func op_4879_0_comp_nf; +extern compop_func op_487a_0_comp_nf; +extern compop_func op_487b_0_comp_nf; +extern compop_func op_4880_0_comp_nf; +extern compop_func op_4890_0_comp_nf; +extern compop_func op_48a0_0_comp_nf; +extern compop_func op_48a8_0_comp_nf; +extern compop_func op_48b0_0_comp_nf; +extern compop_func op_48b8_0_comp_nf; +extern compop_func op_48b9_0_comp_nf; +extern compop_func op_48c0_0_comp_nf; +extern compop_func op_48d0_0_comp_nf; +extern compop_func op_48e0_0_comp_nf; +extern compop_func op_48e8_0_comp_nf; +extern compop_func op_48f0_0_comp_nf; +extern compop_func op_48f8_0_comp_nf; +extern compop_func op_48f9_0_comp_nf; +extern compop_func op_49c0_0_comp_nf; +extern compop_func op_4a00_0_comp_nf; +extern compop_func op_4a10_0_comp_nf; +extern compop_func op_4a18_0_comp_nf; +extern compop_func op_4a20_0_comp_nf; +extern compop_func op_4a28_0_comp_nf; +extern compop_func op_4a30_0_comp_nf; +extern compop_func op_4a38_0_comp_nf; +extern compop_func op_4a39_0_comp_nf; +extern compop_func op_4a3a_0_comp_nf; +extern compop_func op_4a3b_0_comp_nf; +extern compop_func op_4a3c_0_comp_nf; +extern compop_func op_4a40_0_comp_nf; +extern compop_func op_4a48_0_comp_nf; +extern compop_func op_4a50_0_comp_nf; +extern compop_func op_4a58_0_comp_nf; +extern compop_func op_4a60_0_comp_nf; +extern compop_func op_4a68_0_comp_nf; +extern compop_func op_4a70_0_comp_nf; +extern compop_func op_4a78_0_comp_nf; +extern compop_func op_4a79_0_comp_nf; +extern compop_func op_4a7a_0_comp_nf; +extern compop_func op_4a7b_0_comp_nf; +extern compop_func op_4a7c_0_comp_nf; +extern compop_func op_4a80_0_comp_nf; +extern compop_func op_4a88_0_comp_nf; +extern compop_func op_4a90_0_comp_nf; +extern compop_func op_4a98_0_comp_nf; +extern compop_func op_4aa0_0_comp_nf; +extern compop_func op_4aa8_0_comp_nf; +extern compop_func op_4ab0_0_comp_nf; +extern compop_func op_4ab8_0_comp_nf; +extern compop_func op_4ab9_0_comp_nf; +extern compop_func op_4aba_0_comp_nf; +extern compop_func op_4abb_0_comp_nf; +extern compop_func op_4abc_0_comp_nf; +extern compop_func op_4c00_0_comp_nf; +extern compop_func op_4c10_0_comp_nf; +extern compop_func op_4c18_0_comp_nf; +extern compop_func op_4c20_0_comp_nf; +extern compop_func op_4c28_0_comp_nf; +extern compop_func op_4c30_0_comp_nf; +extern compop_func op_4c38_0_comp_nf; +extern compop_func op_4c39_0_comp_nf; +extern compop_func op_4c3a_0_comp_nf; +extern compop_func op_4c3b_0_comp_nf; +extern compop_func op_4c3c_0_comp_nf; +extern compop_func op_4c90_0_comp_nf; +extern compop_func op_4c98_0_comp_nf; +extern compop_func op_4ca8_0_comp_nf; +extern compop_func op_4cb0_0_comp_nf; +extern compop_func op_4cb8_0_comp_nf; +extern compop_func op_4cb9_0_comp_nf; +extern compop_func op_4cba_0_comp_nf; +extern compop_func op_4cbb_0_comp_nf; +extern compop_func op_4cd0_0_comp_nf; +extern compop_func op_4cd8_0_comp_nf; +extern compop_func op_4ce8_0_comp_nf; +extern compop_func op_4cf0_0_comp_nf; +extern compop_func op_4cf8_0_comp_nf; +extern compop_func op_4cf9_0_comp_nf; +extern compop_func op_4cfa_0_comp_nf; +extern compop_func op_4cfb_0_comp_nf; +extern compop_func op_4e50_0_comp_nf; +extern compop_func op_4e58_0_comp_nf; +extern compop_func op_4e71_0_comp_nf; +extern compop_func op_4e74_0_comp_nf; +extern compop_func op_4e75_0_comp_nf; +extern compop_func op_4e90_0_comp_nf; +extern compop_func op_4ea8_0_comp_nf; +extern compop_func op_4eb0_0_comp_nf; +extern compop_func op_4eb8_0_comp_nf; +extern compop_func op_4eb9_0_comp_nf; +extern compop_func op_4eba_0_comp_nf; +extern compop_func op_4ebb_0_comp_nf; +extern compop_func op_4ed0_0_comp_nf; +extern compop_func op_4ee8_0_comp_nf; +extern compop_func op_4ef0_0_comp_nf; +extern compop_func op_4ef8_0_comp_nf; +extern compop_func op_4ef9_0_comp_nf; +extern compop_func op_4efa_0_comp_nf; +extern compop_func op_4efb_0_comp_nf; +extern compop_func op_5000_0_comp_nf; +extern compop_func op_5010_0_comp_nf; +extern compop_func op_5018_0_comp_nf; +extern compop_func op_5020_0_comp_nf; +extern compop_func op_5028_0_comp_nf; +extern compop_func op_5030_0_comp_nf; +extern compop_func op_5038_0_comp_nf; +extern compop_func op_5039_0_comp_nf; +extern compop_func op_5040_0_comp_nf; +extern compop_func op_5048_0_comp_nf; +extern compop_func op_5050_0_comp_nf; +extern compop_func op_5058_0_comp_nf; +extern compop_func op_5060_0_comp_nf; +extern compop_func op_5068_0_comp_nf; +extern compop_func op_5070_0_comp_nf; +extern compop_func op_5078_0_comp_nf; +extern compop_func op_5079_0_comp_nf; +extern compop_func op_5080_0_comp_nf; +extern compop_func op_5088_0_comp_nf; +extern compop_func op_5090_0_comp_nf; +extern compop_func op_5098_0_comp_nf; +extern compop_func op_50a0_0_comp_nf; +extern compop_func op_50a8_0_comp_nf; +extern compop_func op_50b0_0_comp_nf; +extern compop_func op_50b8_0_comp_nf; +extern compop_func op_50b9_0_comp_nf; +extern compop_func op_50c0_0_comp_nf; +extern compop_func op_50c8_0_comp_nf; +extern compop_func op_50d0_0_comp_nf; +extern compop_func op_50d8_0_comp_nf; +extern compop_func op_50e0_0_comp_nf; +extern compop_func op_50e8_0_comp_nf; +extern compop_func op_50f0_0_comp_nf; +extern compop_func op_50f8_0_comp_nf; +extern compop_func op_50f9_0_comp_nf; +extern compop_func op_5100_0_comp_nf; +extern compop_func op_5110_0_comp_nf; +extern compop_func op_5118_0_comp_nf; +extern compop_func op_5120_0_comp_nf; +extern compop_func op_5128_0_comp_nf; +extern compop_func op_5130_0_comp_nf; +extern compop_func op_5138_0_comp_nf; +extern compop_func op_5139_0_comp_nf; +extern compop_func op_5140_0_comp_nf; +extern compop_func op_5148_0_comp_nf; +extern compop_func op_5150_0_comp_nf; +extern compop_func op_5158_0_comp_nf; +extern compop_func op_5160_0_comp_nf; +extern compop_func op_5168_0_comp_nf; +extern compop_func op_5170_0_comp_nf; +extern compop_func op_5178_0_comp_nf; +extern compop_func op_5179_0_comp_nf; +extern compop_func op_5180_0_comp_nf; +extern compop_func op_5188_0_comp_nf; +extern compop_func op_5190_0_comp_nf; +extern compop_func op_5198_0_comp_nf; +extern compop_func op_51a0_0_comp_nf; +extern compop_func op_51a8_0_comp_nf; +extern compop_func op_51b0_0_comp_nf; +extern compop_func op_51b8_0_comp_nf; +extern compop_func op_51b9_0_comp_nf; +extern compop_func op_51c0_0_comp_nf; +extern compop_func op_51c8_0_comp_nf; +extern compop_func op_51d0_0_comp_nf; +extern compop_func op_51d8_0_comp_nf; +extern compop_func op_51e0_0_comp_nf; +extern compop_func op_51e8_0_comp_nf; +extern compop_func op_51f0_0_comp_nf; +extern compop_func op_51f8_0_comp_nf; +extern compop_func op_51f9_0_comp_nf; +extern compop_func op_52c0_0_comp_nf; +extern compop_func op_52c8_0_comp_nf; +extern compop_func op_52d0_0_comp_nf; +extern compop_func op_52d8_0_comp_nf; +extern compop_func op_52e0_0_comp_nf; +extern compop_func op_52e8_0_comp_nf; +extern compop_func op_52f0_0_comp_nf; +extern compop_func op_52f8_0_comp_nf; +extern compop_func op_52f9_0_comp_nf; +extern compop_func op_53c0_0_comp_nf; +extern compop_func op_53c8_0_comp_nf; +extern compop_func op_53d0_0_comp_nf; +extern compop_func op_53d8_0_comp_nf; +extern compop_func op_53e0_0_comp_nf; +extern compop_func op_53e8_0_comp_nf; +extern compop_func op_53f0_0_comp_nf; +extern compop_func op_53f8_0_comp_nf; +extern compop_func op_53f9_0_comp_nf; +extern compop_func op_54c0_0_comp_nf; +extern compop_func op_54c8_0_comp_nf; +extern compop_func op_54d0_0_comp_nf; +extern compop_func op_54d8_0_comp_nf; +extern compop_func op_54e0_0_comp_nf; +extern compop_func op_54e8_0_comp_nf; +extern compop_func op_54f0_0_comp_nf; +extern compop_func op_54f8_0_comp_nf; +extern compop_func op_54f9_0_comp_nf; +extern compop_func op_55c0_0_comp_nf; +extern compop_func op_55c8_0_comp_nf; +extern compop_func op_55d0_0_comp_nf; +extern compop_func op_55d8_0_comp_nf; +extern compop_func op_55e0_0_comp_nf; +extern compop_func op_55e8_0_comp_nf; +extern compop_func op_55f0_0_comp_nf; +extern compop_func op_55f8_0_comp_nf; +extern compop_func op_55f9_0_comp_nf; +extern compop_func op_56c0_0_comp_nf; +extern compop_func op_56c8_0_comp_nf; +extern compop_func op_56d0_0_comp_nf; +extern compop_func op_56d8_0_comp_nf; +extern compop_func op_56e0_0_comp_nf; +extern compop_func op_56e8_0_comp_nf; +extern compop_func op_56f0_0_comp_nf; +extern compop_func op_56f8_0_comp_nf; +extern compop_func op_56f9_0_comp_nf; +extern compop_func op_57c0_0_comp_nf; +extern compop_func op_57c8_0_comp_nf; +extern compop_func op_57d0_0_comp_nf; +extern compop_func op_57d8_0_comp_nf; +extern compop_func op_57e0_0_comp_nf; +extern compop_func op_57e8_0_comp_nf; +extern compop_func op_57f0_0_comp_nf; +extern compop_func op_57f8_0_comp_nf; +extern compop_func op_57f9_0_comp_nf; +extern compop_func op_5ac0_0_comp_nf; +extern compop_func op_5ac8_0_comp_nf; +extern compop_func op_5ad0_0_comp_nf; +extern compop_func op_5ad8_0_comp_nf; +extern compop_func op_5ae0_0_comp_nf; +extern compop_func op_5ae8_0_comp_nf; +extern compop_func op_5af0_0_comp_nf; +extern compop_func op_5af8_0_comp_nf; +extern compop_func op_5af9_0_comp_nf; +extern compop_func op_5bc0_0_comp_nf; +extern compop_func op_5bc8_0_comp_nf; +extern compop_func op_5bd0_0_comp_nf; +extern compop_func op_5bd8_0_comp_nf; +extern compop_func op_5be0_0_comp_nf; +extern compop_func op_5be8_0_comp_nf; +extern compop_func op_5bf0_0_comp_nf; +extern compop_func op_5bf8_0_comp_nf; +extern compop_func op_5bf9_0_comp_nf; +extern compop_func op_5cc0_0_comp_nf; +extern compop_func op_5cc8_0_comp_nf; +extern compop_func op_5cd0_0_comp_nf; +extern compop_func op_5cd8_0_comp_nf; +extern compop_func op_5ce0_0_comp_nf; +extern compop_func op_5ce8_0_comp_nf; +extern compop_func op_5cf0_0_comp_nf; +extern compop_func op_5cf8_0_comp_nf; +extern compop_func op_5cf9_0_comp_nf; +extern compop_func op_5dc0_0_comp_nf; +extern compop_func op_5dc8_0_comp_nf; +extern compop_func op_5dd0_0_comp_nf; +extern compop_func op_5dd8_0_comp_nf; +extern compop_func op_5de0_0_comp_nf; +extern compop_func op_5de8_0_comp_nf; +extern compop_func op_5df0_0_comp_nf; +extern compop_func op_5df8_0_comp_nf; +extern compop_func op_5df9_0_comp_nf; +extern compop_func op_5ec0_0_comp_nf; +extern compop_func op_5ec8_0_comp_nf; +extern compop_func op_5ed0_0_comp_nf; +extern compop_func op_5ed8_0_comp_nf; +extern compop_func op_5ee0_0_comp_nf; +extern compop_func op_5ee8_0_comp_nf; +extern compop_func op_5ef0_0_comp_nf; +extern compop_func op_5ef8_0_comp_nf; +extern compop_func op_5ef9_0_comp_nf; +extern compop_func op_5fc0_0_comp_nf; +extern compop_func op_5fc8_0_comp_nf; +extern compop_func op_5fd0_0_comp_nf; +extern compop_func op_5fd8_0_comp_nf; +extern compop_func op_5fe0_0_comp_nf; +extern compop_func op_5fe8_0_comp_nf; +extern compop_func op_5ff0_0_comp_nf; +extern compop_func op_5ff8_0_comp_nf; +extern compop_func op_5ff9_0_comp_nf; +extern compop_func op_6000_0_comp_nf; +extern compop_func op_6001_0_comp_nf; +extern compop_func op_60ff_0_comp_nf; +extern compop_func op_6100_0_comp_nf; +extern compop_func op_6101_0_comp_nf; +extern compop_func op_61ff_0_comp_nf; +extern compop_func op_6200_0_comp_nf; +extern compop_func op_6201_0_comp_nf; +extern compop_func op_62ff_0_comp_nf; +extern compop_func op_6300_0_comp_nf; +extern compop_func op_6301_0_comp_nf; +extern compop_func op_63ff_0_comp_nf; +extern compop_func op_6400_0_comp_nf; +extern compop_func op_6401_0_comp_nf; +extern compop_func op_64ff_0_comp_nf; +extern compop_func op_6500_0_comp_nf; +extern compop_func op_6501_0_comp_nf; +extern compop_func op_65ff_0_comp_nf; +extern compop_func op_6600_0_comp_nf; +extern compop_func op_6601_0_comp_nf; +extern compop_func op_66ff_0_comp_nf; +extern compop_func op_6700_0_comp_nf; +extern compop_func op_6701_0_comp_nf; +extern compop_func op_67ff_0_comp_nf; +extern compop_func op_6a00_0_comp_nf; +extern compop_func op_6a01_0_comp_nf; +extern compop_func op_6aff_0_comp_nf; +extern compop_func op_6b00_0_comp_nf; +extern compop_func op_6b01_0_comp_nf; +extern compop_func op_6bff_0_comp_nf; +extern compop_func op_6c00_0_comp_nf; +extern compop_func op_6c01_0_comp_nf; +extern compop_func op_6cff_0_comp_nf; +extern compop_func op_6d00_0_comp_nf; +extern compop_func op_6d01_0_comp_nf; +extern compop_func op_6dff_0_comp_nf; +extern compop_func op_6e00_0_comp_nf; +extern compop_func op_6e01_0_comp_nf; +extern compop_func op_6eff_0_comp_nf; +extern compop_func op_6f00_0_comp_nf; +extern compop_func op_6f01_0_comp_nf; +extern compop_func op_6fff_0_comp_nf; +extern compop_func op_7000_0_comp_nf; +extern compop_func op_8000_0_comp_nf; +extern compop_func op_8010_0_comp_nf; +extern compop_func op_8018_0_comp_nf; +extern compop_func op_8020_0_comp_nf; +extern compop_func op_8028_0_comp_nf; +extern compop_func op_8030_0_comp_nf; +extern compop_func op_8038_0_comp_nf; +extern compop_func op_8039_0_comp_nf; +extern compop_func op_803a_0_comp_nf; +extern compop_func op_803b_0_comp_nf; +extern compop_func op_803c_0_comp_nf; +extern compop_func op_8040_0_comp_nf; +extern compop_func op_8050_0_comp_nf; +extern compop_func op_8058_0_comp_nf; +extern compop_func op_8060_0_comp_nf; +extern compop_func op_8068_0_comp_nf; +extern compop_func op_8070_0_comp_nf; +extern compop_func op_8078_0_comp_nf; +extern compop_func op_8079_0_comp_nf; +extern compop_func op_807a_0_comp_nf; +extern compop_func op_807b_0_comp_nf; +extern compop_func op_807c_0_comp_nf; +extern compop_func op_8080_0_comp_nf; +extern compop_func op_8090_0_comp_nf; +extern compop_func op_8098_0_comp_nf; +extern compop_func op_80a0_0_comp_nf; +extern compop_func op_80a8_0_comp_nf; +extern compop_func op_80b0_0_comp_nf; +extern compop_func op_80b8_0_comp_nf; +extern compop_func op_80b9_0_comp_nf; +extern compop_func op_80ba_0_comp_nf; +extern compop_func op_80bb_0_comp_nf; +extern compop_func op_80bc_0_comp_nf; +extern compop_func op_8110_0_comp_nf; +extern compop_func op_8118_0_comp_nf; +extern compop_func op_8120_0_comp_nf; +extern compop_func op_8128_0_comp_nf; +extern compop_func op_8130_0_comp_nf; +extern compop_func op_8138_0_comp_nf; +extern compop_func op_8139_0_comp_nf; +extern compop_func op_8150_0_comp_nf; +extern compop_func op_8158_0_comp_nf; +extern compop_func op_8160_0_comp_nf; +extern compop_func op_8168_0_comp_nf; +extern compop_func op_8170_0_comp_nf; +extern compop_func op_8178_0_comp_nf; +extern compop_func op_8179_0_comp_nf; +extern compop_func op_8190_0_comp_nf; +extern compop_func op_8198_0_comp_nf; +extern compop_func op_81a0_0_comp_nf; +extern compop_func op_81a8_0_comp_nf; +extern compop_func op_81b0_0_comp_nf; +extern compop_func op_81b8_0_comp_nf; +extern compop_func op_81b9_0_comp_nf; +extern compop_func op_9000_0_comp_nf; +extern compop_func op_9010_0_comp_nf; +extern compop_func op_9018_0_comp_nf; +extern compop_func op_9020_0_comp_nf; +extern compop_func op_9028_0_comp_nf; +extern compop_func op_9030_0_comp_nf; +extern compop_func op_9038_0_comp_nf; +extern compop_func op_9039_0_comp_nf; +extern compop_func op_903a_0_comp_nf; +extern compop_func op_903b_0_comp_nf; +extern compop_func op_903c_0_comp_nf; +extern compop_func op_9040_0_comp_nf; +extern compop_func op_9048_0_comp_nf; +extern compop_func op_9050_0_comp_nf; +extern compop_func op_9058_0_comp_nf; +extern compop_func op_9060_0_comp_nf; +extern compop_func op_9068_0_comp_nf; +extern compop_func op_9070_0_comp_nf; +extern compop_func op_9078_0_comp_nf; +extern compop_func op_9079_0_comp_nf; +extern compop_func op_907a_0_comp_nf; +extern compop_func op_907b_0_comp_nf; +extern compop_func op_907c_0_comp_nf; +extern compop_func op_9080_0_comp_nf; +extern compop_func op_9088_0_comp_nf; +extern compop_func op_9090_0_comp_nf; +extern compop_func op_9098_0_comp_nf; +extern compop_func op_90a0_0_comp_nf; +extern compop_func op_90a8_0_comp_nf; +extern compop_func op_90b0_0_comp_nf; +extern compop_func op_90b8_0_comp_nf; +extern compop_func op_90b9_0_comp_nf; +extern compop_func op_90ba_0_comp_nf; +extern compop_func op_90bb_0_comp_nf; +extern compop_func op_90bc_0_comp_nf; +extern compop_func op_90c0_0_comp_nf; +extern compop_func op_90c8_0_comp_nf; +extern compop_func op_90d0_0_comp_nf; +extern compop_func op_90d8_0_comp_nf; +extern compop_func op_90e0_0_comp_nf; +extern compop_func op_90e8_0_comp_nf; +extern compop_func op_90f0_0_comp_nf; +extern compop_func op_90f8_0_comp_nf; +extern compop_func op_90f9_0_comp_nf; +extern compop_func op_90fa_0_comp_nf; +extern compop_func op_90fb_0_comp_nf; +extern compop_func op_90fc_0_comp_nf; +extern compop_func op_9100_0_comp_nf; +extern compop_func op_9108_0_comp_nf; +extern compop_func op_9110_0_comp_nf; +extern compop_func op_9118_0_comp_nf; +extern compop_func op_9120_0_comp_nf; +extern compop_func op_9128_0_comp_nf; +extern compop_func op_9130_0_comp_nf; +extern compop_func op_9138_0_comp_nf; +extern compop_func op_9139_0_comp_nf; +extern compop_func op_9140_0_comp_nf; +extern compop_func op_9148_0_comp_nf; +extern compop_func op_9150_0_comp_nf; +extern compop_func op_9158_0_comp_nf; +extern compop_func op_9160_0_comp_nf; +extern compop_func op_9168_0_comp_nf; +extern compop_func op_9170_0_comp_nf; +extern compop_func op_9178_0_comp_nf; +extern compop_func op_9179_0_comp_nf; +extern compop_func op_9180_0_comp_nf; +extern compop_func op_9188_0_comp_nf; +extern compop_func op_9190_0_comp_nf; +extern compop_func op_9198_0_comp_nf; +extern compop_func op_91a0_0_comp_nf; +extern compop_func op_91a8_0_comp_nf; +extern compop_func op_91b0_0_comp_nf; +extern compop_func op_91b8_0_comp_nf; +extern compop_func op_91b9_0_comp_nf; +extern compop_func op_91c0_0_comp_nf; +extern compop_func op_91c8_0_comp_nf; +extern compop_func op_91d0_0_comp_nf; +extern compop_func op_91d8_0_comp_nf; +extern compop_func op_91e0_0_comp_nf; +extern compop_func op_91e8_0_comp_nf; +extern compop_func op_91f0_0_comp_nf; +extern compop_func op_91f8_0_comp_nf; +extern compop_func op_91f9_0_comp_nf; +extern compop_func op_91fa_0_comp_nf; +extern compop_func op_91fb_0_comp_nf; +extern compop_func op_91fc_0_comp_nf; +extern compop_func op_b000_0_comp_nf; +extern compop_func op_b010_0_comp_nf; +extern compop_func op_b018_0_comp_nf; +extern compop_func op_b020_0_comp_nf; +extern compop_func op_b028_0_comp_nf; +extern compop_func op_b030_0_comp_nf; +extern compop_func op_b038_0_comp_nf; +extern compop_func op_b039_0_comp_nf; +extern compop_func op_b03a_0_comp_nf; +extern compop_func op_b03b_0_comp_nf; +extern compop_func op_b03c_0_comp_nf; +extern compop_func op_b040_0_comp_nf; +extern compop_func op_b048_0_comp_nf; +extern compop_func op_b050_0_comp_nf; +extern compop_func op_b058_0_comp_nf; +extern compop_func op_b060_0_comp_nf; +extern compop_func op_b068_0_comp_nf; +extern compop_func op_b070_0_comp_nf; +extern compop_func op_b078_0_comp_nf; +extern compop_func op_b079_0_comp_nf; +extern compop_func op_b07a_0_comp_nf; +extern compop_func op_b07b_0_comp_nf; +extern compop_func op_b07c_0_comp_nf; +extern compop_func op_b080_0_comp_nf; +extern compop_func op_b088_0_comp_nf; +extern compop_func op_b090_0_comp_nf; +extern compop_func op_b098_0_comp_nf; +extern compop_func op_b0a0_0_comp_nf; +extern compop_func op_b0a8_0_comp_nf; +extern compop_func op_b0b0_0_comp_nf; +extern compop_func op_b0b8_0_comp_nf; +extern compop_func op_b0b9_0_comp_nf; +extern compop_func op_b0ba_0_comp_nf; +extern compop_func op_b0bb_0_comp_nf; +extern compop_func op_b0bc_0_comp_nf; +extern compop_func op_b0c0_0_comp_nf; +extern compop_func op_b0c8_0_comp_nf; +extern compop_func op_b0d0_0_comp_nf; +extern compop_func op_b0d8_0_comp_nf; +extern compop_func op_b0e0_0_comp_nf; +extern compop_func op_b0e8_0_comp_nf; +extern compop_func op_b0f0_0_comp_nf; +extern compop_func op_b0f8_0_comp_nf; +extern compop_func op_b0f9_0_comp_nf; +extern compop_func op_b0fa_0_comp_nf; +extern compop_func op_b0fb_0_comp_nf; +extern compop_func op_b0fc_0_comp_nf; +extern compop_func op_b100_0_comp_nf; +extern compop_func op_b108_0_comp_nf; +extern compop_func op_b110_0_comp_nf; +extern compop_func op_b118_0_comp_nf; +extern compop_func op_b120_0_comp_nf; +extern compop_func op_b128_0_comp_nf; +extern compop_func op_b130_0_comp_nf; +extern compop_func op_b138_0_comp_nf; +extern compop_func op_b139_0_comp_nf; +extern compop_func op_b140_0_comp_nf; +extern compop_func op_b148_0_comp_nf; +extern compop_func op_b150_0_comp_nf; +extern compop_func op_b158_0_comp_nf; +extern compop_func op_b160_0_comp_nf; +extern compop_func op_b168_0_comp_nf; +extern compop_func op_b170_0_comp_nf; +extern compop_func op_b178_0_comp_nf; +extern compop_func op_b179_0_comp_nf; +extern compop_func op_b180_0_comp_nf; +extern compop_func op_b188_0_comp_nf; +extern compop_func op_b190_0_comp_nf; +extern compop_func op_b198_0_comp_nf; +extern compop_func op_b1a0_0_comp_nf; +extern compop_func op_b1a8_0_comp_nf; +extern compop_func op_b1b0_0_comp_nf; +extern compop_func op_b1b8_0_comp_nf; +extern compop_func op_b1b9_0_comp_nf; +extern compop_func op_b1c0_0_comp_nf; +extern compop_func op_b1c8_0_comp_nf; +extern compop_func op_b1d0_0_comp_nf; +extern compop_func op_b1d8_0_comp_nf; +extern compop_func op_b1e0_0_comp_nf; +extern compop_func op_b1e8_0_comp_nf; +extern compop_func op_b1f0_0_comp_nf; +extern compop_func op_b1f8_0_comp_nf; +extern compop_func op_b1f9_0_comp_nf; +extern compop_func op_b1fa_0_comp_nf; +extern compop_func op_b1fb_0_comp_nf; +extern compop_func op_b1fc_0_comp_nf; +extern compop_func op_c000_0_comp_nf; +extern compop_func op_c010_0_comp_nf; +extern compop_func op_c018_0_comp_nf; +extern compop_func op_c020_0_comp_nf; +extern compop_func op_c028_0_comp_nf; +extern compop_func op_c030_0_comp_nf; +extern compop_func op_c038_0_comp_nf; +extern compop_func op_c039_0_comp_nf; +extern compop_func op_c03a_0_comp_nf; +extern compop_func op_c03b_0_comp_nf; +extern compop_func op_c03c_0_comp_nf; +extern compop_func op_c040_0_comp_nf; +extern compop_func op_c050_0_comp_nf; +extern compop_func op_c058_0_comp_nf; +extern compop_func op_c060_0_comp_nf; +extern compop_func op_c068_0_comp_nf; +extern compop_func op_c070_0_comp_nf; +extern compop_func op_c078_0_comp_nf; +extern compop_func op_c079_0_comp_nf; +extern compop_func op_c07a_0_comp_nf; +extern compop_func op_c07b_0_comp_nf; +extern compop_func op_c07c_0_comp_nf; +extern compop_func op_c080_0_comp_nf; +extern compop_func op_c090_0_comp_nf; +extern compop_func op_c098_0_comp_nf; +extern compop_func op_c0a0_0_comp_nf; +extern compop_func op_c0a8_0_comp_nf; +extern compop_func op_c0b0_0_comp_nf; +extern compop_func op_c0b8_0_comp_nf; +extern compop_func op_c0b9_0_comp_nf; +extern compop_func op_c0ba_0_comp_nf; +extern compop_func op_c0bb_0_comp_nf; +extern compop_func op_c0bc_0_comp_nf; +extern compop_func op_c0c0_0_comp_nf; +extern compop_func op_c0d0_0_comp_nf; +extern compop_func op_c0d8_0_comp_nf; +extern compop_func op_c0e0_0_comp_nf; +extern compop_func op_c0e8_0_comp_nf; +extern compop_func op_c0f0_0_comp_nf; +extern compop_func op_c0f8_0_comp_nf; +extern compop_func op_c0f9_0_comp_nf; +extern compop_func op_c0fa_0_comp_nf; +extern compop_func op_c0fb_0_comp_nf; +extern compop_func op_c0fc_0_comp_nf; +extern compop_func op_c110_0_comp_nf; +extern compop_func op_c118_0_comp_nf; +extern compop_func op_c120_0_comp_nf; +extern compop_func op_c128_0_comp_nf; +extern compop_func op_c130_0_comp_nf; +extern compop_func op_c138_0_comp_nf; +extern compop_func op_c139_0_comp_nf; +extern compop_func op_c140_0_comp_nf; +extern compop_func op_c148_0_comp_nf; +extern compop_func op_c150_0_comp_nf; +extern compop_func op_c158_0_comp_nf; +extern compop_func op_c160_0_comp_nf; +extern compop_func op_c168_0_comp_nf; +extern compop_func op_c170_0_comp_nf; +extern compop_func op_c178_0_comp_nf; +extern compop_func op_c179_0_comp_nf; +extern compop_func op_c188_0_comp_nf; +extern compop_func op_c190_0_comp_nf; +extern compop_func op_c198_0_comp_nf; +extern compop_func op_c1a0_0_comp_nf; +extern compop_func op_c1a8_0_comp_nf; +extern compop_func op_c1b0_0_comp_nf; +extern compop_func op_c1b8_0_comp_nf; +extern compop_func op_c1b9_0_comp_nf; +extern compop_func op_c1c0_0_comp_nf; +extern compop_func op_c1d0_0_comp_nf; +extern compop_func op_c1d8_0_comp_nf; +extern compop_func op_c1e0_0_comp_nf; +extern compop_func op_c1e8_0_comp_nf; +extern compop_func op_c1f0_0_comp_nf; +extern compop_func op_c1f8_0_comp_nf; +extern compop_func op_c1f9_0_comp_nf; +extern compop_func op_c1fa_0_comp_nf; +extern compop_func op_c1fb_0_comp_nf; +extern compop_func op_c1fc_0_comp_nf; +extern compop_func op_d000_0_comp_nf; +extern compop_func op_d010_0_comp_nf; +extern compop_func op_d018_0_comp_nf; +extern compop_func op_d020_0_comp_nf; +extern compop_func op_d028_0_comp_nf; +extern compop_func op_d030_0_comp_nf; +extern compop_func op_d038_0_comp_nf; +extern compop_func op_d039_0_comp_nf; +extern compop_func op_d03a_0_comp_nf; +extern compop_func op_d03b_0_comp_nf; +extern compop_func op_d03c_0_comp_nf; +extern compop_func op_d040_0_comp_nf; +extern compop_func op_d048_0_comp_nf; +extern compop_func op_d050_0_comp_nf; +extern compop_func op_d058_0_comp_nf; +extern compop_func op_d060_0_comp_nf; +extern compop_func op_d068_0_comp_nf; +extern compop_func op_d070_0_comp_nf; +extern compop_func op_d078_0_comp_nf; +extern compop_func op_d079_0_comp_nf; +extern compop_func op_d07a_0_comp_nf; +extern compop_func op_d07b_0_comp_nf; +extern compop_func op_d07c_0_comp_nf; +extern compop_func op_d080_0_comp_nf; +extern compop_func op_d088_0_comp_nf; +extern compop_func op_d090_0_comp_nf; +extern compop_func op_d098_0_comp_nf; +extern compop_func op_d0a0_0_comp_nf; +extern compop_func op_d0a8_0_comp_nf; +extern compop_func op_d0b0_0_comp_nf; +extern compop_func op_d0b8_0_comp_nf; +extern compop_func op_d0b9_0_comp_nf; +extern compop_func op_d0ba_0_comp_nf; +extern compop_func op_d0bb_0_comp_nf; +extern compop_func op_d0bc_0_comp_nf; +extern compop_func op_d0c0_0_comp_nf; +extern compop_func op_d0c8_0_comp_nf; +extern compop_func op_d0d0_0_comp_nf; +extern compop_func op_d0d8_0_comp_nf; +extern compop_func op_d0e0_0_comp_nf; +extern compop_func op_d0e8_0_comp_nf; +extern compop_func op_d0f0_0_comp_nf; +extern compop_func op_d0f8_0_comp_nf; +extern compop_func op_d0f9_0_comp_nf; +extern compop_func op_d0fa_0_comp_nf; +extern compop_func op_d0fb_0_comp_nf; +extern compop_func op_d0fc_0_comp_nf; +extern compop_func op_d100_0_comp_nf; +extern compop_func op_d108_0_comp_nf; +extern compop_func op_d110_0_comp_nf; +extern compop_func op_d118_0_comp_nf; +extern compop_func op_d120_0_comp_nf; +extern compop_func op_d128_0_comp_nf; +extern compop_func op_d130_0_comp_nf; +extern compop_func op_d138_0_comp_nf; +extern compop_func op_d139_0_comp_nf; +extern compop_func op_d140_0_comp_nf; +extern compop_func op_d148_0_comp_nf; +extern compop_func op_d150_0_comp_nf; +extern compop_func op_d158_0_comp_nf; +extern compop_func op_d160_0_comp_nf; +extern compop_func op_d168_0_comp_nf; +extern compop_func op_d170_0_comp_nf; +extern compop_func op_d178_0_comp_nf; +extern compop_func op_d179_0_comp_nf; +extern compop_func op_d180_0_comp_nf; +extern compop_func op_d188_0_comp_nf; +extern compop_func op_d190_0_comp_nf; +extern compop_func op_d198_0_comp_nf; +extern compop_func op_d1a0_0_comp_nf; +extern compop_func op_d1a8_0_comp_nf; +extern compop_func op_d1b0_0_comp_nf; +extern compop_func op_d1b8_0_comp_nf; +extern compop_func op_d1b9_0_comp_nf; +extern compop_func op_d1c0_0_comp_nf; +extern compop_func op_d1c8_0_comp_nf; +extern compop_func op_d1d0_0_comp_nf; +extern compop_func op_d1d8_0_comp_nf; +extern compop_func op_d1e0_0_comp_nf; +extern compop_func op_d1e8_0_comp_nf; +extern compop_func op_d1f0_0_comp_nf; +extern compop_func op_d1f8_0_comp_nf; +extern compop_func op_d1f9_0_comp_nf; +extern compop_func op_d1fa_0_comp_nf; +extern compop_func op_d1fb_0_comp_nf; +extern compop_func op_d1fc_0_comp_nf; +extern compop_func op_e000_0_comp_nf; +extern compop_func op_e008_0_comp_nf; +extern compop_func op_e018_0_comp_nf; +extern compop_func op_e020_0_comp_nf; +extern compop_func op_e028_0_comp_nf; +extern compop_func op_e038_0_comp_nf; +extern compop_func op_e040_0_comp_nf; +extern compop_func op_e048_0_comp_nf; +extern compop_func op_e058_0_comp_nf; +extern compop_func op_e060_0_comp_nf; +extern compop_func op_e068_0_comp_nf; +extern compop_func op_e078_0_comp_nf; +extern compop_func op_e080_0_comp_nf; +extern compop_func op_e088_0_comp_nf; +extern compop_func op_e098_0_comp_nf; +extern compop_func op_e0a0_0_comp_nf; +extern compop_func op_e0a8_0_comp_nf; +extern compop_func op_e0b8_0_comp_nf; +extern compop_func op_e100_0_comp_nf; +extern compop_func op_e108_0_comp_nf; +extern compop_func op_e118_0_comp_nf; +extern compop_func op_e120_0_comp_nf; +extern compop_func op_e128_0_comp_nf; +extern compop_func op_e138_0_comp_nf; +extern compop_func op_e140_0_comp_nf; +extern compop_func op_e148_0_comp_nf; +extern compop_func op_e158_0_comp_nf; +extern compop_func op_e160_0_comp_nf; +extern compop_func op_e168_0_comp_nf; +extern compop_func op_e178_0_comp_nf; +extern compop_func op_e180_0_comp_nf; +extern compop_func op_e188_0_comp_nf; +extern compop_func op_e198_0_comp_nf; +extern compop_func op_e1a0_0_comp_nf; +extern compop_func op_e1a8_0_comp_nf; +extern compop_func op_e1b8_0_comp_nf; +extern compop_func op_f200_0_comp_nf; +extern compop_func op_f208_0_comp_nf; +extern compop_func op_f210_0_comp_nf; +extern compop_func op_f218_0_comp_nf; +extern compop_func op_f220_0_comp_nf; +extern compop_func op_f228_0_comp_nf; +extern compop_func op_f230_0_comp_nf; +extern compop_func op_f238_0_comp_nf; +extern compop_func op_f239_0_comp_nf; +extern compop_func op_f23a_0_comp_nf; +extern compop_func op_f23b_0_comp_nf; +extern compop_func op_f23c_0_comp_nf; +extern compop_func op_f240_0_comp_nf; +extern compop_func op_f250_0_comp_nf; +extern compop_func op_f258_0_comp_nf; +extern compop_func op_f260_0_comp_nf; +extern compop_func op_f268_0_comp_nf; +extern compop_func op_f270_0_comp_nf; +extern compop_func op_f278_0_comp_nf; +extern compop_func op_f279_0_comp_nf; +extern compop_func op_f280_0_comp_nf; +extern compop_func op_f2c0_0_comp_nf; +extern compop_func op_f600_0_comp_nf; +extern compop_func op_f608_0_comp_nf; +extern compop_func op_f610_0_comp_nf; +extern compop_func op_f618_0_comp_nf; +extern compop_func op_f620_0_comp_nf; diff --git a/src/jit/x86/exception_handler.cpp b/src/jit/x86/exception_handler.cpp new file mode 100644 index 000000000..f4f693388 --- /dev/null +++ b/src/jit/x86/exception_handler.cpp @@ -0,0 +1,738 @@ +/************************************************************************* +* Handling mistaken direct memory access * +*************************************************************************/ + +#ifdef NATMEM_OFFSET +#ifdef _WIN32 // %%% BRIAN KING WAS HERE %%% +#include +#else +#ifndef __USE_GNU +#define __USE_GNU +#endif +#include +#endif +#include + +#define SIG_READ 1 +#define SIG_WRITE 2 + +static int in_handler = 0; +static uae_u8 *veccode; + +#if defined(JIT_DEBUG) +#define DEBUG_ACCESS +#endif + +#if defined(_WIN32) && defined(CPU_x86_64) + +typedef LPEXCEPTION_POINTERS CONTEXT_T; +#define HAVE_CONTEXT_T 1 +#define CONTEXT_RIP(context) (context->ContextRecord->Rip) +#define CONTEXT_RAX(context) (context->ContextRecord->Rax) +#define CONTEXT_RCX(context) (context->ContextRecord->Rcx) +#define CONTEXT_RDX(context) (context->ContextRecord->Rdx) +#define CONTEXT_RBX(context) (context->ContextRecord->Rbx) +#define CONTEXT_RSP(context) (context->ContextRecord->Rsp) +#define CONTEXT_RBP(context) (context->ContextRecord->Rbp) +#define CONTEXT_RSI(context) (context->ContextRecord->Rsi) +#define CONTEXT_RDI(context) (context->ContextRecord->Rdi) +#define CONTEXT_R8(context) (context->ContextRecord->R8) +#define CONTEXT_R9(context) (context->ContextRecord->R9) +#define CONTEXT_R10(context) (context->ContextRecord->R10) +#define CONTEXT_R11(context) (context->ContextRecord->R11) +#define CONTEXT_R12(context) (context->ContextRecord->R12) +#define CONTEXT_R13(context) (context->ContextRecord->R13) +#define CONTEXT_R14(context) (context->ContextRecord->R14) +#define CONTEXT_R15(context) (context->ContextRecord->R15) + +#elif defined(_WIN32) && defined(CPU_i386) + +typedef LPEXCEPTION_POINTERS CONTEXT_T; +#define HAVE_CONTEXT_T 1 +#define CONTEXT_RIP(context) (context->ContextRecord->Eip) +#define CONTEXT_RAX(context) (context->ContextRecord->Eax) +#define CONTEXT_RCX(context) (context->ContextRecord->Ecx) +#define CONTEXT_RDX(context) (context->ContextRecord->Edx) +#define CONTEXT_RBX(context) (context->ContextRecord->Ebx) +#define CONTEXT_RSP(context) (context->ContextRecord->Esp) +#define CONTEXT_RBP(context) (context->ContextRecord->Ebp) +#define CONTEXT_RSI(context) (context->ContextRecord->Esi) +#define CONTEXT_RDI(context) (context->ContextRecord->Edi) + +#elif defined(HAVE_STRUCT_UCONTEXT_T_UC_MCONTEXT_GREGS) && defined(CPU_x86_64) + +typedef void *CONTEXT_T; +#define HAVE_CONTEXT_T 1 +#define CONTEXT_RIP(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RIP]) +#define CONTEXT_RAX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RAX]) +#define CONTEXT_RCX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RCX]) +#define CONTEXT_RDX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RDX]) +#define CONTEXT_RBX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RBX]) +#define CONTEXT_RSP(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RSP]) +#define CONTEXT_RBP(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RBP]) +#define CONTEXT_RSI(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RSI]) +#define CONTEXT_RDI(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RDI]) +#define CONTEXT_R8(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R8]) +#define CONTEXT_R9(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R9]) +#define CONTEXT_R10(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R10]) +#define CONTEXT_R11(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R11]) +#define CONTEXT_R12(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R12]) +#define CONTEXT_R13(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R13]) +#define CONTEXT_R14(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R14]) +#define CONTEXT_R15(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R15]) + +#elif defined(HAVE_STRUCT_UCONTEXT_T_UC_MCONTEXT_GREGS) && defined(CPU_i386) + +typedef void *CONTEXT_T; +#define HAVE_CONTEXT_T 1 +#define CONTEXT_RIP(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_EIP]) +#define CONTEXT_RAX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_EAX]) +#define CONTEXT_RCX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_ECX]) +#define CONTEXT_RDX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_EDX]) +#define CONTEXT_RBX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_EBX]) +#define CONTEXT_RSP(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_ESP]) +#define CONTEXT_RBP(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_EBP]) +#define CONTEXT_RSI(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_ESI]) +#define CONTEXT_RDI(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_EDI]) + +#elif defined(HAVE_STRUCT_UCONTEXT_UC_MCONTEXT_GREGS) && defined(CPU_x86_64) + +typedef void *CONTEXT_T; +#define HAVE_CONTEXT_T 1 +#define CONTEXT_RIP(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_RIP]) +#define CONTEXT_RAX(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_RAX]) +#define CONTEXT_RCX(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_RCX]) +#define CONTEXT_RDX(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_RDX]) +#define CONTEXT_RBX(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_RBX]) +#define CONTEXT_RSP(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_RSP]) +#define CONTEXT_RBP(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_RBP]) +#define CONTEXT_RSI(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_RSI]) +#define CONTEXT_RDI(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_RDI]) +#define CONTEXT_R8(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_R8]) +#define CONTEXT_R9(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_R9]) +#define CONTEXT_R10(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_R10]) +#define CONTEXT_R11(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_R11]) +#define CONTEXT_R12(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_R12]) +#define CONTEXT_R13(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_R13]) +#define CONTEXT_R14(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_R14]) +#define CONTEXT_R15(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_R15]) + +#elif defined(HAVE_STRUCT_UCONTEXT_UC_MCONTEXT_GREGS) && defined(CPU_i386) + +typedef void *CONTEXT_T; +#define HAVE_CONTEXT_T 1 +#define CONTEXT_RIP(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_EIP]) +#define CONTEXT_RAX(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_EAX]) +#define CONTEXT_RCX(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_ECX]) +#define CONTEXT_RDX(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_EDX]) +#define CONTEXT_RBX(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_EBX]) +#define CONTEXT_RSP(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_ESP]) +#define CONTEXT_RBP(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_EBP]) +#define CONTEXT_RSI(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_ESI]) +#define CONTEXT_RDI(context) (((struct ucontext *) context)->uc_mcontext.gregs[REG_EDI]) + +#elif defined(__DARWIN_UNIX03) && defined(CPU_x86_64) + +typedef void *CONTEXT_T; +#define HAVE_CONTEXT_T 1 +#define CONTEXT_RIP(context) (*((unsigned long *) &((ucontext_t *) context)->uc_mcontext->__ss.__rip)) +#define CONTEXT_RAX(context) (((ucontext_t *) context)->uc_mcontext->__ss.__rax) +#define CONTEXT_RCX(context) (((ucontext_t *) context)->uc_mcontext->__ss.__rcx) +#define CONTEXT_RDX(context) (((ucontext_t *) context)->uc_mcontext->__ss.__rdx) +#define CONTEXT_RBX(context) (((ucontext_t *) context)->uc_mcontext->__ss.__rbx) +#define CONTEXT_RSP(context) (*((unsigned long *) &((ucontext_t *) context)->uc_mcontext->__ss.__rsp)) +#define CONTEXT_RBP(context) (((ucontext_t *) context)->uc_mcontext->__ss.__rbp) +#define CONTEXT_RSI(context) (((ucontext_t *) context)->uc_mcontext->__ss.__rsi) +#define CONTEXT_RDI(context) (((ucontext_t *) context)->uc_mcontext->__ss.__rdi) +#define CONTEXT_R8(context) (((ucontext_t *) context)->uc_mcontext->__ss.__r8) +#define CONTEXT_R9(context) (((ucontext_t *) context)->uc_mcontext->__ss.__r9) +#define CONTEXT_R10(context) (((ucontext_t *) context)->uc_mcontext->__ss.__r10) +#define CONTEXT_R11(context) (((ucontext_t *) context)->uc_mcontext->__ss.__r11) +#define CONTEXT_R12(context) (((ucontext_t *) context)->uc_mcontext->__ss.__r12) +#define CONTEXT_R13(context) (((ucontext_t *) context)->uc_mcontext->__ss.__r13) +#define CONTEXT_R14(context) (((ucontext_t *) context)->uc_mcontext->__ss.__r14) +#define CONTEXT_R15(context) (((ucontext_t *) context)->uc_mcontext->__ss.__r15) + +#elif defined(__DARWIN_UNIX03) && defined(CPU_i386) + +typedef void *CONTEXT_T; +#define HAVE_CONTEXT_T 1 +#define CONTEXT_RIP(context) (*((unsigned long *) &((ucontext_t *) context)->uc_mcontext->__ss.__eip)) +#define CONTEXT_RAX(context) (((ucontext_t *) context)->uc_mcontext->__ss.__eax) +#define CONTEXT_RCX(context) (((ucontext_t *) context)->uc_mcontext->__ss.__ecx) +#define CONTEXT_RDX(context) (((ucontext_t *) context)->uc_mcontext->__ss.__edx) +#define CONTEXT_RBX(context) (((ucontext_t *) context)->uc_mcontext->__ss.__ebx) +#define CONTEXT_RSP(context) (*((unsigned long *) &((ucontext_t *) context)->uc_mcontext->__ss.__esp)) +#define CONTEXT_RBP(context) (((ucontext_t *) context)->uc_mcontext->__ss.__ebp) +#define CONTEXT_RSI(context) (((ucontext_t *) context)->uc_mcontext->__ss.__esi) +#define CONTEXT_RDI(context) (((ucontext_t *) context)->uc_mcontext->__ss.__edi) + +#elif defined (AMIBERRY) && defined(CPU_x86_64) + +typedef void *CONTEXT_T; +#define HAVE_CONTEXT_T 1 +#define CONTEXT_RIP(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RIP]) +#define CONTEXT_RAX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RAX]) +#define CONTEXT_RCX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RCX]) +#define CONTEXT_RDX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RDX]) +#define CONTEXT_RBX(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RBX]) +#define CONTEXT_RSP(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RSP]) +#define CONTEXT_RBP(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RBP]) +#define CONTEXT_RSI(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RSI]) +#define CONTEXT_RDI(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_RDI]) +#define CONTEXT_R8(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R8]) +#define CONTEXT_R9(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R9]) +#define CONTEXT_R10(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R10]) +#define CONTEXT_R11(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R11]) +#define CONTEXT_R12(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R12]) +#define CONTEXT_R13(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R13]) +#define CONTEXT_R14(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R14]) +#define CONTEXT_R15(context) (((struct ucontext_t *) context)->uc_mcontext.gregs[REG_R15]) + +#endif + +#define CONTEXT_PC(context) CONTEXT_RIP(context) + +static int delete_trigger(blockinfo *bi, void *pc) +{ + while (bi) { + if (bi->handler && (uae_u8*)bi->direct_handler <= pc && + (uae_u8*)bi->nexthandler > pc) { +#ifdef DEBUG_ACCESS + write_log(_T("JIT: Deleted trigger (%p < %p < %p) %p\n"), + bi->handler, pc, bi->nexthandler, bi->pc_p); +#endif + invalidate_block(bi); + raise_in_cl_list(bi); + set_special(0); + return 1; + } + bi = bi->next; + } + return 0; +} + +/* Opcode register id list: + * + * 8 Bit: 16 Bit: 32 Bit: + * + * 0: AL 0: AX 0: EAX + * 1: CL 1: CX 1: ECX + * 2: DL 2: DX 2: EDX + * 3: BL 3: BX 3: EBX + * 4: AH (SPL, if REX) 4: SP 4: ESP + * 5: CH (BPL, if REX) 5: BP 5: EBP + * 6: DH (SIL, if REX) 6: SI 6: ESI + * 7: BH (DIL, if REX) 7: DI 7: EDI + * 8: R8L 8: R8W 8: R8D + * 9: R9L 9: R9W 9: R9D + * 10: R10L 10: R10W 10: R10D + * 11: R11L 11: R11W 11: R11D + * 12: R12L 12: R12W 12: R12D + * 13: R13L 13: R13W 13: R13D + * 14: R14L 14: R14W 14: R14D + * 15: R15L 15: R15W 15: R15D + */ + +static bool decode_instruction( + uae_u8 *pc, int *r, int *dir, int *size, int *len, int *rex) +{ + *r = -1; + *size = 4; + *dir = -1; + *len = 0; + *rex = 0; + +#ifdef CPU_x86_64 + /* Skip address-size override prefix. */ + if (*pc == 0x67) { + pc += 1; + *len += 1; + } +#endif + /* Operand size override prefix. */ + if (*pc == 0x66) { + pc += 1; + *size = 2; + *len += 1; + } +#ifdef CPU_x86_64 + /* Handle x86-64 REX prefix. */ + if ((pc[0] & 0xf0) == 0x40) { + *rex = pc[0]; + pc += 1; + *len += 1; + if (*rex & (1 << 3)) { + *size = 8; + /* 64-bit operand size not supported. */ + return 0; + } + } +#endif + + switch (pc[0]) { + case 0x8a: /* MOV r8, m8 */ + if ((pc[1] & 0xc0) == 0x80) { + *r = (pc[1] >> 3) & 7; + *dir = SIG_READ; + *size = 1; + *len += 6; + break; + } + break; + case 0x88: /* MOV m8, r8 */ + if ((pc[1] & 0xc0) == 0x80) { + *r = (pc[1] >> 3) & 7; + *dir = SIG_WRITE; + *size = 1; + *len += 6; + break; + } + break; + case 0x8b: /* MOV r32, m32 */ + switch (pc[1] & 0xc0) { + case 0x80: + *r = (pc[1] >> 3) & 7; + *dir = SIG_READ; + *len += 6; + break; + case 0x40: + *r = (pc[1] >> 3) & 7; + *dir = SIG_READ; + *len += 3; + break; + case 0x00: + *r = (pc[1] >> 3) & 7; + *dir = SIG_READ; + *len += 2; + break; + default: + break; + } + break; + case 0x89: /* MOV m32, r32 */ + switch (pc[1] & 0xc0) { + case 0x80: + *r = (pc[1] >> 3) & 7; + *dir = SIG_WRITE; + *len += 6; + break; + case 0x40: + *r = (pc[1] >> 3) & 7; + *dir = SIG_WRITE; + *len += 3; + break; + case 0x00: + *r = (pc[1] >> 3) & 7; + *dir = SIG_WRITE; + *len += 2; + break; + } + break; + } +#ifdef CPU_x86_64 + if (*rex & (1 << 2)) { + /* Use x86-64 extended registers R8..R15. */ + *r += 8; + } +#endif + return *r != -1; +} + +#ifdef HAVE_CONTEXT_T + +static void *get_pr_from_context(CONTEXT_T context, int r, int size, int rex) +{ + switch (r) { + case 0: + return &(CONTEXT_RAX(context)); + case 1: + return &(CONTEXT_RCX(context)); + case 2: + return &(CONTEXT_RDX(context)); + case 3: + return &(CONTEXT_RBX(context)); + case 4: + if (size > 1 || rex) { + return NULL; + } else { + return (((uae_u8 *) &(CONTEXT_RAX(context))) + 1); /* AH */ + } + case 5: + if (size > 1 || rex) { + return &(CONTEXT_RBP(context)); + } else { + return (((uae_u8 *) &(CONTEXT_RCX(context))) + 1); /* CH */ + } + case 6: + if (size > 1 || rex) { + return &(CONTEXT_RSI(context)); + } else { + return (((uae_u8 *) &(CONTEXT_RDX(context))) + 1); /* DH */ + } + case 7: + if (size > 1 || rex) { + return &(CONTEXT_RDI(context)); + } else { + return (((uae_u8 *) &(CONTEXT_RBX(context))) + 1); /* BH */ + } +#ifdef CPU_x86_64 + case 8: + return &(CONTEXT_R8(context)); + case 9: + return &(CONTEXT_R9(context)); + case 10: + return &(CONTEXT_R10(context)); + case 11: + return &(CONTEXT_R11(context)); + case 12: + return &(CONTEXT_R12(context)); + case 13: + return &(CONTEXT_R13(context)); + case 14: + return &(CONTEXT_R14(context)); + case 15: + return &(CONTEXT_R15(context)); +#endif + default: + abort (); + } +} + +static void log_unhandled_access(uae_u8 *fault_pc) +{ + write_log(_T("JIT: Can't handle access PC=%p!\n"), fault_pc); + if (fault_pc) { + write_log(_T("JIT: Instruction bytes")); + for (int j = 0; j < 10; j++) { + write_log(_T(" %02x"), fault_pc[j]); + } + write_log(_T("\n")); + } +} + +#ifdef WIN32 + +static int handle_access(uintptr_t fault_addr, CONTEXT_T context) +{ + uae_u8 *fault_pc = (uae_u8 *) CONTEXT_PC(context); +#ifdef CPU_64_BIT +#if 0 + if ((fault_addr & 0xffffffff00000000) == 0xffffffff00000000) { + fault_addr &= 0xffffffff; + } +#endif + if (fault_addr > (uintptr_t) 0xffffffff) { + return 0; + } +#endif + +#ifdef DEBUG_ACCESS + write_log(_T("JIT: Fault address is 0x%lx at PC=%p\n"), fault_addr, fault_pc); +#endif + if (!canbang || !currprefs.cachesize) + return 0; + + if (in_handler) + write_log(_T("JIT: Argh --- Am already in a handler. Shouldn't happen!\n")); + + if (fault_pc < compiled_code || fault_pc > current_compile_p) { + return 0; + } + + int r = -1, size = 4, dir = -1, len = 0, rex = 0; + decode_instruction(fault_pc, &r, &dir, &size, &len, &rex); + if (r == -1) { + log_unhandled_access(fault_pc); + return 0; + } + +#ifdef DEBUG_ACCESS + write_log (_T("JIT: Register was %d, direction was %d, size was %d\n"), + r, dir, size); +#endif + + void *pr = get_pr_from_context(context, r, size, rex); + if (pr == NULL) { + log_unhandled_access(fault_pc); + return 0; + } + + uae_u32 addr = uae_p32(fault_addr) - uae_p32(NATMEM_OFFSET); +#ifdef DEBUG_ACCESS + if (addr >= 0x80000000) { + write_log (_T("JIT: Suspicious address 0x%x in SEGV handler.\n"), addr); + } + addrbank *ab = &get_mem_bank(addr); + if (ab) + write_log(_T("JIT: Address bank: %s, address %08x\n"), ab->name ? ab->name : _T("NONE"), addr); +#endif + + if (dir == SIG_READ) { + switch (size) { + case 1: + *((uae_u8*)pr) = get_byte(addr); + break; + case 2: + *((uae_u16*)pr) = do_byteswap_16(get_word(addr)); + break; + case 4: + *((uae_u32*)pr) = do_byteswap_32(get_long(addr)); + break; + default: + abort(); + } + } else { + switch (size) { + case 1: + put_byte(addr, *((uae_u8 *) pr)); + break; + case 2: + put_word(addr, do_byteswap_16(*((uae_u16 *) pr))); + break; + case 4: + put_long(addr, do_byteswap_32(*((uae_u32 *) pr))); + break; + default: abort(); + } + } + CONTEXT_PC(context) += len; + + if (delete_trigger(active, fault_pc)) { + return 1; + } + /* Not found in the active list. Might be a rom routine that + * is in the dormant list */ + if (delete_trigger(dormant, fault_pc)) { + return 1; + } +#ifdef DEBUG_ACCESS + // Can happen if MOVEM causes multiple faults + write_log (_T("JIT: Huh? Could not find trigger!\n")); +#endif + set_special(0); + return 1; +} + +#else + +/* + * Try to handle faulted memory access in compiled code + * + * Returns 1 if handled, 0 otherwise + */ +static int handle_access(uintptr_t fault_addr, CONTEXT_T context) +{ + uae_u8 *fault_pc = (uae_u8 *) CONTEXT_PC(context); +#ifdef CPU_64_BIT +#if 0 + if ((fault_addr & 0xffffffff00000000) == 0xffffffff00000000) { + fault_addr &= 0xffffffff; + } +#endif + if (fault_addr > (uintptr_t) 0xffffffff) { + return 0; + } +#endif + +#ifdef DEBUG_ACCESS + write_log(_T("JIT: Fault address is 0x%lx at PC=%p\n"), fault_addr, fault_pc); +#endif + if (!canbang || !currprefs.cachesize) + return 0; + + if (in_handler) + write_log(_T("JIT: Argh --- Am already in a handler. Shouldn't happen!\n")); + + if (fault_pc < compiled_code || fault_pc > current_compile_p) { + return 0; + } + + int r = -1, size = 4, dir = -1, len = 0, rex = 0; + decode_instruction(fault_pc, &r, &dir, &size, &len, &rex); + if (r == -1) { + log_unhandled_access(fault_pc); + return 0; + } + +#ifdef DEBUG_ACCESS + write_log (_T("JIT: Register was %d, direction was %d, size was %d\n"), + r, dir, size); +#endif + + void *pr = get_pr_from_context(context, r, size, rex); + if (pr == NULL) { + log_unhandled_access(fault_pc); + return 0; + } + + uae_u32 addr = uae_p32(fault_addr) - uae_p32(NATMEM_OFFSET); +#ifdef DEBUG_ACCESS + if (addr >= 0x80000000) { + write_log (_T("JIT: Suspicious address 0x%x in SEGV handler.\n"), addr); + } + addrbank *ab = &get_mem_bank(addr); + if (ab) + write_log(_T("JIT: Address bank: %s, address %08x\n"), ab->name ? ab->name : _T("NONE"), addr); +#endif + + uae_u8 *original_target = target; + target = (uae_u8*) CONTEXT_PC(context); + + uae_u8 vecbuf[5]; + for (int i = 0; i < sizeof(vecbuf); i++) { + vecbuf[i] = target[i]; + } + raw_jmp(uae_p32(veccode)); + +#ifdef DEBUG_ACCESS + write_log(_T("JIT: Create jump to %p\n"), veccode); +#endif + + target = veccode; + if (dir == SIG_READ) { + switch (size) { + case 1: + raw_mov_b_ri(r, get_byte(addr)); + break; + case 2: + raw_mov_w_ri(r, uae_bswap_16(get_word(addr))); + break; + case 4: + raw_mov_l_ri(r, uae_bswap_32(get_long(addr))); + break; + default: + abort(); + } + } else { + switch (size) { + case 1: + put_byte(addr, *((uae_u8 *) pr)); + break; + case 2: + put_word(addr, uae_bswap_16(*((uae_u16 *) pr))); + break; + case 4: + put_long(addr, uae_bswap_32(*((uae_u32 *) pr))); + break; + default: abort(); + } + } + for (int i = 0; i < sizeof(vecbuf); i++) { + raw_mov_b_mi(JITPTR CONTEXT_PC(context) + i, vecbuf[i]); + } + raw_mov_l_mi(uae_p32(&in_handler), 0); + raw_jmp(uae_p32(CONTEXT_PC(context)) + len); + + in_handler = 1; + target = original_target; + if (delete_trigger(active, fault_pc)) { + return 1; + } + /* Not found in the active list. Might be a rom routine that + * is in the dormant list */ + if (delete_trigger(dormant, fault_pc)) { + return 1; + } +#ifdef DEBUG_ACCESS + write_log (_T("JIT: Huh? Could not find trigger!\n")); +#endif + set_special(0); + return 1; +} +#endif + +#endif /* CONTEXT_T */ + +#ifdef _WIN32 + +LONG WINAPI EvalException(LPEXCEPTION_POINTERS info) +{ + DWORD code = info->ExceptionRecord->ExceptionCode; + if (code != STATUS_ACCESS_VIOLATION || !canbang || currprefs.cachesize == 0) + return EXCEPTION_CONTINUE_SEARCH; + + uintptr_t address = info->ExceptionRecord->ExceptionInformation[1]; + if (handle_access(address, info)) { + return EXCEPTION_CONTINUE_EXECUTION; + } + if (currprefs.comp_catchfault) { + // setup fake exception + exception2_setup(regs.opcode, uae_p32(address) - uae_p32(NATMEM_OFFSET), info->ExceptionRecord->ExceptionInformation[0] == 0, 1, regs.s ? 4 : 0); + return EXCEPTION_EXECUTE_HANDLER; + } + return EXCEPTION_CONTINUE_SEARCH; +} + +static void *installed_vector_handler; + +static LONG CALLBACK JITVectoredHandler(PEXCEPTION_POINTERS info) +{ +// write_log(_T("JitVectoredHandler\n")); + return EvalException(info); +} + +#elif defined(HAVE_CONTEXT_T) + +static void sigsegv_handler(int signum, siginfo_t *info, void *context) +{ + uae_u8 *i = (uae_u8 *) CONTEXT_PC(context); + uintptr_t address = (uintptr_t) info->si_addr; + + if (i >= compiled_code) { + if (handle_access(address, context)) { + return; + } + } else { + write_log ("Caught illegal access to %08lx at eip=%p\n", address, i); + } + + exit (EXIT_FAILURE); +} + +#endif + +// #define TEST_EXCEPTION_HANDLER + +#ifdef TEST_EXCEPTION_HANDLER +#include "test_exception_handler.cpp" +#endif + +static void install_exception_handler(void) +{ +#ifdef TEST_EXCEPTION_HANDLER + test_exception_handler(); +#endif + +#ifdef JIT_EXCEPTION_HANDLER + if (veccode == NULL) { + veccode = (uae_u8 *) uae_vm_alloc(256, UAE_VM_32BIT, UAE_VM_READ_WRITE_EXECUTE); + } +#endif +#ifdef USE_STRUCTURED_EXCEPTION_HANDLING + /* Structured exception handler is installed in main.cpp */ +#elif defined(_WIN32) +#if 1 + write_log(_T("JIT: Installing vectored exception handler\n")); + installed_vector_handler = AddVectoredExceptionHandler( + 0, JITVectoredHandler); +#else + write_log(_T("JIT: Installing unhandled exception filter\n")); + SetUnhandledExceptionFilter(EvalException); +#endif +#elif defined(HAVE_CONTEXT_T) + write_log (_T("JIT: Installing segfault handler\n")); + struct sigaction act; + act.sa_sigaction = (void (*)(int, siginfo_t*, void*)) sigsegv_handler; + sigemptyset (&act.sa_mask); + act.sa_flags = SA_SIGINFO; + sigaction(SIGSEGV, &act, NULL); +#ifdef MACOSX + sigaction(SIGBUS, &act, NULL); +#endif +#else + write_log (_T("JIT: No segfault handler installed\n")); +#endif +} + +#endif /* NATMEM_OFFSET */ diff --git a/src/jit/flags_x86.h b/src/jit/x86/flags_x86.h similarity index 100% rename from src/jit/flags_x86.h rename to src/jit/x86/flags_x86.h diff --git a/src/jit/gencomp.cpp b/src/jit/x86/gencomp.cpp similarity index 100% rename from src/jit/gencomp.cpp rename to src/jit/x86/gencomp.cpp diff --git a/src/jit/x86/memory-uae.h b/src/jit/x86/memory-uae.h new file mode 100644 index 000000000..e6f5f6667 --- /dev/null +++ b/src/jit/x86/memory-uae.h @@ -0,0 +1,3 @@ +#pragma once +#include "options.h" +#include "memory.h"