From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4G3O-0006fU-IO for qemu-devel@nongnu.org; Tue, 20 Apr 2010 12:12:02 -0400 Received: from [140.186.70.92] (port=42510 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4G3M-0006dU-05 for qemu-devel@nongnu.org; Tue, 20 Apr 2010 12:12:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4G3K-0008L3-7S for qemu-devel@nongnu.org; Tue, 20 Apr 2010 12:11:59 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:48490) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4G3K-0008Kr-2f for qemu-devel@nongnu.org; Tue, 20 Apr 2010 12:11:58 -0400 Received: by pva4 with SMTP id 4so98063pva.4 for ; Tue, 20 Apr 2010 09:11:57 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 20 Apr 2010 19:11:56 +0300 Message-ID: From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Subject: [Qemu-devel] Re: sparc: potentially incorrect if dynamic npc? List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: qemu-devel On 4/20/10, Artyom Tarasenko wrote: > /* XXX: potentially incorrect if dynamic npc */ > static void do_branch > > There are few comments like this in target-sparc/translate.c . > In what case is it incorrect? > > Can do_branch functions be called with dynamic npc? Maybe, if there are two branches or jumps in a row. The last time I checked, at least for successive branches we do the correct thing. It's pretty obscure, no compiler will generate such sequences and nobody with asm skills either. Another corner case that IIRC we don't handle is where a jump instruction is at the end of the page and its delay slot instruction is at next page. I think one commit for Microblaze added support for this case.