SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.31
-static char sccsid[] = "@(#)local2.c 1.30 (Berkeley) %G%";
+static char sccsid[] = "@(#)local2.c 1.31 (Berkeley) %G%";
#endif
# include "pass2.h"
#endif
# include "pass2.h"
}
case 'D': /* INCR and DECR */
}
case 'D': /* INCR and DECR */
- zzzcode(p->in.left, 'U');
+ if (p->in.left->in.type == FLOAT)
+ expand(p, INAREG, "movl\tAL,A1");
+ else if (p->in.left->in.type == DOUBLE)
+ expand(p, INAREG, "ldd\tAL\n\tstd\tA1");
+ else
+ zzzcode(p->in.left, 'U');
putstr("\n ");
case 'E': /* INCR and DECR, FOREFF */
putstr("\n ");
case 'E': /* INCR and DECR, FOREFF */
return;
}
else if (p->in.left->in.type == FLOAT || p->in.left->in.type == DOUBLE) {
return;
}
else if (p->in.left->in.type == FLOAT || p->in.left->in.type == DOUBLE) {
+ if (c == 'E' || p->in.left->in.type == FLOAT)
+ expand(p, INAREG, "ldZL\tAL\n\t");
- expand(p, INAREG, "ldZL\tAL\n\taddZL\tAR\n\tstZL\tAL");
+ expand(p, INAREG, "addZL\tAR\n\tstZL\tAL");
- expand(p, INAREG, "ldZL\tAL\n\tsubZL\tAR\n\tstZL\tAL");
+ expand(p, INAREG, "subZL\tAR\n\tstZL\tAL");
return;
}
putstr(p->in.op == INCR ? "add" : "sub");
return;
}
putstr(p->in.op == INCR ? "add" : "sub");