From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRXtH-00049A-8b for qemu-devel@nongnu.org; Tue, 19 Feb 2008 14:12:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRXtF-00048c-VL for qemu-devel@nongnu.org; Tue, 19 Feb 2008 14:12:30 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRXtF-00048V-IH for qemu-devel@nongnu.org; Tue, 19 Feb 2008 14:12:29 -0500 Received: from gv-out-0910.google.com ([216.239.58.185]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRXtF-0000OC-9D for qemu-devel@nongnu.org; Tue, 19 Feb 2008 14:12:29 -0500 Received: by gv-out-0910.google.com with SMTP id n40so279810gve.36 for ; Tue, 19 Feb 2008 11:12:27 -0800 (PST) Message-ID: Date: Tue, 19 Feb 2008 20:12:26 +0100 From: "Christian Roue" Subject: Re: [Qemu-devel] Patch for compiling with GCC 4 In-Reply-To: <20080218204926.GE4747@networkno.de> 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> <2151CED4-02CD-4928-978A-6C63A734F19F@csgraf.de> <20080218204926.GE4747@networkno.de> 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 Thanks Thiemo. I'll look at TCG, some more doc reading ahead apparently. Bye Chris On Feb 18, 2008 9:49 PM, Thiemo Seufer wrote: > Alexander Graf wrote: > > > > On Feb 17, 2008, at 9:22 PM, Christian Roue wrote: > > > >> 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 ? > > > > This looks like the right approach to the symptoms. The "real fix" would > > be to move the sh4 target to TCG, > > The migration to tcg can be done gradually, fixing the immediate problem > shouldn't get too involved. > > > but for the meantime I believe this is > > the way to go. You can already find a lot of these unoptimization flags > > autodetected in the configure script, so I guess that'd be the right > > place for a patch. > > I added those as workarounds, they should rather go away than expand to > cover even more flags. > > > Thiemo > > >