Removed a bug that led to infinite looping in obscure cases.
authorceriel <none@none>
Tue, 6 Jan 1987 18:49:00 +0000 (18:49 +0000)
committerceriel <none@none>
Tue, 6 Jan 1987 18:49:00 +0000 (18:49 +0000)
mach/proto/cg/reg.c

index 4482dce..bc94e89 100644 (file)
@@ -71,6 +71,12 @@ getrefcount(regno) {
 
 erasereg(regno) {
        register struct reginfo *rp;
+       register int i;
+
+       rp = &machregs[regno];
+       rp->r_contents.t_token = 0;
+       for (i=0;i<TOKENSIZE;i++)
+               rp->r_contents.t_att[i].aw = 0;
 
 #if MAXMEMBERS==0
        awayreg(regno);
@@ -86,11 +92,6 @@ awayreg(regno) {
        register tkdef_p tdp;
        register i;
 
-       rp = &machregs[regno];
-       rp->r_contents.t_token = 0;
-       for (i=0;i<TOKENSIZE;i++)
-               rp->r_contents.t_att[i].aw = 0;
-
        /* Now erase recursively all registers containing
         * something using this one
         */