case Arrsel:
case Arrow:
case Def:
- CodeDAddress(left);
+ CodeDAddress(left, IsVarParam(param));
break;
default:{
arith tmp, TmpSpace();
return;
}
if (IsVarParam(param)) {
- CodeDAddress(left);
+ CodeDAddress(left, 1);
return;
}
if (left_type->tp_fund == T_STRING) {
if (options['R']) C_sbu(sz);
else {
C_cal(sz == word_size ? "subu" : "subul");
- C_asp(sz);
+ c_asp((int)sz);
}
}
if (options['R']) C_adu(sz);
else {
C_cal(sz == word_size ? "addu" : "addul");
- C_asp(sz);
+ c_asp((int)sz);
}
}
if (tp->tp_size == float_size) C_cal("absf");
else C_cal("absd");
}
- C_asp(tp->tp_size);
+ c_asp((int)(tp->tp_size));
C_lfr(tp->tp_size);
break;
break;
case S_ADR:
- CodeDAddress(left);
+ CodeDAddress(left, 1);
break;
case S_DEC:
C_cal(tp->tp_size <= word_size ?
"mulu" :
"mulul");
- C_asp(tp->tp_size);
+ c_asp((int)(tp->tp_size));
}
break;
case T_REAL:
if (expr->nd_symb == GREATEREQUAL) {
/* A >= B is the same as A equals A + B
*/
- C_dup(2*tp->tp_size);
+ C_dup(tp->tp_size << 1);
C_asp(tp->tp_size);
C_ior(tp->tp_size);
expr->nd_symb = '=';
else C_loc((arith) (eltype->enm_ncst - 1));
Operands(nd);
C_cal("LtoUset"); /* library routine to fill set */
- C_asp(5 * word_size);
+ c_asp(5 * (int)word_size);
}
else {
CodePExpr(nd);
free_desig(designator);
}
-CodeDAddress(nd)
+CodeDAddress(nd, chk_controlvar)
t_node *nd;
{
/* Generate code to push the address of the designator "nd"
*/
register t_desig *designator = new_desig();
+ int chkptr;
- /* ChkForFOR(nd); ??? not quite: wrong for value conformant arrays,
- where the parameter is the for-loop control variable
- */
+ if (chk_controlvar) ChkForFOR(nd);
CodeDesig(nd, designator);
+ chkptr = designator->dsg_kind==DSG_PLOADED ||
+ designator->dsg_kind==DSG_PFIXED;
CodeAddress(designator);
+
+ /* Generate dummy use of pointer, to get possible error message
+ as soon as possible
+ */
+ if (chkptr && ! options['R']) {
+ C_dup(pointer_size);
+ C_loi((arith) 1);
+ c_asp((int)word_size);
+ }
free_desig(designator);
}
{
C_lae_dlb(l, (arith) 0);
}
+
+c_asp(n)
+{
+ C_asp((arith) n);
+}
#endif
CodeAddress(ds);
CodeConst(tp->tp_size, (int) pointer_size);
C_cal("load");
- C_asp(pointer_size + pointer_size);
+ c_asp((int)pointer_size + (int)pointer_size);
break;
}
break;
C_loc(rtp->tp_size);
C_loc(tp->tp_size);
C_cal("StringAssign");
- C_asp(pointer_size + pointer_size + dword_size);
+ c_asp((int)pointer_size + (int)pointer_size + (int)dword_size);
break;
}
CodeStore(lhs, tp);
case USE_LOI_STI:
CodeConst(tp->tp_size, (int) pointer_size);
C_cal("blockmove");
- C_asp(3 * pointer_size);
+ c_asp(3 * (int)pointer_size);
break;
}
break;
tmpprio = NewInt();
C_loc(priority->nd_INT);
C_cal("stackprio");
- C_asp(word_size);
+ c_asp((int)word_size);
C_lfr(word_size);
C_stl(tmpprio);
}
if (priority) {
C_lol(tmpprio);
C_cal("unstackprio");
- C_asp(word_size);
+ c_asp((int)word_size);
FreeInt(tmpprio);
}
}
/* First compute new stackpointer */
C_lal(param->par_def->var_off);
C_cal("new_stackptr");
- C_asp(pointer_size);
+ c_asp((int)pointer_size);
C_lfr(pointer_size);
C_str((arith) 1);
/* adjusted stack pointer */
/* push source address */
C_cal("copy_array");
/* copy */
- C_asp(pointer_size);
+ c_asp((int)pointer_size);
}
}
}
if (df->df_kind == D_MODULE) {
C_lxl((arith) 0);
C_cal(df->mod_vis->sc_scope->sc_name);
- C_asp(pointer_size);
+ c_asp((int)pointer_size);
}
}