From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CgEW9-00052c-N2 for qemu-devel@nongnu.org; Sun, 19 Dec 2004 22:47:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CgEW6-00050l-8v for qemu-devel@nongnu.org; Sun, 19 Dec 2004 22:47:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CgEW6-00050i-6A for qemu-devel@nongnu.org; Sun, 19 Dec 2004 22:47:26 -0500 Received: from [66.93.216.237] (helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CgEGw-0000Hz-UX for qemu-devel@nongnu.org; Sun, 19 Dec 2004 22:31:47 -0500 Received: from trouble.defaultvalue.org (omen.defaultvalue.org [192.168.1.1]) by defaultvalue.org (Postfix) with ESMTP id 34ABD401C for ; Sun, 19 Dec 2004 21:31:45 -0600 (CST) 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> <41C5FD0C.70506@bellard.org> From: Rob Browning Date: Sun, 19 Dec 2004 21:31:52 -0600 In-Reply-To: (Johannes Schindelin's message of "Sun, 19 Dec 2004 23:29:20 +0100 (CET)") Message-ID: <87fz21tzkn.fsf@trouble.defaultvalue.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Johannes Schindelin writes: > If you would ask me, I'd rather go for GNU Lightning, which is LGPL, > and has a clean interface. I did not yet play with it, but a friend > told me that it's quite fast, and maybe it's possible to do > something Hotspot like. The downside: Lightning only supports i386, > ppc and sparc backends AFAIK. OTOH this could lead to a synergetic > effect. It might be interesting to note that languages like Scheme have similar needs, at least when considering direct compilation. Scheme requires tail-call optimization, and so compiling Scheme functions directly to C functions using the normal C ABI won't work because the caller, rather than the callee, cleans up the stack, and tail-call optimization requires that there be no stack growth when possible. I did have a conversation with one of the gcc developers about whether or not it might be possible to make gcc more amenable to non-C-like languages, specifically with respect to tail-calls, and he was very helpful. In the end he suggested that the most likely way that the relevant changes would be accepted into gcc would be if they were done at the RTL level. So it would be possible to create a front end for a particular language that took advantage of the new RTL annotations. For similar reasons the language Mercury actually uses (or has used) what they call "The Evil Mangler" (http://www.cse.unsw.edu.au/~chak/haskell/ghc/comm/the-beast/mangler.html) which post-processes gcc's assembly. With respect to your comment about GNU Lightning, a while ago there was also a bit of experimentation with using it in Guile. In any case, I mention all of this because it suggests that there might be a non-trivial audience for a good, cross-platform method of generating code or code-fragments when your needs don't quite match the C ABI. Oh, and another possibly relevant project that was mentioned to me, but I havent investigated much yet, is C-- (http://www.cminusminus.org). -- Rob Browning rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4