Fix: sometimes generated illegal register messages for parameters

This commit is contained in:
ceriel 1991-10-02 12:00:05 +00:00
parent a28c551213
commit 9381b34dfa
2 changed files with 5 additions and 3 deletions

View file

@ -536,14 +536,14 @@ declare_formals(idf, fp)
parameter starts on a new word boundary.
*/
f_offset = align(f_offset + def->df_type->tp_size, (int) word_size);
RegisterAccount(def->df_address, def->df_type->tp_size,
regtype(def->df_type),
def->df_sc);
/* cvt int to char or short and double to float, if necessary
*/
formal_cvt(hasproto, def);
def->df_level = L_FORMAL2; /* CJ */
RegisterAccount(def->df_address, def->df_type->tp_size,
regtype(def->df_type),
def->df_sc);
if (nparams++ >= STDC_NPARAMS)
strict("number of formal parameters exceeds ANSI limit");
#ifdef DBSYMTAB

View file

@ -205,6 +205,7 @@ LoadLocal(off, sz)
if (p) p->t_count++;
#endif
#endif
if (p && p->t_size != sz) p->t_regtype = -1;
if (sz == word_size) C_lol(off);
else if (sz == dword_size) C_ldl(off);
else {
@ -224,6 +225,7 @@ StoreLocal(off, sz)
if (p) p->t_count++;
#endif
#endif
if (p && p->t_size != sz) p->t_regtype = -1;
if (sz == word_size) C_stl(off);
else if (sz == dword_size) C_sdl(off);
else {