]> Cypherpunks repositories - gostls13.git/commitdiff
arm: fix build
authorDean Prichard <dean.prichard@gmail.com>
Sat, 27 Mar 2010 06:27:24 +0000 (23:27 -0700)
committerRuss Cox <rsc@golang.org>
Sat, 27 Mar 2010 06:27:24 +0000 (23:27 -0700)
R=rsc
CC=golang-dev
https://golang.org/cl/800041

src/cmd/5g/ggen.c
test/arm-pass.txt

index c60c05863ac90e9664523d129a2fba39edf23dd1..50c90912e06ae259500a228385ca35a4f71d5172 100644 (file)
@@ -87,10 +87,8 @@ compile(Node *fn)
 
        if(pret)
                patch(pret, pc);
-       ginit();
        if(curfn->exit)
                genlist(curfn->exit);
-       gclean();
        if(nerrors != 0)
                goto ret;
        if(hasdefer)
@@ -427,9 +425,10 @@ void
 cgen_ret(Node *n)
 {
        genlist(n->list);               // copy out args
-       if(hasdefer)
-               ginscall(deferreturn, 0);
-       gins(ARET, N, N);
+       if(hasdefer || curfn->exit)
+               gjmp(pret);
+       else
+               gins(ARET, N, N);
 }
 
 /*
index 7b1d3113352e459aca0c5f5b16022e7e7cf448df..8a101a9ec65859a05e77b6a260406fc9f4239d3b 100644 (file)
@@ -27,7 +27,6 @@ convlit1.go
 declbad.go
 empty.go
 escape.go
-escape1.go
 fixedbugs/bug000.go
 fixedbugs/bug001.go
 fixedbugs/bug002.go