uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit e90c716cdc0f7fb845c40d05c3f93c90f25c2fc2
parent 5675d8e65d885bd358f63aae447d65a5fcbcf796
Author: neauoire <aliceffekt@gmail.com>
Date:   Tue,  8 Aug 2023 20:00:27 -0700

Merged POP2 calls

Diffstat:
Msrc/uxn.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/uxn.c b/src/uxn.c @@ -29,8 +29,8 @@ WITH REGARD TO THIS SOFTWARE. #define POP1(o) { if(*sp == 0x00) HALT(1) o = s->dat[--*sp]; } #define POP2(o) { if((tsp = *sp) <= 0x01) HALT(1) o = PEEK2(&s->dat[tsp - 2]); *sp = tsp - 2; } #define POPx(o) { if(m2) { POP2(o) } else { POP1(o) } } -#define POP11(o, p) { if((tsp = *sp) <= 0x01) HALT(1) o = s->dat[--*sp]; p = s->dat[--*sp]; } -#define POP22(o, p) { POP2(o) POP2(p) } +#define POP11(o, p) { if(*sp <= 0x01) HALT(1) o = s->dat[--*sp]; p = s->dat[--*sp]; } +#define POP22(o, p) { if((tsp = *sp) <= 0x03) HALT(1) o = PEEK2(&s->dat[tsp - 2]); p = PEEK2(&s->dat[tsp - 4]); *sp = tsp - 4; } #define POPxx(o, p) { if(m2) { POP22(o, p) } else { POP11(o, p) } } int