From 16057d8b04432073e64aa2436d5af9a824a1812f Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 17 Jan 2016 12:07:03 +0100 Subject: [PATCH] x86emitter: inc/dec are illegal on x86_64 --- common/src/x86emitter/x86emitter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/x86emitter/x86emitter.cpp b/common/src/x86emitter/x86emitter.cpp index bd2484e9ef..26a7076aec 100644 --- a/common/src/x86emitter/x86emitter.cpp +++ b/common/src/x86emitter/x86emitter.cpp @@ -994,6 +994,10 @@ void xImpl_IncDec::operator()( const xRegisterInt& to ) const } else { +#ifdef __x86_64__ + pxAssertMsg(0, "Single Byte INC/DEC aren't valid in 64 bits." + "You need to use the ModR/M form (FF/0 FF/1 opcodes)"); +#endif to.prefix16(); xWrite8( (isDec ? 0x48 : 0x40) | to.Id ); }