]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/6c: fix probable code gen bug
authorRuss Cox <rsc@golang.org>
Tue, 10 Apr 2012 16:51:36 +0000 (12:51 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 10 Apr 2012 16:51:36 +0000 (12:51 -0400)
This is a pointer being copied; MOVL can't possibly be right.

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

src/cmd/6c/cgen.c

index 71822586c4c7ba06d3a04567652f2f6336898ea5..1fe0156c64b59a46d8a27b2adcc8f5c98826d4c2 100644 (file)
@@ -1672,7 +1672,7 @@ copy:
                regsalloc(&nod2, nn);
                nn->type = t;
 
-               gins(AMOVL, &nod1, &nod2);
+               gins(AMOVQ, &nod1, &nod2);
                regfree(&nod1);
 
                nod2.type = typ(TIND, t);