new version
authorTobias Girstmair <t@thi3nkpad.lan>
Tue, 13 Nov 2018 18:18:33 +0000 (19:18 +0100)
committerTobias Girstmair <t@thi3nkpad.lan>
Tue, 13 Nov 2018 18:18:33 +0000 (19:18 +0100)
foo.c

diff --git a/foo.c b/foo.c
index 822917f..7161542 100644 (file)
--- a/foo.c
+++ b/foo.c
@@ -150,10 +150,10 @@ int main(void) {
                #undef tmp
                RCALL   mod3();
                ADD     (t, n)
-               LDI     (o, 2)
                RCALL   g();
-       t >>= o; //NOTE: o == {1, 2, 4}
-       ANDI    (t, 3)
+               LSR     (t)
+               LSR     (t)
+               ANDI    (t, 3)
                MOV     (x, s)
                INC     (x)
                #define tmp o
@@ -201,10 +201,9 @@ int main(void) {
                SUB     (t, n)
                NEG     (t)
                SUBI    (t, -8)
-               LDI     (o, 1)
                RCALL   g();
-       t >>= o; //NOTE: o == {1, 2, 4}
-       ANDI    (t, 3)
+               LSR     (t)
+               ANDI    (t, 3)
                MOV     (x, s)
                INC     (x)
                #define tmp o
Imprint / Impressum