Changed method of allocating locals

This commit is contained in:
ceriel 1991-02-20 09:54:55 +00:00
parent 1fec35a71e
commit c9ece34fc5

View file

@ -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