new version
authorTobias Girstmair <t@thi3nkpad.lan>
Tue, 13 Nov 2018 01:54:43 +0000 (02:54 +0100)
committerTobias Girstmair <t@thi3nkpad.lan>
Tue, 13 Nov 2018 01:54:43 +0000 (02:54 +0100)
foo.c

diff --git a/foo.c b/foo.c
index 8deb7e68e0e0be8db8a03dc669ea946c01f21195..311277f511487fb5cc9baad95c22821023bf52ce 100644 (file)
--- a/foo.c
+++ b/foo.c
@@ -107,7 +107,19 @@ int main(void) {
                MOV     (x, s)
                INC     (x)
                #define tmp o
-               x = (x*0x33)>>8;
+                sum = 0;
+                for(int loop = 0; loop < 2; loop ++) {
+                sum >>= 1;
+                sum += x;
+                sum >>= 1;
+                sum += x;
+                sum >>= 1;
+                //nop
+                sum >>= 1;
+                //nop
+                }
+                sum >>= 1;
+                x = sum;
                #undef tmp
                t = ((i3&0x01)<<14 | i2<<6 | i1>>2) % 3;
                SUB     (t, n)
Imprint / Impressum