Fix: sometimes generated illegal register messages for parameters
This commit is contained in:
parent
a28c551213
commit
9381b34dfa
2 changed files with 5 additions and 3 deletions
|
@ -536,14 +536,14 @@ declare_formals(idf, fp)
|
||||||
parameter starts on a new word boundary.
|
parameter starts on a new word boundary.
|
||||||
*/
|
*/
|
||||||
f_offset = align(f_offset + def->df_type->tp_size, (int) word_size);
|
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
|
/* cvt int to char or short and double to float, if necessary
|
||||||
*/
|
*/
|
||||||
formal_cvt(hasproto, def);
|
formal_cvt(hasproto, def);
|
||||||
|
|
||||||
def->df_level = L_FORMAL2; /* CJ */
|
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)
|
if (nparams++ >= STDC_NPARAMS)
|
||||||
strict("number of formal parameters exceeds ANSI limit");
|
strict("number of formal parameters exceeds ANSI limit");
|
||||||
#ifdef DBSYMTAB
|
#ifdef DBSYMTAB
|
||||||
|
|
|
@ -205,6 +205,7 @@ LoadLocal(off, sz)
|
||||||
if (p) p->t_count++;
|
if (p) p->t_count++;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
if (p && p->t_size != sz) p->t_regtype = -1;
|
||||||
if (sz == word_size) C_lol(off);
|
if (sz == word_size) C_lol(off);
|
||||||
else if (sz == dword_size) C_ldl(off);
|
else if (sz == dword_size) C_ldl(off);
|
||||||
else {
|
else {
|
||||||
|
@ -224,6 +225,7 @@ StoreLocal(off, sz)
|
||||||
if (p) p->t_count++;
|
if (p) p->t_count++;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
if (p && p->t_size != sz) p->t_regtype = -1;
|
||||||
if (sz == word_size) C_stl(off);
|
if (sz == word_size) C_stl(off);
|
||||||
else if (sz == dword_size) C_sdl(off);
|
else if (sz == dword_size) C_sdl(off);
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue