]> Cypherpunks repositories - gostls13.git/commitdiff
8g: fix out of register bug in byte(x) code
authorRuss Cox <rsc@golang.org>
Fri, 26 Feb 2010 22:21:52 +0000 (14:21 -0800)
committerRuss Cox <rsc@golang.org>
Fri, 26 Feb 2010 22:21:52 +0000 (14:21 -0800)
R=ken2
CC=golang-dev
https://golang.org/cl/223070

src/cmd/8g/cgen.c

index f932f991854f3f21cc329a429076e8246d1edaf2..1185ee49f8e826f867f574b0bc86e4c1ac85f9fd 100644 (file)
@@ -215,14 +215,9 @@ cgen(Node *n, Node *res)
                        break;
                }
                mgen(nl, &n1, res);
-               if(n->type->width > widthptr)
-                       tempname(&n2, n->type);
-               else
-                       regalloc(&n2, n->type, res);
+               tempname(&n2, n->type);
                gmove(&n1, &n2);
                gmove(&n2, res);
-               if(n2.op == OREGISTER)
-                       regfree(&n2);
                mfree(&n1);
                break;