From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOZta-00069u-IJ for qemu-devel@nongnu.org; Wed, 17 Oct 2012 16:07:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOZtZ-0001yL-B2 for qemu-devel@nongnu.org; Wed, 17 Oct 2012 16:07:14 -0400 Received: from hall.aurel32.net ([88.191.126.93]:58028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOZtZ-0001yB-53 for qemu-devel@nongnu.org; Wed, 17 Oct 2012 16:07:13 -0400 Date: Wed, 17 Oct 2012 22:07:10 +0200 From: Aurelien Jarno Message-ID: <20121017200710.GC32522@hall.aurel32.net> References: <1350319158-7263-1-git-send-email-proljc@gmail.com> <1350319158-7263-10-git-send-email-proljc@gmail.com> <20121016232324.GA20326@ohm.aurel32.net> <20121017060515.GA22579@ohm.aurel32.net> <507E5B3B.6010407@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <507E5B3B.6010407@twiddle.net> Sender: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH v11 09/14] target-mips: Add ASE DSP bit/manipulation instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Jia Liu , qemu-devel@nongnu.org On Wed, Oct 17, 2012 at 05:16:11PM +1000, Richard Henderson wrote: > On 2012-10-17 16:05, Aurelien Jarno wrote: > >>>> > >> + target_long temp; > >>>> > >> + > >>>> > >> + imm = (ctx->opcode >> 16) & 0xFF; > >>>> > >> + temp = imm; > >>>> > >> + temp = (temp << 8) | temp; > >>>> > >> + temp = (temp << 16) | temp; > >>>> > >> + temp = (temp << 32) | temp; > >>>> > >> + tcg_gen_movi_tl(cpu_gpr[ret], temp); > >>>> > >> + break; > >>>> > >> + } > >>> > > > >>> > > This hasn't been fixed, and thus is still wrong. > >>> > > > >> > > >> > Thank you for check this again. > >> > May you give me more comment about this please? I'm not sure what > >> > should do here. > >> > > > The instruction is defined as: > > > > | Replicate a immediate byte into all elements of an eight byte vector. > > | > > | Description: rd ← immediate || immediate || immediate || immediate || immediate || > > | immediate || immediate || immediate > > > > In your code, I only see the value replicated 4 times, not 8 times. > > There are 3 doublings: 2**3 = 8. Look again, it's right. > Oops, you are correct, I read it to fast and thought it was implemented the same way as the other REPL instructions, that is the immediate are orred one at a time. So Jia, please keep the original version of this code. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net