From 9c776a24e5e14dd34c4f30f96a6383f54442c7a9 Mon Sep 17 00:00:00 2001 From: acqn Date: Fri, 18 Sep 2020 20:22:58 +0800 Subject: [PATCH] Use bcc instead of bne in OptNegAX2 to ease optimizations. --- src/cc65/coptneg.c | 6 +++--- src/cc65/coptneg.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cc65/coptneg.c b/src/cc65/coptneg.c index 0f5d589f7..27171c68d 100644 --- a/src/cc65/coptneg.c +++ b/src/cc65/coptneg.c @@ -480,7 +480,7 @@ unsigned OptNegAX2 (CodeSeg* S) ** eor #$FF ** clc ** adc #$01 -** bne L1 +** bcc L1 ** inx ** L1: ** @@ -528,8 +528,8 @@ unsigned OptNegAX2 (CodeSeg* S) /* Get the label attached to the insn following the call */ L = CS_GenLabel (S, P); - /* bne L */ - X = NewCodeEntry (OP65_BNE, AM65_BRA, L->Name, L, E->LI); + /* bcc L */ + X = NewCodeEntry (OP65_BCC, AM65_BRA, L->Name, L, E->LI); CS_InsertEntry (S, X, I+5); /* inx */ diff --git a/src/cc65/coptneg.h b/src/cc65/coptneg.h index f549fc553..844d8b886 100644 --- a/src/cc65/coptneg.h +++ b/src/cc65/coptneg.h @@ -155,7 +155,7 @@ unsigned OptNegAX2 (CodeSeg* S); ** eor #$FF ** clc ** adc #$01 -** bne L1 +** bcc L1 ** inx ** L1: **