summaryrefslogtreecommitdiff
path: root/sux.h
diff options
context:
space:
mode:
Diffstat (limited to 'sux.h')
-rw-r--r--sux.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sux.h b/sux.h
index b344913..efda8f0 100644
--- a/sux.h
+++ b/sux.h
@@ -1792,9 +1792,13 @@ static /*inline*/ void exec_base_inst(struct sux *cpu, uint8_t opcode, uint8_t p
const uint32_t mask[9] = {w0, w1, w2, w3, w4, w5, w6, w7, w8}; \
if (mask[o8] & o8m) { code } \
} while (0);
-#else
+#elif 0
#define t(w8, w7, w6, w5, w4, w3, w2, w1, w0) \
if ((const uint32_t [9]){w0, w1, w2, w3, w4, w5, w6, w7, w8}[o8] & o8m)
+#else
+#define t(w8, w7, w6, w5, w4, w3, w2, w1, w0) \
+ if ((o8<1?w0 : o8<2?w1 : o8<3?w2 : o8<4?w3 : \
+ o8<5?w4 : o8<6?w5 : o8<7?w6 : o8<8?w7 : w8) & o8m)
#endif
#define inst(op, ext) \