]> git.sur5r.net Git - cc65/commitdiff
Fixed a bug in the function that generates register info: For tosaslax the
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 1 Jan 2013 21:09:16 +0000 (21:09 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 1 Jan 2013 21:09:16 +0000 (21:09 +0000)
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

src/cc65/codeent.c

index 7616359e5716d874ec1cb16c6923bf57ca947f78..49a837ed94f887c0b97a7013432f71b665a935df 100644 (file)
@@ -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) {