summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2020-06-15 23:01:00 +0200
committerMerryMage <MerryMage@users.noreply.github.com>2020-06-17 11:36:34 +0200
commita6ddd7c382e0362d5e86c1622c85c78c59c5aa3b (patch)
tree10c242dcba2ce14eab5e4f7f5d35886c16af56df /src/video_core
parentMerge pull request #4089 from MerryMage/macrojit-cleanup-1 (diff)
downloadyuzu-a6ddd7c382e0362d5e86c1622c85c78c59c5aa3b.tar
yuzu-a6ddd7c382e0362d5e86c1622c85c78c59c5aa3b.tar.gz
yuzu-a6ddd7c382e0362d5e86c1622c85c78c59c5aa3b.tar.bz2
yuzu-a6ddd7c382e0362d5e86c1622c85c78c59c5aa3b.tar.lz
yuzu-a6ddd7c382e0362d5e86c1622c85c78c59c5aa3b.tar.xz
yuzu-a6ddd7c382e0362d5e86c1622c85c78c59c5aa3b.tar.zst
yuzu-a6ddd7c382e0362d5e86c1622c85c78c59c5aa3b.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/macro/macro_jit_x64.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp
index 2eb98173d..08279b9bc 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) {
const bool valid_operation = !is_a_zero && !is_b_zero;
const bool is_move_operation = !is_a_zero && is_b_zero;
const bool has_zero_register = is_a_zero || is_b_zero;
+ const bool no_zero_reg_skip = opcode.alu_operation == Macro::ALUOperation::AddWithCarry ||
+ opcode.alu_operation == Macro::ALUOperation::SubtractWithBorrow;
Xbyak::Reg32 src_a;
Xbyak::Reg32 src_b;
- if (!optimizer.zero_reg_skip) {
+ if (!optimizer.zero_reg_skip || no_zero_reg_skip) {
src_a = Compile_GetRegister(opcode.src_a, RESULT);
src_b = Compile_GetRegister(opcode.src_b, eax);
} else {