From 55b145e32ac948d90c46ba1f8bf59cb09b8fcd6c Mon Sep 17 00:00:00 2001 From: Dean Prichard Date: Fri, 26 Mar 2010 23:27:24 -0700 Subject: [PATCH] arm: fix build R=rsc CC=golang-dev https://golang.org/cl/800041 --- src/cmd/5g/ggen.c | 9 ++++----- test/arm-pass.txt | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/cmd/5g/ggen.c b/src/cmd/5g/ggen.c index c60c05863ac..50c90912e06 100644 --- a/src/cmd/5g/ggen.c +++ b/src/cmd/5g/ggen.c @@ -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); } /* diff --git a/test/arm-pass.txt b/test/arm-pass.txt index 7b1d3113352..8a101a9ec65 100644 --- a/test/arm-pass.txt +++ b/test/arm-pass.txt @@ -27,7 +27,6 @@ convlit1.go declbad.go empty.go escape.go -escape1.go fixedbugs/bug000.go fixedbugs/bug001.go fixedbugs/bug002.go