mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
JitBackpatch: fix NOP padding
The new NOP emitter breaks when called with a negative count. As it turns out, it did happen when deoptimizing 8 bit MOVs because they are only 4 bytes long and need no BSWAP.
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Common/x64Emitter.h"
|
||||
|
||||
namespace Gen
|
||||
@ -516,8 +517,9 @@ void XEmitter::RET() {Write8(0xC3);}
|
||||
void XEmitter::RET_FAST() {Write8(0xF3); Write8(0xC3);} //two-byte return (rep ret) - recommended by AMD optimization manual for the case of jumping to a ret
|
||||
|
||||
// The first sign of decadence: optimized NOPs.
|
||||
void XEmitter::NOP(int size)
|
||||
void XEmitter::NOP(size_t size)
|
||||
{
|
||||
_dbg_assert_(DYNA_REC, (int)size > 0);
|
||||
while (true)
|
||||
{
|
||||
switch (size)
|
||||
|
Reference in New Issue
Block a user