]> Cypherpunks repositories - gostls13.git/commitdiff
6g, 8g: fix goto fix
authorRuss Cox <rsc@golang.org>
Thu, 16 Jun 2011 05:25:49 +0000 (01:25 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 16 Jun 2011 05:25:49 +0000 (01:25 -0400)
R=ken2
CC=golang-dev
https://golang.org/cl/4632041

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);