Changed unsigned checking so that runtime routines cab be written in C
This commit is contained in:
parent
e929b5839f
commit
81cc04f9a3
1 changed files with 9 additions and 11 deletions
|
@ -480,20 +480,20 @@ static
|
||||||
subu(sz)
|
subu(sz)
|
||||||
arith sz;
|
arith sz;
|
||||||
{
|
{
|
||||||
if (options['R']) C_sbu(sz);
|
if (! options['R']) {
|
||||||
else {
|
CAL((int) sz == (int) word_size ? "subuchk" : "subulchk", (int) sz);
|
||||||
CAL((int) sz == (int) word_size ? "subu" : "subul", (int) sz);
|
|
||||||
}
|
}
|
||||||
|
C_sbu(sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
addu(sz)
|
addu(sz)
|
||||||
arith sz;
|
arith sz;
|
||||||
{
|
{
|
||||||
if (options['R']) C_adu(sz);
|
if (! options['R']) {
|
||||||
else {
|
CAL((int) sz == (int) word_size ? "adduchk" : "addulchk", (int) sz);
|
||||||
CAL((int) sz == (int) word_size ? "addu" : "addul", (int) sz);
|
|
||||||
}
|
}
|
||||||
|
C_adu(sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
CodeStd(nd)
|
CodeStd(nd)
|
||||||
|
@ -747,13 +747,11 @@ CodeOper(expr, true_label, false_label)
|
||||||
case T_EQUAL:
|
case T_EQUAL:
|
||||||
case T_CARDINAL:
|
case T_CARDINAL:
|
||||||
case T_INTORCARD:
|
case T_INTORCARD:
|
||||||
if (options['R']) {
|
if (! options['R']) {
|
||||||
C_mlu(tp->tp_size);
|
CAL((int)(tp->tp_size) <= (int)word_size ? "muluchk" : "mululchk",
|
||||||
}
|
|
||||||
else {
|
|
||||||
CAL((int)(tp->tp_size) <= (int)word_size ? "mulu" : "mulul",
|
|
||||||
(int)(tp->tp_size));
|
(int)(tp->tp_size));
|
||||||
}
|
}
|
||||||
|
C_mlu(tp->tp_size);
|
||||||
break;
|
break;
|
||||||
case T_REAL:
|
case T_REAL:
|
||||||
C_mlf(tp->tp_size);
|
C_mlf(tp->tp_size);
|
||||||
|
|
Loading…
Reference in a new issue