new version
authorTobias Girstmair <t@thi3nkpad.lan>
Tue, 13 Nov 2018 01:53:22 +0000 (02:53 +0100)
committerTobias Girstmair <t@thi3nkpad.lan>
Tue, 13 Nov 2018 01:53:26 +0000 (02:53 +0100)
WARN: breaks at ~ 70min, but who cares

foo.c

diff --git a/foo.c b/foo.c
index ed1922b8408ed23b9366212ecc494f539b45fa3f..8deb7e68e0e0be8db8a03dc669ea946c01f21195 100644 (file)
--- a/foo.c
+++ b/foo.c
@@ -86,7 +86,16 @@ int main(void) {
                MOV     (x, s)
                INC     (x)
                #define tmp o
-               x = (x*0x55)>>8;
+                unsigned short sum = 0;
+                for(int loop = 0; loop < 4; loop ++) {
+                sum >>= 1;
+                sum += x;
+                sum >>= 1;
+                //nop
+                }
+                sum >>= 1;
+                x = sum;
+
                #undef tmp
                t = ((i3&0x01)<<13 | i2<<5 | i1>>3) % 3;
                ADD     (t, n)
Imprint / Impressum