Changed method of allocating locals
This commit is contained in:
parent
186fc17584
commit
1f52c5054b
@ -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…
x
Reference in New Issue
Block a user