From 0069d44ff7f06dca7d3b233305c8e13185867615 Mon Sep 17 00:00:00 2001 From: Ville Linde Date: Mon, 16 May 2016 19:52:58 +0300 Subject: [PATCH] drcbex64: special case for and (nw) --- src/devices/cpu/drcbex64.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp index 2a09a84a39c..7572733fc34 100644 --- a/src/devices/cpu/drcbex64.cpp +++ b/src/devices/cpu/drcbex64.cpp @@ -5040,6 +5040,10 @@ void drcbe_x64::op_and(x86code *&dst, const instruction &inst) if (dstp.is_memory() && dstp == src1p) emit_and_m32_p32(dst, MABS(dstp.memory()), src2p, inst); // and [dstp],src2p + // dstp == src2p in memory + else if (dstp.is_memory() && dstp == src2p) + emit_and_m32_p32(dst, MABS(dstp.memory()), src1p, inst); // and [dstp],src1p + // AND with immediate 0xff else if (src2p.is_immediate_value(0xff) && inst.flags() == 0) { @@ -5076,6 +5080,10 @@ void drcbe_x64::op_and(x86code *&dst, const instruction &inst) if (dstp.is_memory() && dstp == src1p) emit_and_m64_p64(dst, MABS(dstp.memory()), src2p, inst); // and [dstp],src2p + // dstp == src2p in memory + else if (dstp.is_memory() && dstp == src2p) + emit_and_m64_p64(dst, MABS(dstp.memory()), src1p, inst); // and [dstp],src1p + // AND with immediate 0xff else if (src2p.is_immediate_value(0xff) && inst.flags() == 0) {