From c9ece34fc59077796099d0d168c2c63de764fd1f Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 20 Feb 1991 09:54:55 +0000 Subject: [PATCH] Changed method of allocating locals --- mach/i386/ncg/mach.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mach/i386/ncg/mach.c b/mach/i386/ncg/mach.c index 63632f487..c437d6b47 100644 --- a/mach/i386/ncg/mach.c +++ b/mach/i386/ncg/mach.c @@ -60,19 +60,23 @@ string holstr(n) word n; { prolog(nlocals) full nlocals; { fputs("push ebp\nmov ebp,esp\n", codefile); + if (nlocals == 0) return; +#ifdef NOTDEF + probably not better on 386. switch(nlocals) { case 8: fputs("push eax\n", codefile); /* fall through */ case 4: fputs("push eax\n", codefile); - /* fall through */ - case 0: break; default: +#endif fprintf(codefile, "\tsub\tesp,%ld\n",nlocals); +#ifdef NOTDEF break; } +#endif } #ifdef REGVARS -- 2.34.1