static void I486OP(xadd_rm16_r16)(i386_state *cpustate) // Opcode 0x0f c1 { UINT8 modrm = FETCH(cpustate); if( modrm >= 0xc0 ) { UINT16 dst = LOAD_RM16(modrm); UINT16 src = LOAD_REG16(modrm); STORE_RM16(modrm, dst + src); STORE_REG16(modrm, dst); CYCLES(cpustate,CYCLES_XADD_REG_REG); } else { UINT32 ea = GetEA(cpustate,modrm); UINT16 dst = READ16(cpustate,ea); UINT16 src = LOAD_REG16(modrm); WRITE16(cpustate,ea, dst + src); STORE_REG16(modrm, dst); CYCLES(cpustate,CYCLES_XADD_REG_MEM); } }
void i386_device::i486_xadd_rm16_r16() // Opcode 0x0f c1 { UINT8 modrm = FETCH(); if( modrm >= 0xc0 ) { UINT16 dst = LOAD_RM16(modrm); UINT16 src = LOAD_REG16(modrm); STORE_REG16(modrm, dst); STORE_RM16(modrm, dst + src); CYCLES(CYCLES_XADD_REG_REG); } else { UINT32 ea = GetEA(modrm,1); UINT16 dst = READ16(ea); UINT16 src = LOAD_REG16(modrm); WRITE16(ea, dst + src); STORE_REG16(modrm, dst); CYCLES(CYCLES_XADD_REG_MEM); } }
static void I486OP(xadd_rm8_r8)(i386_state *cpustate) // Opcode 0x0f c0 { UINT8 modrm = FETCH(cpustate); if( modrm >= 0xc0 ) { UINT8 dst = LOAD_RM8(modrm); UINT8 src = LOAD_REG8(modrm); STORE_RM16(modrm, dst + src); STORE_REG16(modrm, dst); CYCLES(cpustate,CYCLES_XADD_REG_REG); } else { UINT32 ea = GetEA(cpustate,modrm,1); UINT8 dst = READ8(cpustate,ea); UINT8 src = LOAD_REG8(modrm); WRITE8(cpustate,ea, dst + src); STORE_REG8(modrm, dst); CYCLES(cpustate,CYCLES_XADD_REG_MEM); } }