summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-06-19 04:28:17 +0200
committerGitHub <noreply@github.com>2020-06-19 04:28:17 +0200
commit5a092fb61e409f109383c1ad3ffa7a8b54ef9ad9 (patch)
tree3b895538eccb06f43b55e93f9426d488018354f0 /src/video_core
parentMerge pull request #4081 from Morph1984/maxwell-to-gl-vk (diff)
parentmacro_jit_x64: Optimization implicitly assumes same destination (diff)
downloadyuzu-5a092fb61e409f109383c1ad3ffa7a8b54ef9ad9.tar
yuzu-5a092fb61e409f109383c1ad3ffa7a8b54ef9ad9.tar.gz
yuzu-5a092fb61e409f109383c1ad3ffa7a8b54ef9ad9.tar.bz2
yuzu-5a092fb61e409f109383c1ad3ffa7a8b54ef9ad9.tar.lz
yuzu-5a092fb61e409f109383c1ad3ffa7a8b54ef9ad9.tar.xz
yuzu-5a092fb61e409f109383c1ad3ffa7a8b54ef9ad9.tar.zst
yuzu-5a092fb61e409f109383c1ad3ffa7a8b54ef9ad9.zip
Diffstat (limited to 'src/video_core')
-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) {
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 {
@@ -183,7 +185,8 @@ void MacroJITx64Impl::Compile_AddImmediate(Macro::Opcode opcode) {
opcode.result_operation == Macro::ResultOperation::MoveAndSetMethod) {
if (next_opcode.has_value()) {
const auto next = *next_opcode;
- if (next.result_operation == Macro::ResultOperation::MoveAndSetMethod) {
+ if (next.result_operation == Macro::ResultOperation::MoveAndSetMethod &&
+ opcode.dst == next.dst) {
return;
}
}