Skip to content

Commit

Permalink
[AArch64 JIT] Drop hack for TST emulation
Browse files Browse the repository at this point in the history
The incorrect carry and overflow flag emulation broke the classic touchpad
diags 2.0.1183.
  • Loading branch information
Vogtinator committed Aug 8, 2023
1 parent e935598 commit f8a15f7
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions core/translate_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f8a15f7

Please sign in to comment.