diff options
| author | magumagu <magumagu9@gmail.com> | 2014-05-26 01:45:07 -0700 |
|---|---|---|
| committer | magumagu <magumagu9@gmail.com> | 2014-05-26 01:45:07 -0700 |
| commit | 2599cd545e41fcc81349bb27d37c88dc0ddd5ca0 (patch) | |
| tree | 88b674266cbd36c4a8d7a126d4bb625b8b63e606 /Source/Core | |
| parent | 010ca048dff77340024987cfd341e82e0a02b879 (diff) | |
JIT: make backpatch handle sign-extend from 8 bits correctly.
I don't think this is actually possible to trigger at the moment... but
it matches the implementation of SafeLoadToReg.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp b/Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp index 9220646702..53bc48cf9c 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp @@ -86,7 +86,12 @@ const u8 *TrampolineCache::GetReadTrampoline(const InstructionInfo &info, u32 re break; } - if (dataReg != EAX) + if (info.signExtend && info.operandSize == 1) + { + // Need to sign extend value from Read_U8. + MOVSX(32, 8, dataReg, R(EAX)); + } + else if (dataReg != EAX) { MOV(32, R(dataReg), R(EAX)); } |
