From 185bb4875f507f8fef6bf4ee8688a5f37476cd80 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 5 Aug 2001 22:22:58 +0000 Subject: [PATCH] Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@841 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/codeopt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cc65/codeopt.c b/src/cc65/codeopt.c index 3442b421f..fce4c1f34 100644 --- a/src/cc65/codeopt.c +++ b/src/cc65/codeopt.c @@ -690,8 +690,9 @@ static unsigned OptAdd2 (CodeSeg* S) !CE_HasLabel (L[5]) && L[6]->OPC == OP65_JSR && strcmp (L[6]->Arg, "addeqysp") == 0 && - !CE_HasLabel (L[6])) { - + !CE_HasLabel (L[6]) && + (GetRegInfo (S, I+7) & REG_AX) == 0) { + char Buf [20]; CodeEntry* X; int Offs; @@ -2015,9 +2016,8 @@ static unsigned OptPtrLoad2 (CodeSeg* S) !CE_HasLabel (L[6]) && L[7]->OPC == OP65_JSR && strcmp (L[7]->Arg, "ldauidx") == 0 && - !CE_HasLabel (L[7]) && - (GetRegInfo (S, I+8) & REG_AX) == 0) { - + !CE_HasLabel (L[7])) { + CodeEntry* X; /* Store the low byte and remove the TAY instead */