]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.power64] 5g: fix etype and width of itable Addrs
authorAustin Clements <austin@google.com>
Thu, 6 Nov 2014 20:35:53 +0000 (15:35 -0500)
committerAustin Clements <austin@google.com>
Thu, 6 Nov 2014 20:35:53 +0000 (15:35 -0500)
For OITAB nodes, 5g's naddr was setting the wrong etype and
failing to set the width of the resulting Addr.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/171220043

src/cmd/5g/gsubr.c

index 06e274e14da4e61cd0e7bf6346d867b3622a7c38..f09197963ca3e0215241520b8b9e7e98d059ce31 100644 (file)
@@ -1353,9 +1353,10 @@ naddr(Node *n, Addr *a, int canemitcode)
        case OITAB:
                // itable of interface value
                naddr(n->left, a, canemitcode);
-               a->etype = TINT32;
+               a->etype = simtype[tptr];
                if(a->type == D_CONST && a->offset == 0)
                        break;  // len(nil)
+               a->width = widthptr;
                break;
 
        case OSPTR: