From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cg9T1-0006cp-97 for qemu-devel@nongnu.org; Sun, 19 Dec 2004 17:23:55 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cg9Sz-0006cH-KE for qemu-devel@nongnu.org; Sun, 19 Dec 2004 17:23:53 -0500 Received: from [129.104.30.34] (helo=mx1.polytechnique.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cg9IW-00034H-6c for qemu-devel@nongnu.org; Sun, 19 Dec 2004 17:13:04 -0500 Received: from localhost (localhost [127.0.0.1]) by djali.polytechnique.org (Postfix) with ESMTP id 68245331BC for ; Sun, 19 Dec 2004 23:13:00 +0100 (CET) Received: from djali.polytechnique.org ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10411-07 for ; Sun, 19 Dec 2004 23:13:00 +0100 (CET) Received: from [84.99.204.141] (unknown [84.99.204.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTP id 31F353319D for ; Sun, 19 Dec 2004 23:13:00 +0100 (CET) Message-ID: <41C5FD0C.70506@bellard.org> Date: Sun, 19 Dec 2004 23:13:32 +0100 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] get_func() hangs with gcc 3.4.2 on MinGW and WinXP host References: <20041215134754.GA28410@100tka.net> <20041215145903.GA29957@100tka.net> <20041215234503.GA12778@jbrown.mylinuxbox.org> <20041217195627.A38776@saturn.kn-bremen.de> In-Reply-To: <20041217195627.A38776@saturn.kn-bremen.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Juergen Lock wrote: > On Thu, Dec 16, 2004 at 01:37:53AM +0000, Johannes Schindelin wrote: > >>Hi, >> >>On Wed, 15 Dec 2004, Jim C. Brown wrote: >> >> >>>This is due to a change in the way gcc compiles code ... 3.4.0 may work, >>>but later versions will cause functions to return prematurely (due to the way >>>qemu handles translated blocks). I suggested that a fix for this would be to >>>use function pointer calls instead of directly chaining machine code, but >>>apparently this is too slow to make qemu usable. >> >>The Forth way ;-) >>... > > > How about instead post-processing the .s, replacing the rets with jumps > to the end of the function? Of course this part would be architecture > dependant (different assembler syntax), but other parts of qemu > are that as well, right? I don't exclude the possibility of using a hand coded code generator. It should be possible to do the transition progressively. The first candidates could be the code to handle memory access, constant stores and helper calls. Fabrice.