]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.r58] 6g, 8g: fix goto fix
authorAndrew Gerrand <adg@golang.org>
Wed, 29 Jun 2011 05:33:16 +0000 (15:33 +1000)
committerAndrew Gerrand <adg@golang.org>
Wed, 29 Jun 2011 05:33:16 +0000 (15:33 +1000)
««« CL 4632041 / cbc2b570b2ca
6g, 8g: fix goto fix

R=ken2
CC=golang-dev
https://golang.org/cl/4632041
»»»

R=rsc
CC=golang-dev
https://golang.org/cl/4667046

src/cmd/6g/gsubr.c
src/cmd/8g/gsubr.c

index 66dac11859b5acd0841877a1e389846e774304d7..49d66e0833d55044b8d1e3f1ffcbc40d2efa5e8a 100644 (file)
@@ -125,7 +125,7 @@ clearstk(void)
 {
        Plist *pl;
        Prog *p1, *p2;
-       Node sp, di, cx, con;
+       Node sp, di, cx, con, ax;
 
        if((uint32)plast->firstpc->to.offset <= 0)
                return;
@@ -147,6 +147,9 @@ clearstk(void)
        gins(ACLD, N, N);
        gins(AMOVQ, &sp, &di);
        gins(AMOVQ, &con, &cx);
+       nodconst(&con, types[TUINT64], 0);
+       nodreg(&ax, types[TUINT64], D_AX);
+       gins(AMOVQ, &con, &ax);
        gins(AREP, N, N);
        gins(ASTOSQ, N, N);
 
index d0c7310251b88908efb2eaf3fa9657e3522978b3..a8d65cf22fbb7a8428c9fa00fd8bfcf3915e4092 100644 (file)
@@ -127,7 +127,7 @@ clearstk(void)
 {
        Plist *pl;
        Prog *p1, *p2;
-       Node sp, di, cx, con;
+       Node sp, di, cx, con, ax;
 
        if(plast->firstpc->to.offset <= 0)
                return;
@@ -149,6 +149,9 @@ clearstk(void)
        gins(ACLD, N, N);
        gins(AMOVL, &sp, &di);
        gins(AMOVL, &con, &cx);
+       nodconst(&con, types[TUINT32], 0);
+       nodreg(&ax, types[TUINT32], D_AX);
+       gins(AMOVL, &con, &ax);
        gins(AREP, N, N);
        gins(ASTOSL, N, N);