summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormerry <MerryMage@users.noreply.github.com>2020-06-20 17:08:23 +0200
committerGitHub <noreply@github.com>2020-06-20 17:08:23 +0200
commit928e9c09aafc2312a619379a060dba81156b99b7 (patch)
tree31f2b055c57b8b5ee221db0c429881cc9627db04
parentMerge pull request #4123 from lioncash/unused-var (diff)
parentmacro_jit_x64: Correct readability of Compile_ExtractShiftLeftImmediate() (diff)
downloadyuzu-928e9c09aafc2312a619379a060dba81156b99b7.tar
yuzu-928e9c09aafc2312a619379a060dba81156b99b7.tar.gz
yuzu-928e9c09aafc2312a619379a060dba81156b99b7.tar.bz2
yuzu-928e9c09aafc2312a619379a060dba81156b99b7.tar.lz
yuzu-928e9c09aafc2312a619379a060dba81156b99b7.tar.xz
yuzu-928e9c09aafc2312a619379a060dba81156b99b7.tar.zst
yuzu-928e9c09aafc2312a619379a060dba81156b99b7.zip
-rw-r--r--src/video_core/macro/macro_jit_x64.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp
index 63e7ca416..4eef342ec 100644
--- a/src/video_core/macro/macro_jit_x64.cpp
+++ b/src/video_core/macro/macro_jit_x64.cpp
@@ -239,10 +239,10 @@ void MacroJITx64Impl::Compile_ExtractInsert(Macro::Opcode opcode) {
}
void MacroJITx64Impl::Compile_ExtractShiftLeftImmediate(Macro::Opcode opcode) {
- auto dst = Compile_GetRegister(opcode.src_a, eax);
- auto src = Compile_GetRegister(opcode.src_b, RESULT);
+ const auto dst = Compile_GetRegister(opcode.src_a, eax);
+ const auto src = Compile_GetRegister(opcode.src_b, RESULT);
- shr(src, al);
+ shr(src, dst.cvt8());
if (opcode.bf_size != 0 && opcode.bf_size != 31) {
and_(src, opcode.GetBitfieldMask());
} else if (opcode.bf_size == 0) {
@@ -258,8 +258,8 @@ void MacroJITx64Impl::Compile_ExtractShiftLeftImmediate(Macro::Opcode opcode) {
}
void MacroJITx64Impl::Compile_ExtractShiftLeftRegister(Macro::Opcode opcode) {
- auto dst = Compile_GetRegister(opcode.src_a, eax);
- auto src = Compile_GetRegister(opcode.src_b, RESULT);
+ const auto dst = Compile_GetRegister(opcode.src_a, eax);
+ const auto src = Compile_GetRegister(opcode.src_b, RESULT);
if (opcode.bf_src_bit != 0) {
shr(src, opcode.bf_src_bit);
@@ -268,7 +268,8 @@ void MacroJITx64Impl::Compile_ExtractShiftLeftRegister(Macro::Opcode opcode) {
if (opcode.bf_size != 31) {
and_(src, opcode.GetBitfieldMask());
}
- shl(src, al);
+ shl(src, dst.cvt8());
+
Compile_ProcessResult(opcode.result_operation, opcode.dst);
}