From d01bf3bcb0311b97e0d99145cb3ecad13ce3849e Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 27 Jul 2018 21:19:43 +0300 Subject: [PATCH] SPU LLVM: rewrite CGX --- rpcs3/Emu/Cell/SPURecompiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index 598e27becc..170123dbc3 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -3710,9 +3710,9 @@ public: { const auto a = get_vr(op.ra); const auto b = get_vr(op.rb); - const auto c = eval(get_vr(op.rt) << 31); + const auto x = eval(~get_vr(op.rt) & 1); const auto s = eval(a + b); - set_vr(op.rt, zext(s < a | (s == -1 & c < 0))); + set_vr(op.rt, zext((sext(s < a) | (s & ~x)) == -1)); } void BGX(spu_opcode_t op)