From f8a15f724348a71b2bd3a02eaaa5ef1c89ac2bbb Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 8 Aug 2023 20:35:47 +0200 Subject: [PATCH] [AArch64 JIT] Drop hack for TST emulation The incorrect carry and overflow flag emulation broke the classic touchpad diags 2.0.1183. --- core/translate_aarch64.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/core/translate_aarch64.cpp b/core/translate_aarch64.cpp index e27079f0..8507d743 100644 --- a/core/translate_aarch64.cpp +++ b/core/translate_aarch64.cpp @@ -393,11 +393,8 @@ void translate(uint32_t pc_start, uint32_t *insn_ptr_start) goto unimpl; if(i.data_proc.s - && !(i.data_proc.op == OP_ADD || i.data_proc.op == OP_SUB || i.data_proc.op == OP_CMP || i.data_proc.op == OP_CMN - #ifndef SUPPORT_LINUX - || i.data_proc.op == OP_TST - #endif - )) + && !(i.data_proc.op == OP_ADD || i.data_proc.op == OP_SUB + || i.data_proc.op == OP_CMP || i.data_proc.op == OP_CMN)) { /* We can't translate the S-bit that easily, as the barrel shifter output does not influence @@ -460,11 +457,7 @@ void translate(uint32_t pc_start, uint32_t *insn_ptr_start) 0x1A000000, // ADC (no shift!) 0x5A000000, // SBC (no shift!) 0, // RSC not possible - #ifdef SUPPORT_LINUX - 0, // TST not possible, carry and overflow flags not identical - #else - 0x6A00001F, // TST (ANDS with rd = wzr) - #endif + 0, // TST not possible, carry and overflow flags not identical 0, // TEQ not possible 0x6B00001F, // CMP (SUBS with rd = wzr) 0x2B00001F, // CMN (ADDS with rd = wzr)