commit 693c7c9

Devine Lu Linvega  ·  2026-01-21 19:37:15 +0000 UTC
parent f31e080
Removed warning
1 files changed,  +8, -9
+8, -9
 1@@ -1031,11 +1031,16 @@ emu_deo(const Uint8 port, const Uint8 value)
 2 
 3 /* clang-format off */
 4 
 5+#define OPC(opc, A, B) {\
 6+	case 0x00|opc:case 0x40|opc:{const int d=0;A B} goto step;\
 7+	case 0x20|opc:case 0x60|opc:{const int d=1;A B} goto step;\
 8+	case 0x80|opc:case 0xc0|opc:{const int d=0,k=*p;A *p=k;B} goto step;\
 9+	case 0xa0|opc:case 0xe0|opc:{const int d=1,k=*p;A *p=k;B} goto step;}
10 #define REM *p -= 1 + d;
11 #define DEC s[--(*p)]
12 #define INC s[(*p)++]
13 #define FLIP { s = stk[!r], p = &ptr[!r]; }
14-#define MOVE { if(d) pc = a; else pc += (signed char)a; }
15+#define MOVE { pc = d ? a : pc + (signed char)a; }
16 #define JUMP(x) { c = ram[pc] << 8, c |= ram[pc + 1]; pc += x + 2; }
17 #define DROP(o,m) { o = DEC; if(m) o |= DEC << 8; }
18 #define GRAB(o) if(d) o[1] = DEC; o[0] = DEC;
19@@ -1046,12 +1051,6 @@ emu_deo(const Uint8 port, const Uint8 value)
20 #define POKE(o,r,m) ram[o] = r[0]; if(d) ram[(o + 1) & m] = r[1];
21 #define PEEK(i,r,m) r[0] = ram[i]; if(d) r[1] = ram[(i + 1) & m];
22 
23-#define OPC(opc, A, B) {\
24-case 0x00|opc:case 0x40|opc:{const int d=0;A B} goto step;\
25-case 0x20|opc:case 0x60|opc:{const int d=1;A B} goto step;\
26-case 0x80|opc:case 0xc0|opc:{const int d=0;int k=*p; A *p=k;B} goto step;\
27-case 0xa0|opc:case 0xe0|opc:{const int d=1;int k=*p; A *p=k;B} goto step;}
28-
29 static unsigned
30 uxn_eval(Uint16 pc)
31 {
32@@ -1063,9 +1062,9 @@ step: {
33 	/* JCI */ case 0x20:if(DEC) JUMP(c) else pc += 2; goto step;
34 	/* JMI */ case 0x40:JUMP(c) goto step;
35 	/* JSI */ case 0x60:JUMP(0) INC = pc >> 8; INC = pc; pc += c; goto step;
36-	/* LI2 */ case 0xa0:INC = ram[pc++];
37+	/* LI2 */ case 0xa0:INC = ram[pc++]; /* Fall-through */
38 	/* LIT */ case 0x80:INC = ram[pc++]; goto step;
39-	/* L2r */ case 0xe0:INC = ram[pc++];
40+	/* L2r */ case 0xe0:INC = ram[pc++]; /* Fall-through */
41 	/* LIr */ case 0xc0:INC = ram[pc++]; goto step;
42 	/* INC */ OPC(0x01,DROP(a,d),PUSH(a + 1,d))
43 	/* POP */ OPC(0x02,REM,(void)s;)