summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/maxwell
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-02-22 02:45:50 -0300
committerGravatar ameerj2021-07-22 21:51:22 -0400
commit18a766b3622baa40596490dbd4912f94e9980a76 (patch)
treede34dbbbd81f6f980308b165a812445b224bd8fb /src/shader_recompiler/frontend/maxwell
parentspirv: Fixes and Intel specific workarounds (diff)
downloadyuzu-18a766b3622baa40596490dbd4912f94e9980a76.tar.gz
yuzu-18a766b3622baa40596490dbd4912f94e9980a76.tar.xz
yuzu-18a766b3622baa40596490dbd4912f94e9980a76.zip
shader: Fix MOV(reg), add SHL variants and emit neg and abs instructions
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell')
-rw-r--r--src/shader_recompiler/frontend/maxwell/translate/impl/integer_shift_left.cpp8
-rw-r--r--src/shader_recompiler/frontend/maxwell/translate/impl/move_register.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/integer_shift_left.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/integer_shift_left.cpp
index b752785d4..d8a5158b5 100644
--- a/src/shader_recompiler/frontend/maxwell/translate/impl/integer_shift_left.cpp
+++ b/src/shader_recompiler/frontend/maxwell/translate/impl/integer_shift_left.cpp
@@ -56,12 +56,12 @@ void SHL(TranslatorVisitor& v, u64 insn, const IR::U32& unsafe_shift) {
56} 56}
57} // Anonymous namespace 57} // Anonymous namespace
58 58
59void TranslatorVisitor::SHL_reg(u64) { 59void TranslatorVisitor::SHL_reg(u64 insn) {
60 throw NotImplementedException("SHL_reg"); 60 SHL(*this, insn, GetReg20(insn));
61} 61}
62 62
63void TranslatorVisitor::SHL_cbuf(u64) { 63void TranslatorVisitor::SHL_cbuf(u64 insn) {
64 throw NotImplementedException("SHL_cbuf"); 64 SHL(*this, insn, GetCbuf(insn));
65} 65}
66 66
67void TranslatorVisitor::SHL_imm(u64 insn) { 67void TranslatorVisitor::SHL_imm(u64 insn) {
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/move_register.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/move_register.cpp
index c3c4b9abd..6bb08db8a 100644
--- a/src/shader_recompiler/frontend/maxwell/translate/impl/move_register.cpp
+++ b/src/shader_recompiler/frontend/maxwell/translate/impl/move_register.cpp
@@ -26,7 +26,7 @@ void MOV(TranslatorVisitor& v, u64 insn, const IR::U32& src, bool is_mov32i = fa
26} // Anonymous namespace 26} // Anonymous namespace
27 27
28void TranslatorVisitor::MOV_reg(u64 insn) { 28void TranslatorVisitor::MOV_reg(u64 insn) {
29 MOV(*this, insn, GetReg8(insn)); 29 MOV(*this, insn, GetReg20(insn));
30} 30}
31 31
32void TranslatorVisitor::MOV_cbuf(u64 insn) { 32void TranslatorVisitor::MOV_cbuf(u64 insn) {