From 3dca1be7c9062098fbafe6c2a99bbe22b1d2741a Mon Sep 17 00:00:00 2001 From: Kamila Szewczyk Date: Mon, 23 Nov 2020 10:15:17 +0100 Subject: [PATCH] bfasm optimizations: ditch ip/g --- bfasm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bfasm.c b/bfasm.c index 31929e31..13fffd0d 100644 --- a/bfasm.c +++ b/bfasm.c @@ -116,7 +116,7 @@ int main(int argc, char * argv[]) { if(vm) for (n = 0; n < sizeof(uvm); n++) m[n + 20 + sizeof(s)] = uvm[n]; else for (n = 0; n < sizeof(ubf); n++) m[n + 20 + sizeof(s)] = ubf[n]; m[6] = 0; - m[8] = 0; + m[8] = tiny * 2; m[9] = STACK; m[10] = m[9] + 2; outbf(); @@ -450,8 +450,8 @@ Lab:; m[6] = 1; outbf(); /* last */ - if(skipped_inits != 4 && tiny) { - fprintf(stderr, "*** ERROR: Skipped %d prologues; expected 4. Can't build tiny code.\n", skipped_inits); + if(skipped_inits > 6 && tiny) { + fprintf(stderr, "*** ERROR: Skipped %d prologues; more than 6. Can't build tiny code.\n", skipped_inits); return 1; }