From f0e8b1fda823363ade7eb21b17228786e377cada Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Tue, 26 Aug 2014 11:28:48 +0200 Subject: [PATCH] x64Emitter: Error out on 8 bits CMOV, and emit 16 bits CMOV properly --- Source/Core/Common/x64Emitter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/Common/x64Emitter.cpp b/Source/Core/Common/x64Emitter.cpp index fdbe872795..1c8b277455 100644 --- a/Source/Core/Common/x64Emitter.cpp +++ b/Source/Core/Common/x64Emitter.cpp @@ -720,6 +720,8 @@ void XEmitter::SETcc(CCFlags flag, OpArg dest) void XEmitter::CMOVcc(int bits, X64Reg dest, OpArg src, CCFlags flag) { if (src.IsImm()) _assert_msg_(DYNA_REC, 0, "CMOVcc - Imm argument"); + if (bits == 8) _assert_msg_(DYNA_REC, 0, "CMOVcc - 8 bits unsupported"); + if (bits == 16) Write8(0x66); src.operandReg = dest; src.WriteRex(this, bits, bits); Write8(0x0F);