diff --git a/bdshemu/bdshemu.c b/bdshemu/bdshemu.c index 2f30283..6285c44 100644 --- a/bdshemu/bdshemu.c +++ b/bdshemu/bdshemu.c @@ -1882,11 +1882,18 @@ ShemuEmulate( break; case ND_INS_CMOVcc: + GET_OP(Context, 0, &dst); + GET_OP(Context, 1, &src); if (ShemuEvalCondition(Context, Context->Instruction.Condition)) { - GET_OP(Context, 1, &src); SET_OP(Context, 0, &src); } + else + { + // Write back the same value that was already present in destination. This has the side-effect of + // clearing the upper 32 bit in the 64 bit destination register while in long mode. + SET_OP(Context, 0, &dst); + } break; case ND_INS_SETcc: diff --git a/bdshemu_test/bdshemu_test.zip b/bdshemu_test/bdshemu_test.zip index 4eeeaa0..8beccdf 100644 Binary files a/bdshemu_test/bdshemu_test.zip and b/bdshemu_test/bdshemu_test.zip differ diff --git a/bindings/pybddisasm/setup.py b/bindings/pybddisasm/setup.py index 61cbd4e..b95a041 100644 --- a/bindings/pybddisasm/setup.py +++ b/bindings/pybddisasm/setup.py @@ -12,7 +12,7 @@ from setuptools import find_packages, setup, Command, Extension, Distribution from codecs import open VERSION = (0, 1, 3) -LIBRARY_VERSION = (1, 34, 15) +LIBRARY_VERSION = (1, 34, 16) LIBRARY_INSTRUX_SIZE = 856 packages = ['pybddisasm'] diff --git a/inc/version.h b/inc/version.h index b4d6980..69c7d0d 100644 --- a/inc/version.h +++ b/inc/version.h @@ -7,6 +7,6 @@ #define DISASM_VERSION_MAJOR 1 #define DISASM_VERSION_MINOR 34 -#define DISASM_VERSION_REVISION 15 +#define DISASM_VERSION_REVISION 16 #endif // DISASM_VER_H