From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15576 invoked by alias); 14 Apr 2005 19:13:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15555 invoked from network); 14 Apr 2005 19:13:27 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 14 Apr 2005 19:13:27 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DM9mJ-0004u1-5w; Thu, 14 Apr 2005 15:13:27 -0400 Date: Thu, 14 Apr 2005 19:13:00 -0000 From: Daniel Jacobowitz To: Jonathan Larmour Cc: gdb-patches@sources.redhat.com Subject: Re: SH simulator build fix Message-ID: <20050414191327.GE26377@nevyn.them.org> Mail-Followup-To: Jonathan Larmour , gdb-patches@sources.redhat.com References: <425C1BD6.6020105@eCosCentric.com> <20050412191039.GA10613@nevyn.them.org> <425C4290.4020900@eCosCentric.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <425C4290.4020900@eCosCentric.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00134.txt.bz2 On Tue, Apr 12, 2005 at 10:50:08PM +0100, Jonathan Larmour wrote: > Daniel Jacobowitz wrote: > >On Tue, Apr 12, 2005 at 08:04:54PM +0100, Jonathan Larmour wrote: > > > >>The SH simulator doesn't build on slightly older GCC. gencode.c relies on > >>the C99 ability (like C++) to define variables after code in a function. > >>So for example it would generate source code in code.c like: > >> > >> case 37: > >> { > >> { > >> RAISE_EXCEPTION_IF_IN_DELAY_SLOT (); > >> int i; > >> > >>where RAISE_EXCEPTION_IF_IN_DELAY_SLOT is: > >>#define RAISE_EXCEPTION_IF_IN_DELAY_SLOT() \ > >> if (in_delay_slot) RAISE_EXCEPTION (SIGILL) > >> > >> > >>Fortunately the fix is trivial, and attached! > >> > >>2005-04-12 Jonathan Larmour > >> > >> * gencode.c (tab): Avoid inserting code before variables all > >> declared. > >> > >>I have CVS write access to src, so I can do the check-in assuming that's > >>easier. > > > > > >Sure looks like an obvious fix to me; please go ahead, assuming that > >you have tested the resulting simulator. > > For a build failure? > > I'm not in a position to test the simulator sorry. I don't have tools that > can generate code that can run in it. To be honest, the build failure was > only affecting me by getting in the way of a GDB build. Well, the patch does look correct after a closer reading, and the resulting simulator builds where the old one didn't. Please go ahead and check this in. -- Daniel Jacobowitz CodeSourcery, LLC