From: Bill Joy Date: Fri, 17 Oct 1980 18:00:03 +0000 (-0800) Subject: Keep up with version 1.83 of jfr fixing dead reg/arg problem. X-Git-Tag: BSD-4^3~244 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/35307d3017097e3491aefcb42803d9cb29fb2065?hp=34296e984d5c5b60472ca884055bbe3ab64f7820 Keep up with version 1.83 of jfr fixing dead reg/arg problem. SCCS-vsn: old/pcc/c2.vax/c21.c 4.2 --- diff --git a/usr/src/old/pcc/c2.vax/c21.c b/usr/src/old/pcc/c2.vax/c21.c index 84633f6236..f5de6351fb 100644 --- a/usr/src/old/pcc/c2.vax/c21.c +++ b/usr/src/old/pcc/c2.vax/c21.c @@ -1,5 +1,5 @@ -static char sccsid[] = "@(#)c21.c 4.1 %G%"; -/* char C21[] = {"@(#)c21.c 1.82 - 81 ??/??/?? ??:??:?? JFR"}; /* sccs ident */ +static char sccsid[] = "@(#)c21.c 4.2 %G%"; +/* char C21[] = {"@(#)c21.c 1.83 80/10/16 21:18:22 JFR"}; /* sccs ident */ /* * C object code improver-- second part @@ -614,8 +614,9 @@ register struct node *p; || OP2==(p->subop>>4) && 0<=(r=isreg(regs[RT2])) && rop) { + case ACB: case AOBLEQ: case AOBLSS: case SOBGTR: case SOBGEQ: break; - default: if (p->op==ACB) break; + default: if (uses[r]==0) {/* no direct uses, check for use of condition codes */ register struct node *q=p; while ((q=nonlab(q->forw))->combop==JBR) q=q->ref; /* cc unused, unchanged */ @@ -644,6 +645,7 @@ register struct node *p; /* check for r */ if (lastrand!=cp1 && 0<=(r=isreg(cp1)) && rsubop; + if (p->op==ASH && preg==(regs+RT1+1)) cp2[-1]=BYTE; /* stupid DEC */ if (p->op==MOV || p->op==PUSH || p->op==CVT || p->op==MOVZ || p->op==COM || p->op==NEG) { if (p->op==PUSH) cp1="-(sp)"; else { @@ -654,7 +656,8 @@ register struct node *p; if (p->op!=MOV) cp1=0; } if (cp1) while (*cp2++= *cp1++); - } else *cp2++=0; + else *cp2=0; + } else *cp2=0; continue; } /* check for (r),(r)+,-(r),[r] */