From: Russ Cox Date: Fri, 14 Feb 2014 03:30:35 +0000 (-0500) Subject: cmd/5g, cmd/8g: fix build X-Git-Tag: go1.3beta1~706 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7addda685d9f624479cd2248a86a16b5a810f225;p=gostls13.git cmd/5g, cmd/8g: fix build The test added in CL 63630043 fails on 5g and 8g because they were not emitting the VARDEF instruction when clearing a fat value by clearing the components. 6g had the call in the right place. Hooray tests. TBR=iant CC=golang-codereviews https://golang.org/cl/63660043 --- diff --git a/src/cmd/5g/ggen.c b/src/cmd/5g/ggen.c index 16aef3d1a5..ebf2391f5a 100644 --- a/src/cmd/5g/ggen.c +++ b/src/cmd/5g/ggen.c @@ -766,14 +766,13 @@ clearfat(Node *nl) if(debug['g']) dump("\nclearfat", nl); + gvardef(nl); w = nl->type->width; // Avoid taking the address for simple enough types. if(componentgen(N, nl)) return; - gvardef(nl); - c = w % 4; // bytes q = w / 4; // quads diff --git a/src/cmd/8g/ggen.c b/src/cmd/8g/ggen.c index c0d25013fe..2ea92980c1 100644 --- a/src/cmd/8g/ggen.c +++ b/src/cmd/8g/ggen.c @@ -73,13 +73,13 @@ clearfat(Node *nl) if(debug['g']) dump("\nclearfat", nl); + gvardef(nl); + w = nl->type->width; // Avoid taking the address for simple enough types. if(componentgen(N, nl)) return; - gvardef(nl); - c = w % 4; // bytes q = w / 4; // quads