From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOVLT-0001YZ-1f for qemu-devel@nongnu.org; Wed, 17 Oct 2012 11:15:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOVLO-0005vX-9R for qemu-devel@nongnu.org; Wed, 17 Oct 2012 11:15:42 -0400 Received: from hall.aurel32.net ([88.191.126.93]:56559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOVLO-0005v5-3F for qemu-devel@nongnu.org; Wed, 17 Oct 2012 11:15:38 -0400 Date: Wed, 17 Oct 2012 17:15:30 +0200 From: Aurelien Jarno Message-ID: <20121017151530.GA3846@ohm.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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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: Jia Liu Cc: qemu-devel@nongnu.org On Wed, Oct 17, 2012 at 03:41:23PM +0800, Jia Liu wrote: > Hi Aurelien, > > On Wed, Oct 17, 2012 at 2:05 PM, Aurelien Jarno wrote: > > On Wed, Oct 17, 2012 at 11:44:41AM +0800, Jia Liu wrote: > >> Hi Aurelien, > >> > >> >> +#ifdef TARGET_MIPS64 > >> >> + case OPC_ABSQ_S_QH_DSP: > >> >> + switch (op2) { > >> >> + case OPC_REPL_OB: > >> >> + check_dsp(ctx); > >> >> + { > >> >> + 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. > > > > Thank you very much, is this code OK? > > case OPC_REPL_OB: > check_dsp(ctx); > { > target_long temp; > > imm = (ctx->opcode >> 16) & 0xFF; > temp = ((uint64_t)imm << 56) | ((uint64_t)imm << 48) | > ((uint64_t)imm << 40) | ((uint64_t)imm << 32) | > ((uint64_t)imm << 24) | ((uint64_t)imm << 16) | > ((uint64_t)imm << 8) | (uint64_t)imm; > tcg_gen_movi_tl(cpu_gpr[ret], temp); > break; > } > Yes, this looks fine now. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net