fix bug: a2 (as tmp) was not cleared after use
authorTobias Girstmair <t@thi3nkpad.lan>
Thu, 13 Dec 2018 15:31:19 +0000 (16:31 +0100)
committerTobias Girstmair <t@thi3nkpad.lan>
Thu, 13 Dec 2018 15:31:19 +0000 (16:31 +0100)
foo.S

diff --git a/foo.S b/foo.S
index 777d248..2e91f8c 100644 (file)
--- a/foo.S
+++ b/foo.S
@@ -114,7 +114,6 @@ mod3: ; mod3(Mh.Ml) -> t
 g: ; g(i, t) -> t
        #define a1 x
        #define a2 _
-       CLR     a2
        CLR     a1
 
        #define tmp _
@@ -133,6 +132,8 @@ g: ; g(i, t) -> t
        ADD     Xlo, t ; NOTE: can't overflow, since RAMEND == 0x5F
        LD      t, X
 
+       CLR     a2
+
        /* decision tree multiplication saves cycles and (hopefully) reduces code size
                             _xxx?
                         /           \
Imprint / Impressum