Fix: sometimes did not reserve space for local on a mes ms_gto

This commit is contained in:
ceriel 1992-06-12 09:46:43 +00:00
parent 09a80e9e13
commit 46f084d660
2 changed files with 12 additions and 8 deletions

View file

@ -78,7 +78,7 @@ prolog(nlocals) full nlocals; {
break; break;
default: default:
#endif #endif
fprintf(codefile, "\tsub\tesp,%ld\n",nlocals); fprintf(codefile, "sub\tesp,%ld\n",nlocals);
#ifdef NOTDEF #ifdef NOTDEF
break; break;
} }
@ -112,10 +112,12 @@ i_regsave()
f_regsave() f_regsave()
{ {
if (si_off != di_off) {
if (si_off == -lbytes) lbytes -= 4; if (si_off == -lbytes) lbytes -= 4;
if (di_off == -lbytes) lbytes -= 4; if (di_off == -lbytes) lbytes -= 4;
if (si_off == -lbytes) lbytes -= 4; if (si_off == -lbytes) lbytes -= 4;
if (lbytes) fprintf(codefile, "\tsub\tesp,%ld\n",(long) lbytes); }
if (lbytes) fprintf(codefile, "sub\tesp,%ld\n",(long) lbytes);
if (firstreg == 1) { if (firstreg == 1) {
fputs("push edi\n", codefile); fputs("push edi\n", codefile);
if (si_off != -1) fputs("push esi\n", codefile); if (si_off != -1) fputs("push esi\n", codefile);

View file

@ -103,9 +103,11 @@ i_regsave()
f_regsave() f_regsave()
{ {
if (si_off != di_off) {
if (di_off == -lbytes) lbytes -= 2; if (di_off == -lbytes) lbytes -= 2;
if (si_off == -lbytes) lbytes -= 2; if (si_off == -lbytes) lbytes -= 2;
if (di_off == -lbytes) lbytes -= 2; if (di_off == -lbytes) lbytes -= 2;
}
switch (lbytes) { switch (lbytes) {
case 4: fputs("\tpush\tax\n", codefile); case 4: fputs("\tpush\tax\n", codefile);
case 2: fputs("\tpush\tax\n", codefile); case 2: fputs("\tpush\tax\n", codefile);