From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JQq1z-0004Z8-Le for qemu-devel@nongnu.org; Sun, 17 Feb 2008 15:22:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JQq1y-0004Ym-UX for qemu-devel@nongnu.org; Sun, 17 Feb 2008 15:22:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JQq1y-0004YU-H6 for qemu-devel@nongnu.org; Sun, 17 Feb 2008 15:22:34 -0500 Received: from hs-out-0708.google.com ([64.233.178.244]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JQq1y-0007I4-7q for qemu-devel@nongnu.org; Sun, 17 Feb 2008 15:22:34 -0500 Received: by hs-out-0708.google.com with SMTP id 55so2114489hsc.2 for ; Sun, 17 Feb 2008 12:22:33 -0800 (PST) Message-ID: Date: Sun, 17 Feb 2008 21:22:32 +0100 From: "Christian Roue" Subject: Re: [Qemu-devel] Patch for compiling with GCC 4 In-Reply-To: <200802162001.02410.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200802162001.02410.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: Paul Brook Cc: qemu-devel@nongnu.org Well, I somehow felt like it was a bit brutal and probably fixing the symptoms which is apparently the case. Looking more carefully, compile fails in : sh4-linux-user for function op_cmp_str_T0_T1 gcc optimization leads to a ret followed by a last assignement with a jump back. I guess dyngen hopes to find function epilogue as the last bytes. It's apparently the only function where it happens. I found that adding gcc option "-fno-tree-dominator-opts" for sh4 target avoids this (I suppose) unwanted optimization. It may be a bit brutal again ( disabling too many optims or wrong ones). May be the op_cmp_str_T0_T1 function can be rewritten to something that avoids this optimization. Am I on a better track ? Bye Chris. On Feb 16, 2008 9:01 PM, Paul Brook wrote: > On Saturday 16 February 2008, Christian Roue wrote: > > Hi all, > > I tried to compile qemu cvs head on my x86_64 linux with gcc 4.1.2 using > > --disable-gcc-check, I found compile fails as stated in configure before i > > disabled gcc check.. > > Error message, points to a problem of dyngen not correctly detecting > > function ends on i386 when last instruction is a jump. I applied following > > change and successfully compiled/run qemu i386. This extra test check for > > a relative backward jump to function exit ret, > > gcc 4 apparently generates a few of these. > > You patch is wrong. The dyngen error is correct. > > Paul >