From 44c90c060ad6061e0959267e1bf48aa7e0524dc6 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 19 Oct 2020 00:43:40 +0300 Subject: [PATCH] TSX: improve transaction repeat handling Handle status 0 as fatal. --- Utilities/JIT.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Utilities/JIT.cpp b/Utilities/JIT.cpp index 836f737ee2..01e92a7241 100644 --- a/Utilities/JIT.cpp +++ b/Utilities/JIT.cpp @@ -285,6 +285,10 @@ asmjit::Label asmjit::build_transaction_enter(asmjit::X86Assembler& c, asmjit::L c.test(x86::eax, _XABORT_EXPLICIT); c.jnz(fallback); + // Don't repeat on weird zero status + c.test(x86::eax, x86::eax); + c.jz(fallback); + // Count an attempt without RETRY flag as 65 normal attempts and continue c.push(x86::rax); c.not_(x86::eax);