From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3716 invoked by alias); 30 Apr 2013 10:47:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 3705 invoked by uid 89); 30 Apr 2013 10:47:12 -0000 X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 30 Apr 2013 10:47:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BC9BF2EA23; Tue, 30 Apr 2013 06:47:07 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id b0fwfIElKGXf; Tue, 30 Apr 2013 06:47:07 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 00B712EC9F; Tue, 30 Apr 2013 06:47:06 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4915DC2AFB; Tue, 30 Apr 2013 03:47:01 -0700 (PDT) Date: Tue, 30 Apr 2013 12:02:00 -0000 From: Joel Brobecker To: "Abid, Hafiz" Cc: vapier@gentoo.org, gdb-patches@sourceware.org Subject: Re: [patch, sim] Add isel instruction Message-ID: <20130430104701.GA16143@adacore.com> References: <1366391706.7941.1@abidh-ubunto1104> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1366391706.7941.1@abidh-ubunto1104> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-04/txt/msg00896.txt.bz2 Abid, > This patch adds support for isel instruction in the ppc simulator. > Tested manually by running a small assembly file through the > simulator. Is this ok? > > Regards, > Abid > > sim/ChangeLog: > 2013-04-19 Nathan Froyd > > * ppc-instructions (isel): New instruction. This patch causes the sim build to fail when configured with --enable-sim-float=spe. The full configure command-line used was: % configure --disable-nls --disable-tui --without-zlib --prefix=/[...]/install --enable-sim --enable-sim-float=spe --without-python --with-libexpat-prefix=/[...]/libexpat --target=powerpc-eabispe The error I get is: | ./igen -E -F 32,f,o,e500 -CSRI 1024 -N 5 \ | [...] | expanding ... | -n icache.h | -h | -c tmp-icache.h | gen-icache.c:66: assertion failed - entry->nr_insn == 1 | make: *** [tmp-igen] Error 1 I am not familiar with this part of the code, so can you please fix or revert? Interestingly, no problem with --enable-sim-float=altivec. Thank you. > > diff --git a/sim/ppc/ppc-instructions b/sim/ppc/ppc-instructions > index 1b8fd89..d76a765 100644 > --- a/sim/ppc/ppc-instructions > +++ b/sim/ppc/ppc-instructions > @@ -3455,6 +3455,19 @@ > void::function::invalid_zero_divide_operation:cpu *processor, > unsigned_word cia, > PPC_INSN_MFCR(RT_BITMASK); > > # > +# I.3.3.15 Fixed-Point Select > +# > + > +0.31,6.RT,11.RA,16.RB,21.BF,26.15,31./:A::isel:Integer Select > + unsigned_word a; > + if (RA_is_0) a = 0; > + else a = *rA; > + if (CR & (1 << (31 - BF))) > + *rT = a; > + else > + *rT = *rB; > + > +# -- Joel