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

diff --git a/foo.c b/foo.c
index 311277f511487fb5cc9baad95c22821023bf52ce..f461c4ef42c0858eee51a12631dc6be8a6c4c94d 100644 (file)
--- a/foo.c
+++ b/foo.c
@@ -86,16 +86,25 @@ int main(void) {
                MOV     (x, s)
                INC     (x)
                #define tmp o
-                unsigned short sum = 0;
-                for(int loop = 0; loop < 4; loop ++) {
+                unsigned short sum = 0; //XXX
+                sum >>= 1;
+                sum += x;
+                sum >>= 1;
+                //nop
+                sum >>= 1;
+                sum += x;
+                sum >>= 1;
+                //nop
+                sum >>= 1;
+                sum += x;
+                sum >>= 1;
+                //nop
                 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)
@@ -107,8 +116,15 @@ int main(void) {
                MOV     (x, s)
                INC     (x)
                #define tmp o
-                sum = 0;
-                for(int loop = 0; loop < 2; loop ++) {
+                sum = 0; //XXX
+                sum >>= 1;
+                sum += x;
+                sum >>= 1;
+                sum += x;
+                sum >>= 1;
+                //nop
+                sum >>= 1;
+                //nop
                 sum >>= 1;
                 sum += x;
                 sum >>= 1;
@@ -117,7 +133,6 @@ int main(void) {
                 //nop
                 sum >>= 1;
                 //nop
-                }
                 sum >>= 1;
                 x = sum;
                #undef tmp
Imprint / Impressum