From c3775588dfd65ae09e1a174fdba35d7179ccfc59 Mon Sep 17 00:00:00 2001 From: Sintendo Date: Mon, 25 Jan 2021 23:25:38 +0100 Subject: [PATCH] Jit64: boolX - Special case xor with 0xFFFFFFFF Ever so slightly shorter. When the condition register needs updating, we still prefer xor over not+test. Before: 45 8B F5 mov r14d,r13d 41 83 F6 FF xor r14d,0FFFFFFFFh After: 45 8B F5 mov r14d,r13d 41 F7 D6 not r14d --- Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index b4cb6cee39..2997748790 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -693,6 +693,12 @@ void Jit64::boolX(UGeckoInstruction inst) MOV(32, Ra, Rj); needs_test = true; } + else if (imm == 0xFFFFFFFF && !inst.Rc) + { + if (a != j) + MOV(32, Ra, Rj); + NOT(32, Ra); + } else { if (a != j)