From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gbymw-00013x-7J for qemu-devel@nongnu.org; Mon, 23 Oct 2006 08:20:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gbymt-0000yv-Mk for qemu-devel@nongnu.org; Mon, 23 Oct 2006 08:20:17 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gbymt-0000yU-Bb for qemu-devel@nongnu.org; Mon, 23 Oct 2006 08:20:15 -0400 Received: from [65.74.133.4] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gbymt-0001Nk-3F for qemu-devel@nongnu.org; Mon, 23 Oct 2006 08:20:15 -0400 From: Paul Brook Subject: Re: [Qemu-devel] qemu vs gcc4 Date: Mon, 23 Oct 2006 13:20:07 +0100 References: <45391B22.1050608@palmsource.com> <56d259a00610230116p33e13e32i9b82f1e8f0871f27@mail.gmail.com> In-Reply-To: <56d259a00610230116p33e13e32i9b82f1e8f0871f27@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610231320.08914.paul@codesourcery.com> 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 On Monday 23 October 2006 09:16, Martin Guy wrote: > > Now, gcc4 can produce code with several return instructions (with no > > option to turn that of, as far as I understand). You cannot cut them out, > > and therefore you cannot chain the simple functions. > > ...unless you also map return instructions within the generated > functions into branches to the soon-to-be-dropped final "return"? Not > that I know anything about qemu internals mind u... That's exactly what my gcc4 hacks do. It gets complicated because a x86 uses variable length insn encodings so you don't know where insn boundaries are, and a jmp instruction is larger than a ret instruction so it's not always possible to do a straight replacement. Paul