summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/macro/macro_jit_x64.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp
index d4a97ec7b..bee34a7c0 100644
--- a/src/video_core/macro/macro_jit_x64.cpp
+++ b/src/video_core/macro/macro_jit_x64.cpp
@@ -56,11 +56,13 @@ void MacroJITx64Impl::Compile_ALU(Macro::Opcode opcode) {
56 const bool valid_operation = !is_a_zero && !is_b_zero; 56 const bool valid_operation = !is_a_zero && !is_b_zero;
57 const bool is_move_operation = !is_a_zero && is_b_zero; 57 const bool is_move_operation = !is_a_zero && is_b_zero;
58 const bool has_zero_register = is_a_zero || is_b_zero; 58 const bool has_zero_register = is_a_zero || is_b_zero;
59 const bool no_zero_reg_skip = opcode.alu_operation == Macro::ALUOperation::AddWithCarry ||
60 opcode.alu_operation == Macro::ALUOperation::SubtractWithBorrow;
59 61
60 Xbyak::Reg32 src_a; 62 Xbyak::Reg32 src_a;
61 Xbyak::Reg32 src_b; 63 Xbyak::Reg32 src_b;
62 64
63 if (!optimizer.zero_reg_skip) { 65 if (!optimizer.zero_reg_skip || no_zero_reg_skip) {
64 src_a = Compile_GetRegister(opcode.src_a, RESULT); 66 src_a = Compile_GetRegister(opcode.src_a, RESULT);
65 src_b = Compile_GetRegister(opcode.src_b, eax); 67 src_b = Compile_GetRegister(opcode.src_b, eax);
66 } else { 68 } else {
@@ -183,7 +185,8 @@ void MacroJITx64Impl::Compile_AddImmediate(Macro::Opcode opcode) {
183 opcode.result_operation == Macro::ResultOperation::MoveAndSetMethod) { 185 opcode.result_operation == Macro::ResultOperation::MoveAndSetMethod) {
184 if (next_opcode.has_value()) { 186 if (next_opcode.has_value()) {
185 const auto next = *next_opcode; 187 const auto next = *next_opcode;
186 if (next.result_operation == Macro::ResultOperation::MoveAndSetMethod) { 188 if (next.result_operation == Macro::ResultOperation::MoveAndSetMethod &&
189 opcode.dst == next.dst) {
187 return; 190 return;
188 } 191 }
189 } 192 }