1. Richard Goedeken
  2. mupen64plus-video-glide64mk2

Commits

ecsv  committed 003986e

Use parentheses between '|' operations
GCC produces warnings when the statement is to confusing for the reader and
misinterpretations could happen. These can be avoided by adding parentheses to
clarify the statement.

  • Participants
  • Parent commits 20eefdb
  • Branches default

Comments (0)

Files changed (4)

File src/Glide64/TexConv.h

View file
     v6 = *v3;
     ++v3;
     v7 = v6;
-    *v4 = ((v7 & 0x1E001E) >> 1) | ((v6 & 0x3C003C0) >> 2) | ((v6 & 0x78007800) >> 3) | ((v6 & 0x80008000) >> 3) | ((v6 & 0x80008000) >> 2) | ((v6 & 0x80008000) >> 1) | v6 & 0x80008000;
+    *v4 = ((v7 & 0x1E001E) >> 1) | ((v6 & 0x3C003C0) >> 2) | ((v6 & 0x78007800) >> 3) | ((v6 & 0x80008000) >> 3) | ((v6 & 0x80008000) >> 2) | ((v6 & 0x80008000) >> 1) | (v6 & 0x80008000);
     ++v4;
     --v5;
   }
     v6 = *v3;
     ++v3;
     v7 = v6;
-    *v4 = (16 * (v7 & 0xF000F0) >> 8) | v7 & 0xF000F0 | 16 * (v7 & 0xF000F0) | v6 & 0xF000F000;
+    *v4 = (16 * (v7 & 0xF000F0) >> 8) | (v7 & 0xF000F0) | (16 * (v7 & 0xF000F0)) | (v6 & 0xF000F000);
     ++v4;
     --v5;
   }
   {
     v6 = *v3;
     ++v3;
-    *v4 = ((((uint16_t)v6 << 8) & 0xFF00 & 0xF00u) >> 8) | ((((uint16_t)v6 << 8) & 0xFF00 & 0xF00u) >> 4) | (uint16_t)(((uint16_t)v6 << 8) & 0xFF00) | (((v6 << 16) & 0xF000000) >> 8) | (((v6 << 16) & 0xF000000) >> 4) | (v6 << 16) & 0xFF000000;
+    *v4 = ((((uint16_t)v6 << 8) & 0xFF00 & 0xF00u) >> 8) | ((((uint16_t)v6 << 8) & 0xFF00 & 0xF00u) >> 4) | (uint16_t)(((uint16_t)v6 << 8) & 0xFF00) | (((v6 << 16) & 0xF000000) >> 8) | (((v6 << 16) & 0xF000000) >> 4) | ((v6 << 16) & 0xFF000000);
     v7 = v4 + 1;
-    *v7 = (((v6 >> 8) & 0xF00) >> 8) | (((v6 >> 8) & 0xF00) >> 4) | (v6 >> 8) & 0xFF00 | ((v6 & 0xF000000) >> 8) | ((v6 & 0xF000000) >> 4) | v6 & 0xFF000000;
+    *v7 = (((v6 >> 8) & 0xF00) >> 8) | (((v6 >> 8) & 0xF00) >> 4) | ((v6 >> 8) & 0xFF00) | ((v6 & 0xF000000) >> 8) | ((v6 & 0xF000000) >> 4) | (v6 & 0xFF000000);
     v4 = v7 + 1;
     --v5;
   }
     v6 = *v3;
     ++v3;
     v7 = v6;
-    *v4 = ((v6 & 0xF0) << 8 >> 12) | (uint8_t)(v6 & 0xF0) | 16 * (uint8_t)(v6 & 0xF0) & 0xFFFFFFF | ((uint8_t)(v6 & 0xF0) << 8) | 16 * (uint16_t)(v6 & 0xF000) & 0xFFFFF | ((uint16_t)(v6 & 0xF000) << 8) & 0xFFFFFF | ((uint16_t)(v6 & 0xF000) << 12) & 0xFFFFFFF | ((uint16_t)(v6 & 0xF000) << 16);
+    *v4 = ((v6 & 0xF0) << 8 >> 12) | (uint8_t)(v6 & 0xF0) | (16 * (uint8_t)(v6 & 0xF0) & 0xFFFFFFF) | ((uint8_t)(v6 & 0xF0) << 8) | (16 * (uint16_t)(v6 & 0xF000) & 0xFFFFF) | (((uint16_t)(v6 & 0xF000) << 8) & 0xFFFFFF) | (((uint16_t)(v6 & 0xF000) << 12) & 0xFFFFFFF) | ((uint16_t)(v6 & 0xF000) << 16);
     v8 = v4 + 1;
-    *v8 = ((v7 & 0xF00000) >> 20) | ((v7 & 0xF00000) >> 16) | ((v7 & 0xF00000) >> 12) | ((v7 & 0xF00000) >> 8) | ((v6 & 0xF0000000) >> 12) | ((v6 & 0xF0000000) >> 8) | ((v6 & 0xF0000000) >> 4) | v6 & 0xF0000000;
+    *v8 = ((v7 & 0xF00000) >> 20) | ((v7 & 0xF00000) >> 16) | ((v7 & 0xF00000) >> 12) | ((v7 & 0xF00000) >> 8) | ((v6 & 0xF0000000) >> 12) | ((v6 & 0xF0000000) >> 8) | ((v6 & 0xF0000000) >> 4) | (v6 & 0xF0000000);
     v4 = v8 + 1;
     --v5;
   }

File src/Glide64/TexLoad4b.h

View file
       v11 = bswap32(*v6);
       v12 = v6 + 1;
       v13 = v11;
-      v14 = 8 * (v11 & 0x100000) | 4 * (v11 & 0x100000) | 2 * (v11 & 0x100000) | v11 & 0x100000 | (((v11 >> 16) & 0xE00) >> 3) & 0x100 | (v11 >> 16) & 0xE00 | 8 * ((v11 >> 12) & 0x1000) | 4 * ((v11 >> 12) & 0x1000) | 2 * ((v11 >> 12) & 0x1000) | (v11 >> 12) & 0x1000 | (((v11 >> 28) & 0xE) >> 3) | (v11 >> 28) & 0xE | 8 * ((v11 >> 24) & 0x10) | 4 * ((v11 >> 24) & 0x10) | 2 * ((v11 >> 24) & 0x10) | (v11 >> 24) & 0x10;
+      v14 = (8 * (v11 & 0x100000)) | (4 * (v11 & 0x100000)) | (2 * (v11 & 0x100000)) | (v11 & 0x100000) | ((((v11 >> 16) & 0xE00) >> 3) & 0x100) | ((v11 >> 16) & 0xE00) | (8 * ((v11 >> 12) & 0x1000)) | (4 * ((v11 >> 12) & 0x1000)) | (2 * ((v11 >> 12) & 0x1000)) | ((v11 >> 12) & 0x1000) | ((((v11 >> 28) & 0xE) >> 3)) | ((v11 >> 28) & 0xE) | (8 * ((v11 >> 24) & 0x10)) | (4 * ((v11 >> 24) & 0x10)) | (2 * ((v11 >> 24) & 0x10)) | ((v11 >> 24) & 0x10);
       v11 >>= 4;
       v11 &= 0xE0000u;
       v15 = v11 | v14;
       v11 >>= 3;
-      *v7 = (((v13 << 8) & 0xE000000) >> 3) & 0x1000000 | (v13 << 8) & 0xE000000 | 8 * ((v13 << 12) & 0x10000000) | 4 * ((v13 << 12) & 0x10000000) | 2 * ((v13 << 12) & 0x10000000) | (v13 << 12) & 0x10000000 | v11 & 0x10000 | v15;
+      *v7 = ((((v13 << 8) & 0xE000000) >> 3) & 0x1000000) | ((v13 << 8) & 0xE000000) | (8 * ((v13 << 12) & 0x10000000)) | (4 * ((v13 << 12) & 0x10000000)) | (2 * ((v13 << 12) & 0x10000000)) | ((v13 << 12) & 0x10000000) | (v11 & 0x10000) | v15;
       v16 = v7 + 1;
       v17 = 16 * (uint16_t)v13 & 0x1000;
-      v18 = ((v13 & 0xE00) >> 3) & 0x100 | v13 & 0xE00 | 8 * v17 | 4 * v17 | 2 * v17 | v17 | (((v13 >> 12) & 0xE) >> 3) | (v13 >> 12) & 0xE | 8 * ((v13 >> 8) & 0x10) | 4 * ((v13 >> 8) & 0x10) | 2 * ((v13 >> 8) & 0x10) | (v13 >> 8) & 0x10;
+      v18 = (((v13 & 0xE00) >> 3) & 0x100) | (v13 & 0xE00) | (8 * v17) | (4 * v17) | (2 * v17) | (v17) | ((((v13 >> 12) & 0xE) >> 3)) | ((v13 >> 12) & 0xE) | (8 * ((v13 >> 8) & 0x10)) | (4 * ((v13 >> 8) & 0x10)) | (2 * ((v13 >> 8) & 0x10)) | ((v13 >> 8) & 0x10);
       v19 = v13 << 16;
-      v20 = 8 * (v19 & 0x100000) | 4 * (v19 & 0x100000) | 2 * (v19 & 0x100000) | v19 & 0x100000 | v18;
+      v20 = (8 * (v19 & 0x100000)) | (4 * (v19 & 0x100000)) | (2 * (v19 & 0x100000)) | (v19 & 0x100000) | v18;
       v21 = v13 << 12;
       v21 &= 0xE0000u;
       v22 = v21 | v20;
       v21 >>= 3;
-      *v16 = (((v13 << 24) & 0xE000000) >> 3) & 0x1000000 | (v13 << 24) & 0xE000000 | 8 * ((v13 << 28) & 0x10000000) | 4 * ((v13 << 28) & 0x10000000) | 2 * ((v13 << 28) & 0x10000000) | (v13 << 28) & 0x10000000 | v21 & 0x10000 | v22;
+      *v16 = ((((v13 << 24) & 0xE000000) >> 3) & 0x1000000) | ((v13 << 24) & 0xE000000) | (8 * ((v13 << 28) & 0x10000000)) | (4 * ((v13 << 28) & 0x10000000)) | (2 * ((v13 << 28) & 0x10000000)) | ((v13 << 28) & 0x10000000) | (v21 & 0x10000) | v22;
       ++v16;
       v23 = bswap32(*v12);
       v6 = v12 + 1;
       v24 = v23;
-      v25 = 8 * (v23 & 0x100000) | 4 * (v23 & 0x100000) | 2 * (v23 & 0x100000) | v23 & 0x100000 | (((v23 >> 16) & 0xE00) >> 3) & 0x100 | (v23 >> 16) & 0xE00 | 8 * ((v23 >> 12) & 0x1000) | 4 * ((v23 >> 12) & 0x1000) | 2 * ((v23 >> 12) & 0x1000) | (v23 >> 12) & 0x1000 | (((v23 >> 28) & 0xE) >> 3) | (v23 >> 28) & 0xE | 8 * ((v23 >> 24) & 0x10) | 4 * ((v23 >> 24) & 0x10) | 2 * ((v23 >> 24) & 0x10) | (v23 >> 24) & 0x10;
+      v25 = (8 * (v23 & 0x100000)) | (4 * (v23 & 0x100000)) | (2 * (v23 & 0x100000)) | (v23 & 0x100000) | ((((v23 >> 16) & 0xE00) >> 3) & 0x100) | ((v23 >> 16) & 0xE00) | (8 * ((v23 >> 12) & 0x1000)) | (4 * ((v23 >> 12) & 0x1000)) | (2 * ((v23 >> 12) & 0x1000)) | ((v23 >> 12) & 0x1000) | (((v23 >> 28) & 0xE) >> 3) | ((v23 >> 28) & 0xE) | (8 * ((v23 >> 24) & 0x10)) | (4 * ((v23 >> 24) & 0x10)) | (2 * ((v23 >> 24) & 0x10)) | ((v23 >> 24) & 0x10);
       v23 >>= 4;
       v23 &= 0xE0000u;
       v26 = v23 | v25;
       v23 >>= 3;
-      *v16 = (((v24 << 8) & 0xE000000) >> 3) & 0x1000000 | (v24 << 8) & 0xE000000 | 8 * ((v24 << 12) & 0x10000000) | 4 * ((v24 << 12) & 0x10000000) | 2 * ((v24 << 12) & 0x10000000) | (v24 << 12) & 0x10000000 | v23 & 0x10000 | v26;
+      *v16 = ((((v24 << 8) & 0xE000000) >> 3) & 0x1000000) | ((v24 << 8) & 0xE000000) | (8 * ((v24 << 12) & 0x10000000)) | (4 * ((v24 << 12) & 0x10000000)) | (2 * ((v24 << 12) & 0x10000000)) | ((v24 << 12) & 0x10000000) | (v23 & 0x10000) | (v26);
       ++v16;
       v27 = 16 * (uint16_t)v24 & 0x1000;
-      v28 = ((v24 & 0xE00) >> 3) & 0x100 | v24 & 0xE00 | 8 * v27 | 4 * v27 | 2 * v27 | v27 | (((v24 >> 12) & 0xE) >> 3) | (v24 >> 12) & 0xE | 8 * ((v24 >> 8) & 0x10) | 4 * ((v24 >> 8) & 0x10) | 2 * ((v24 >> 8) & 0x10) | (v24 >> 8) & 0x10;
+      v28 = (((v24 & 0xE00) >> 3) & 0x100) | (v24 & 0xE00) | (8 * v27) | (4 * v27) | (2 * v27) | (v27) | ((((v24 >> 12) & 0xE) >> 3)) | ((v24 >> 12) & 0xE) | (8 * ((v24 >> 8) & 0x10)) | (4 * ((v24 >> 8) & 0x10)) | (2 * ((v24 >> 8) & 0x10)) | ((v24 >> 8) & 0x10);
       v29 = v24 << 16;
-      v30 = 8 * (v29 & 0x100000) | 4 * (v29 & 0x100000) | 2 * (v29 & 0x100000) | v29 & 0x100000 | v28;
+      v30 = (8 * (v29 & 0x100000)) | (4 * (v29 & 0x100000)) | (2 * (v29 & 0x100000)) | (v29 & 0x100000) | v28;
       v31 = v24 << 12;
       v31 &= 0xE0000u;
       v32 = v31 | v30;
       v31 >>= 3;
-      *v16 = (((v24 << 24) & 0xE000000) >> 3) & 0x1000000 | (v24 << 24) & 0xE000000 | 8 * ((v24 << 28) & 0x10000000) | 4 * ((v24 << 28) & 0x10000000) | 2 * ((v24 << 28) & 0x10000000) | (v24 << 28) & 0x10000000 | v31 & 0x10000 | v32;
+      *v16 = ((((v24 << 24) & 0xE000000) >> 3) & 0x1000000) | ((v24 << 24) & 0xE000000) | (8 * ((v24 << 28) & 0x10000000)) | (4 * ((v24 << 28) & 0x10000000)) | (2 * ((v24 << 28) & 0x10000000)) | ((v24 << 28) & 0x10000000) | (v31 & 0x10000) | v32;
       v7 = v16 + 1;
       v9 = v10 - 1;
     }
       v37 = bswap32(v33[1]);
       v38 = v37 >> 4;
       v38 &= 0xE0000u;
-      v39 = v38 | 8 * (v37 & 0x100000) | 4 * (v37 & 0x100000) | 2 * (v37 & 0x100000) | v37 & 0x100000 | (((v37 >> 16) & 0xE00) >> 3) & 0x100 | (v37 >> 16) & 0xE00 | 8 * ((v37 >> 12) & 0x1000) | 4 * ((v37 >> 12) & 0x1000) | 2 * ((v37 >> 12) & 0x1000) | (v37 >> 12) & 0x1000 | (((v37 >> 28) & 0xE) >> 3) | (v37 >> 28) & 0xE | 8 * ((v37 >> 24) & 0x10) | 4 * ((v37 >> 24) & 0x10) | 2 * ((v37 >> 24) & 0x10) | (v37 >> 24) & 0x10;
+      v39 = v38 | (8 * (v37 & 0x100000)) | (4 * (v37 & 0x100000)) | (2 * (v37 & 0x100000)) | (v37 & 0x100000) | ((((v37 >> 16) & 0xE00) >> 3) & 0x100) | ((v37 >> 16) & 0xE00) | (8 * ((v37 >> 12) & 0x1000)) | (4 * ((v37 >> 12) & 0x1000)) | (2 * ((v37 >> 12) & 0x1000)) | ((v37 >> 12) & 0x1000) | (((v37 >> 28) & 0xE) >> 3) | ((v37 >> 28) & 0xE) | (8 * ((v37 >> 24) & 0x10)) | (4 * ((v37 >> 24) & 0x10)) | (2 * ((v37 >> 24) & 0x10)) | ((v37 >> 24) & 0x10);
       v38 >>= 3;
-      *v34 = (((v37 << 8) & 0xE000000) >> 3) & 0x1000000 | (v37 << 8) & 0xE000000 | 8 * ((v37 << 12) & 0x10000000) | 4 * ((v37 << 12) & 0x10000000) | 2 * ((v37 << 12) & 0x10000000) | (v37 << 12) & 0x10000000 | v38 & 0x10000 | v39;
+      *v34 = ((((v37 << 8) & 0xE000000) >> 3) & 0x1000000) | ((v37 << 8) & 0xE000000) | (8 * ((v37 << 12) & 0x10000000)) | (4 * ((v37 << 12) & 0x10000000)) | (2 * ((v37 << 12) & 0x10000000)) | ((v37 << 12) & 0x10000000) | (v38 & 0x10000) | v39;
       v40 = v34 + 1;
       v41 = 16 * (uint16_t)v37 & 0x1000;
-      v42 = ((v37 & 0xE00) >> 3) & 0x100 | v37 & 0xE00 | 8 * v41 | 4 * v41 | 2 * v41 | v41 | (((v37 >> 12) & 0xE) >> 3) | (v37 >> 12) & 0xE | 8 * ((v37 >> 8) & 0x10) | 4 * ((v37 >> 8) & 0x10) | 2 * ((v37 >> 8) & 0x10) | (v37 >> 8) & 0x10;
+      v42 = (((v37 & 0xE00) >> 3) & 0x100) | (v37 & 0xE00) | (8 * v41) | (4 * v41) | (2 * v41) | v41 | (((v37 >> 12) & 0xE) >> 3) | ((v37 >> 12) & 0xE) | (8 * ((v37 >> 8) & 0x10)) | (4 * ((v37 >> 8) & 0x10)) | (2 * ((v37 >> 8) & 0x10)) | ((v37 >> 8) & 0x10);
       v43 = v37 << 16;
-      v44 = 8 * (v43 & 0x100000) | 4 * (v43 & 0x100000) | 2 * (v43 & 0x100000) | v43 & 0x100000 | v42;
+      v44 = (8 * (v43 & 0x100000)) | (4 * (v43 & 0x100000)) | (2 * (v43 & 0x100000)) | (v43 & 0x100000) | v42;
       v45 = v37 << 12;
       v45 &= 0xE0000u;
       v46 = v45 | v44;
       v45 >>= 3;
-      *v40 = (((v37 << 24) & 0xE000000) >> 3) & 0x1000000 | (v37 << 24) & 0xE000000 | 8 * ((v37 << 28) & 0x10000000) | 4 * ((v37 << 28) & 0x10000000) | 2 * ((v37 << 28) & 0x10000000) | (v37 << 28) & 0x10000000 | v45 & 0x10000 | v46;
+      *v40 = ((((v37 << 24) & 0xE000000) >> 3) & 0x1000000) | ((v37 << 24) & 0xE000000) | (8 * ((v37 << 28) & 0x10000000)) | (4 * ((v37 << 28) & 0x10000000)) | (2 * ((v37 << 28) & 0x10000000)) | ((v37 << 28) & 0x10000000) | (v45 & 0x10000) | v46;
       ++v40;
       v47 = bswap32(*v33);
       v33 += 2;
       v48 = v47;
-      v49 = 8 * (v47 & 0x100000) | 4 * (v47 & 0x100000) | 2 * (v47 & 0x100000) | v47 & 0x100000 | (((v47 >> 16) & 0xE00) >> 3) & 0x100 | (v47 >> 16) & 0xE00 | 8 * ((v47 >> 12) & 0x1000) | 4 * ((v47 >> 12) & 0x1000) | 2 * ((v47 >> 12) & 0x1000) | (v47 >> 12) & 0x1000 | (((v47 >> 28) & 0xE) >> 3) | (v47 >> 28) & 0xE | 8 * ((v47 >> 24) & 0x10) | 4 * ((v47 >> 24) & 0x10) | 2 * ((v47 >> 24) & 0x10) | (v47 >> 24) & 0x10;
+      v49 = (8 * (v47 & 0x100000)) | (4 * (v47 & 0x100000)) | (2 * (v47 & 0x100000)) | (v47 & 0x100000) | ((((v47 >> 16) & 0xE00) >> 3) & 0x100) | ((v47 >> 16) & 0xE00) | (8 * ((v47 >> 12) & 0x1000)) | (4 * ((v47 >> 12) & 0x1000)) | (2 * ((v47 >> 12) & 0x1000)) | ((v47 >> 12) & 0x1000) | (((v47 >> 28) & 0xE) >> 3) | ((v47 >> 28) & 0xE) | (8 * ((v47 >> 24) & 0x10)) | (4 * ((v47 >> 24) & 0x10)) | (2 * ((v47 >> 24) & 0x10)) | ((v47 >> 24) & 0x10);
       v47 >>= 4;
       v47 &= 0xE0000u;
       v50 = v47 | v49;
       v47 >>= 3;
-      *v40 = (((v48 << 8) & 0xE000000) >> 3) & 0x1000000 | (v48 << 8) & 0xE000000 | 8 * ((v48 << 12) & 0x10000000) | 4 * ((v48 << 12) & 0x10000000) | 2 * ((v48 << 12) & 0x10000000) | (v48 << 12) & 0x10000000 | v47 & 0x10000 | v50;
+      *v40 = ((((v48 << 8) & 0xE000000) >> 3) & 0x1000000) | ((v48 << 8) & 0xE000000) | (8 * ((v48 << 12) & 0x10000000)) | (4 * ((v48 << 12) & 0x10000000)) | (2 * ((v48 << 12) & 0x10000000)) | ((v48 << 12) & 0x10000000) | (v47 & 0x10000) | v50;
       ++v40;
       v51 = 16 * (uint16_t)v48 & 0x1000;
-      v52 = ((v48 & 0xE00) >> 3) & 0x100 | v48 & 0xE00 | 8 * v51 | 4 * v51 | 2 * v51 | v51 | (((v48 >> 12) & 0xE) >> 3) | (v48 >> 12) & 0xE | 8 * ((v48 >> 8) & 0x10) | 4 * ((v48 >> 8) & 0x10) | 2 * ((v48 >> 8) & 0x10) | (v48 >> 8) & 0x10;
+      v52 = (((v48 & 0xE00) >> 3) & 0x100) | (v48 & 0xE00) | (8 * v51) | (4 * v51) | (2 * v51) | v51 | (((v48 >> 12) & 0xE) >> 3) | ((v48 >> 12) & 0xE) | (8 * ((v48 >> 8) & 0x10)) | (4 * ((v48 >> 8) & 0x10)) | (2 * ((v48 >> 8) & 0x10)) | ((v48 >> 8) & 0x10);
       v53 = v48 << 16;
-      v54 = 8 * (v53 & 0x100000) | 4 * (v53 & 0x100000) | 2 * (v53 & 0x100000) | v53 & 0x100000 | v52;
+      v54 = (8 * (v53 & 0x100000)) | (4 * (v53 & 0x100000)) | (2 * (v53 & 0x100000)) | (v53 & 0x100000) | v52;
       v55 = v48 << 12;
       v55 &= 0xE0000u;
       v56 = v55 | v54;
       v55 >>= 3;
-      *v40 = (((v48 << 24) & 0xE000000) >> 3) & 0x1000000 | (v48 << 24) & 0xE000000 | 8 * ((v48 << 28) & 0x10000000) | 4 * ((v48 << 28) & 0x10000000) | 2 * ((v48 << 28) & 0x10000000) | (v48 << 28) & 0x10000000 | v55 & 0x10000 | v56;
+      *v40 = ((((v48 << 24) & 0xE000000) >> 3) & 0x1000000) | ((v48 << 24) & 0xE000000) | (8 * ((v48 << 28) & 0x10000000)) | (4 * ((v48 << 28) & 0x10000000)) | (2 * ((v48 << 28) & 0x10000000)) | ((v48 << 28) & 0x10000000) | (v55 & 0x10000) | v56;
       v34 = v40 + 1;
       v35 = v36 - 1;
     }
       v11 = bswap32(*v6);
       v12 = v6 + 1;
       v13 = v11;
-      v14 = 16 * ((v11 >> 16) & 0xF00) | (v11 >> 16) & 0xF00 | 16 * (v11 >> 28) | (v11 >> 28);
+      v14 = (16 * ((v11 >> 16) & 0xF00)) | ((v11 >> 16) & 0xF00) | (16 * (v11 >> 28)) | (v11 >> 28);
       v11 >>= 4;
-      *v7 = 16 * ((v13 << 8) & 0xF000000) | (v13 << 8) & 0xF000000 | 16 * (v11 & 0xF0000) | v11 & 0xF0000 | v14;
+      *v7 = (16 * ((v13 << 8) & 0xF000000)) | ((v13 << 8) & 0xF000000) | (16 * (v11 & 0xF0000)) | (v11 & 0xF0000) | v14;
       v15 = v7 + 1;
       v16 = v13 << 12;
-      *v15 = 16 * ((v13 << 24) & 0xF000000) | (v13 << 24) & 0xF000000 | 16 * (v16 & 0xF0000) | v16 & 0xF0000 | 16 * (v13 & 0xF00) | v13 & 0xF00 | 16 * ((uint16_t)v13 >> 12) | ((uint16_t)v13 >> 12);
+      *v15 = (16 * ((v13 << 24) & 0xF000000)) | ((v13 << 24) & 0xF000000) | (16 * (v16 & 0xF0000)) | (v16 & 0xF0000) | (16 * (v13 & 0xF00)) | (v13 & 0xF00) | (16 * ((uint16_t)v13 >> 12)) | ((uint16_t)v13 >> 12);
       ++v15;
       v17 = bswap32(*v12);
       v6 = v12 + 1;
       v18 = v17;
-      v19 = 16 * ((v17 >> 16) & 0xF00) | (v17 >> 16) & 0xF00 | 16 * (v17 >> 28) | (v17 >> 28);
+      v19 = (16 * ((v17 >> 16) & 0xF00)) | ((v17 >> 16) & 0xF00) | (16 * (v17 >> 28)) | (v17 >> 28);
       v17 >>= 4;
-      *v15 = 16 * ((v18 << 8) & 0xF000000) | (v18 << 8) & 0xF000000 | 16 * (v17 & 0xF0000) | v17 & 0xF0000 | v19;
+      *v15 = (16 * ((v18 << 8) & 0xF000000)) | ((v18 << 8) & 0xF000000) | (16 * (v17 & 0xF0000)) | (v17 & 0xF0000) | v19;
       ++v15;
       v20 = v18 << 12;
-      *v15 = 16 * ((v18 << 24) & 0xF000000) | (v18 << 24) & 0xF000000 | 16 * (v20 & 0xF0000) | v20 & 0xF0000 | 16 * (v18 & 0xF00) | v18 & 0xF00 | 16 * ((uint16_t)v18 >> 12) | ((uint16_t)v18 >> 12);
+      *v15 = (16 * ((v18 << 24) & 0xF000000)) | ((v18 << 24) & 0xF000000) | (16 * (v20 & 0xF0000)) | (v20 & 0xF0000) | (16 * (v18 & 0xF00)) | (v18 & 0xF00) | (16 * ((uint16_t)v18 >> 12)) | ((uint16_t)v18 >> 12);
       v7 = v15 + 1;
       v9 = v10 - 1;
     }
       v24 = v23;
       v25 = bswap32(v21[1]);
       v26 = v25 >> 4;
-      *v22 = 16 * ((v25 << 8) & 0xF000000) | (v25 << 8) & 0xF000000 | 16 * (v26 & 0xF0000) | v26 & 0xF0000 | 16 * ((v25 >> 16) & 0xF00) | (v25 >> 16) & 0xF00 | 16 * (v25 >> 28) | (v25 >> 28);
+      *v22 = (16 * ((v25 << 8) & 0xF000000)) | ((v25 << 8) & 0xF000000) | (16 * (v26 & 0xF0000)) | (v26 & 0xF0000) | (16 * ((v25 >> 16) & 0xF00)) | ((v25 >> 16) & 0xF00) | (16 * (v25 >> 28)) | (v25 >> 28);
       v27 = v22 + 1;
       v28 = v25 << 12;
-      *v27 = 16 * ((v25 << 24) & 0xF000000) | (v25 << 24) & 0xF000000 | 16 * (v28 & 0xF0000) | v28 & 0xF0000 | 16 * (v25 & 0xF00) | v25 & 0xF00 | 16 * ((uint16_t)v25 >> 12) | ((uint16_t)v25 >> 12);
+      *v27 = (16 * ((v25 << 24) & 0xF000000)) | ((v25 << 24) & 0xF000000) | (16 * (v28 & 0xF0000)) | (v28 & 0xF0000) | (16 * (v25 & 0xF00)) | (v25 & 0xF00) | (16 * ((uint16_t)v25 >> 12)) | ((uint16_t)v25 >> 12);
       ++v27;
       v29 = bswap32(*v21);
       v21 += 2;
       v30 = v29;
-      v31 = 16 * ((v29 >> 16) & 0xF00) | (v29 >> 16) & 0xF00 | 16 * (v29 >> 28) | (v29 >> 28);
+      v31 = (16 * ((v29 >> 16) & 0xF00)) | ((v29 >> 16) & 0xF00) | (16 * (v29 >> 28)) | (v29 >> 28);
       v29 >>= 4;
-      *v27 = 16 * ((v30 << 8) & 0xF000000) | (v30 << 8) & 0xF000000 | 16 * (v29 & 0xF0000) | v29 & 0xF0000 | v31;
+      *v27 = (16 * ((v30 << 8) & 0xF000000)) | ((v30 << 8) & 0xF000000) | (16 * (v29 & 0xF0000)) | (v29 & 0xF0000) | v31;
       ++v27;
       v32 = v30 << 12;
-      *v27 = 16 * ((v30 << 24) & 0xF000000) | (v30 << 24) & 0xF000000 | 16 * (v32 & 0xF0000) | v32 & 0xF0000 | 16 * (v30 & 0xF00) | v30 & 0xF00 | 16 * ((uint16_t)v30 >> 12) | ((uint16_t)v30 >> 12);
+      *v27 = (16 * ((v30 << 24) & 0xF000000)) | ((v30 << 24) & 0xF000000) | (16 * (v32 & 0xF0000)) | (v32 & 0xF0000) | (16 * (v30 & 0xF00)) | (v30 & 0xF00) | (16 * ((uint16_t)v30 >> 12)) | ((uint16_t)v30 >> 12);
       v22 = v27 + 1;
       v23 = v24 - 1;
     }

File src/Glide64/TexLoad8b.h

View file
       v10 = *v6;
       v11 = (*v6 >> 4) & 0xF0F0F0F;
       v12 = v6 + 1;
-      *v7 = 16 * v10 & 0xF0F0F0F0 | v11;
+      *v7 = (16 * v10 & 0xF0F0F0F0) | v11;
       v13 = v7 + 1;
       v14 = (*v12 >> 4) & 0xF0F0F0F;
       v15 = 16 * *v12 & 0xF0F0F0F0;
     v18 = wid_64;
     do
     {
-      *v17 = 16 * v16[1] & 0xF0F0F0F0 | (v16[1] >> 4) & 0xF0F0F0F;
+      *v17 = (16 * v16[1] & 0xF0F0F0F0) | ((v16[1] >> 4) & 0xF0F0F0F);
       v19 = v17 + 1;
       v20 = *v16;
       v16 += 2;
-      *v19 = 16 * v20 & 0xF0F0F0F0 | (v20 >> 4) & 0xF0F0F0F;
+      *v19 = (16 * v20 & 0xF0F0F0F0) | ((v20 >> 4) & 0xF0F0F0F);
       v17 = v19 + 1;
       --v18;
     }

File src/Glitch64/combiner.cpp

View file
   GLubyte stip[32*4];
   for(i=0; i<32; i++)
   {
-    unsigned int val = rand() << 17 | (rand() & 1) << 16 | rand() << 1 | rand() & 1;
+    unsigned int val = (rand() << 17) | ((rand() & 1) << 16) | (rand() << 1) | (rand() & 1);
     stip[i*4+0] = (val >> 24) & 0xFF;
     stip[i*4+1] = (val >> 16) & 0xFF;
     stip[i*4+2] = (val >> 8) & 0xFF;