diff options
| author | Markus Wick <degasus@users.noreply.github.com> | 2016-06-27 23:06:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-27 23:06:22 +0200 |
| commit | adcef046f6069fd72e1a10faff050f192e78c417 (patch) | |
| tree | 3c7c82d19135bf8f48dafc12d6b2920f5bb210f2 /Source/Core/Common/x64Emitter.cpp | |
| parent | ee629ec76321af888e6273cd7389b2faad833221 (diff) | |
| parent | b1296a7825078ac8354e363117613d5e3fbb64df (diff) | |
Merge pull request #3496 from mmastrac/fastmem_refactor
Refactor the fastmem/trampoline code
Diffstat (limited to 'Source/Core/Common/x64Emitter.cpp')
| -rw-r--r-- | Source/Core/Common/x64Emitter.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/Source/Core/Common/x64Emitter.cpp b/Source/Core/Common/x64Emitter.cpp index 841d90a431..8ad1d46e40 100644 --- a/Source/Core/Common/x64Emitter.cpp +++ b/Source/Core/Common/x64Emitter.cpp @@ -1046,8 +1046,14 @@ void XEmitter::MOVBE(int bits, const OpArg& dest, X64Reg src) WriteMOVBE(bits, 0xF1, src, dest); } -void XEmitter::LoadAndSwap(int size, X64Reg dst, const OpArg& src, bool sign_extend) +void XEmitter::LoadAndSwap(int size, X64Reg dst, const OpArg& src, bool sign_extend, MovInfo* info) { + if (info) + { + info->address = GetWritableCodePtr(); + info->nonAtomicSwapStore = false; + } + switch (size) { case 8: @@ -1083,20 +1089,28 @@ void XEmitter::LoadAndSwap(int size, X64Reg dst, const OpArg& src, bool sign_ext } } -u8* XEmitter::SwapAndStore(int size, const OpArg& dst, X64Reg src) +void XEmitter::SwapAndStore(int size, const OpArg& dst, X64Reg src, MovInfo* info) { - u8* mov_location = GetWritableCodePtr(); if (cpu_info.bMOVBE) { + if (info) + { + info->address = GetWritableCodePtr(); + info->nonAtomicSwapStore = false; + } MOVBE(size, dst, src); } else { BSWAP(size, src); - mov_location = GetWritableCodePtr(); + if (info) + { + info->address = GetWritableCodePtr(); + info->nonAtomicSwapStore = true; + info->nonAtomicSwapStoreSrc = src; + } MOV(size, dst, R(src)); } - return mov_location; } void XEmitter::LEA(int bits, X64Reg dest, OpArg src) |
