summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ville Linde <villedevs@gmail.com>2016-05-16 19:52:58 +0300
committer Ville Linde <villedevs@gmail.com>2016-05-16 19:56:07 +0300
commit0069d44ff7f06dca7d3b233305c8e13185867615 (patch)
tree5e703ea4535e50063ce92ec77cae139d0eeae47e
parentefcba70c3fed3e62e323898c0dc983d081fd8220 (diff)
drcbex64: special case for and (nw)
-rw-r--r--src/devices/cpu/drcbex64.cpp8
1 files changed, 8 insertions, 0 deletions
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)
{