]> Cypherpunks repositories - gostls13.git/commitdiff
5g, 5l: fix more set but not used warnings
authorAnthony Martin <ality@pbrane.org>
Mon, 20 Jun 2011 18:18:04 +0000 (14:18 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 20 Jun 2011 18:18:04 +0000 (14:18 -0400)
These are present when building with gcc 4.6.

R=golang-dev, dave
CC=golang-dev, lvd
https://golang.org/cl/4636047

src/cmd/5g/reg.c
src/cmd/5l/noop.c

index a4c61e4808098aec41577ce89a881b4f9c2fc27c..77d0a87eb596421caa24bf59404ed2182cd8972f 100644 (file)
@@ -1556,27 +1556,27 @@ dumpone(Reg *r)
                        r->regdiff.b[z] |
                        r->act.b[z] |
                                0;
-//     if(bany(&bit)) {
-//             print("\t");
-//             if(bany(&r->set))
-//                     print(" s:%Q", r->set);
-//             if(bany(&r->use1))
-//                     print(" u1:%Q", r->use1);
-//             if(bany(&r->use2))
-//                     print(" u2:%Q", r->use2);
-//             if(bany(&r->refbehind))
-//                     print(" rb:%Q ", r->refbehind);
-//             if(bany(&r->refahead))
-//                     print(" ra:%Q ", r->refahead);
-//             if(bany(&r->calbehind))
-//                     print("cb:%Q ", r->calbehind);
-//             if(bany(&r->calahead))
-//                     print(" ca:%Q ", r->calahead);
-//             if(bany(&r->regdiff))
-//                     print(" d:%Q ", r->regdiff);
-//             if(bany(&r->act))
-//                     print(" a:%Q ", r->act);
-//     }
+       if(bany(&bit)) {
+               print("\t");
+               if(bany(&r->set))
+                       print(" s:%Q", r->set);
+               if(bany(&r->use1))
+                       print(" u1:%Q", r->use1);
+               if(bany(&r->use2))
+                       print(" u2:%Q", r->use2);
+               if(bany(&r->refbehind))
+                       print(" rb:%Q ", r->refbehind);
+               if(bany(&r->refahead))
+                       print(" ra:%Q ", r->refahead);
+               if(bany(&r->calbehind))
+                       print("cb:%Q ", r->calbehind);
+               if(bany(&r->calahead))
+                       print(" ca:%Q ", r->calahead);
+               if(bany(&r->regdiff))
+                       print(" d:%Q ", r->regdiff);
+               if(bany(&r->act))
+                       print(" a:%Q ", r->act);
+       }
        print("\n");
 }
 
index e7c2db5f2e3f22fa86f7c824072c77281b470d31..eb44344f4251e8383340b4388a40a2ef04fb4de4 100644 (file)
@@ -45,8 +45,6 @@ static        Sym*    sym_divu;
 static Sym*    sym_mod;
 static Sym*    sym_modu;
 
-static void setdiv(int);
-
 void
 noops(void)
 {
@@ -93,7 +91,6 @@ noops(void)
                                if(prog_div == P)
                                        initdiv();
                                cursym->text->mark &= ~LEAF;
-                               setdiv(p->as);
                                continue;
        
                        case ANOP:
@@ -533,27 +530,6 @@ initdiv(void)
        }
 }
 
-static void
-setdiv(int as)
-{
-       Prog *p = nil;
-
-       switch(as){
-       case ADIV:
-               p = prog_div;
-               break;
-       case ADIVU:
-               p = prog_divu;
-               break;
-       case AMOD:
-               p = prog_mod;
-               break;
-       case AMODU:
-               p = prog_modu;
-               break;
-       }
-}
-
 void
 nocache(Prog *p)
 {