]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/5g, cmd/8g: fix build
authorRuss Cox <rsc@golang.org>
Fri, 14 Feb 2014 03:30:35 +0000 (22:30 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 14 Feb 2014 03:30:35 +0000 (22:30 -0500)
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

src/cmd/5g/ggen.c
src/cmd/8g/ggen.c

index 16aef3d1a582ba940afca8688463ff4a79bcc9bd..ebf2391f5aa068a9be0f7e2d73f3dd1704119afe 100644 (file)
@@ -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
 
index c0d25013feb321422c44dfc58f7ded0a5b352a3c..2ea92980c13639aeb26a4c183988259fdddee26f 100644 (file)
@@ -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