aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-11-06 15:35:53 -0500
committerAustin Clements <austin@google.com>2014-11-06 15:35:53 -0500
commite156f0e9971ca77ed6f9cb34e36ed73145bfa177 (patch)
tree24db7bba8636023674d8b2da948c45894cf14feb
parent22c929f538483a02707b2caef91a1d3b55a72ef5 (diff)
downloadgo-e156f0e9971ca77ed6f9cb34e36ed73145bfa177.tar.gz
go-e156f0e9971ca77ed6f9cb34e36ed73145bfa177.zip
[dev.power64] 5g: fix etype and width of itable Addrs
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
-rw-r--r--src/cmd/5g/gsubr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/5g/gsubr.c b/src/cmd/5g/gsubr.c
index 06e274e14d..f09197963c 100644
--- a/src/cmd/5g/gsubr.c
+++ b/src/cmd/5g/gsubr.c
@@ -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: