From d80518871af95aed6bfba9254b49650e9a687c75 Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Thu, 1 Jun 2023 08:13:11 +0200 Subject: [PATCH] Fix bypass a->y->a chain with tya in middle --- oscar64/NativeCodeGenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oscar64/NativeCodeGenerator.cpp b/oscar64/NativeCodeGenerator.cpp index af5eb28..6d8cfc6 100644 --- a/oscar64/NativeCodeGenerator.cpp +++ b/oscar64/NativeCodeGenerator.cpp @@ -33170,7 +33170,7 @@ bool NativeCodeBasicBlock::PeepHoleOptimizer(NativeCodeProcedure* proc, int pass taxPos = -1; tayPos = -1; } else - taxPos = -1; + tayPos = -1; } else if (mIns[i].RequiresXReg()) taxPos = -1; @@ -40014,6 +40014,7 @@ void NativeCodeProcedure::Optimize(void) ResetVisited(); mEntryBlock->RemoveUnusedResultInstructions(); + #if _DEBUG ResetVisited(); mEntryBlock->CheckBlocks();