Changed method of allocating locals
This commit is contained in:
parent
1fec35a71e
commit
c9ece34fc5
1 changed files with 6 additions and 2 deletions
|
@ -60,19 +60,23 @@ string holstr(n) word n; {
|
||||||
prolog(nlocals) full nlocals; {
|
prolog(nlocals) full nlocals; {
|
||||||
|
|
||||||
fputs("push ebp\nmov ebp,esp\n", codefile);
|
fputs("push ebp\nmov ebp,esp\n", codefile);
|
||||||
|
if (nlocals == 0) return;
|
||||||
|
#ifdef NOTDEF
|
||||||
|
probably not better on 386.
|
||||||
switch(nlocals) {
|
switch(nlocals) {
|
||||||
case 8:
|
case 8:
|
||||||
fputs("push eax\n", codefile);
|
fputs("push eax\n", codefile);
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case 4:
|
case 4:
|
||||||
fputs("push eax\n", codefile);
|
fputs("push eax\n", codefile);
|
||||||
/* fall through */
|
|
||||||
case 0:
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
#endif
|
||||||
fprintf(codefile, "\tsub\tesp,%ld\n",nlocals);
|
fprintf(codefile, "\tsub\tesp,%ld\n",nlocals);
|
||||||
|
#ifdef NOTDEF
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REGVARS
|
#ifdef REGVARS
|
||||||
|
|
Loading…
Reference in a new issue