From: uz Date: Tue, 1 Jan 2013 21:09:16 +0000 (+0000) Subject: Fixed a bug in the function that generates register info: For tosaslax the X-Git-Tag: V2.14~120 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=03e655645760758bd0a709794f299d37a314f93a;p=cc65 Fixed a bug in the function that generates register info: For tosaslax the check for a known output value of A was wrong. git-svn-id: svn://svn.cc65.org/cc65/trunk@5954 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/codeent.c b/src/cc65/codeent.c index 7616359e5..49a837ed9 100644 --- a/src/cc65/codeent.c +++ b/src/cc65/codeent.c @@ -827,7 +827,8 @@ void CE_GenRegInfo (CodeEntry* E, RegContents* InputRegs) Out->RegX = 0; } } else if (strcmp (E->Arg, "tosaslax") == 0) { - if ((In->RegA & 0x0F) >= 8) { + if (RegValIsKnown (In->RegA) && (In->RegA & 0x0F) >= 8) { + printf ("Hey!\n"); Out->RegA = 0; } } else if (strcmp (E->Arg, "tosorax") == 0) {