From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOZcZ-0001Vr-3B for qemu-devel@nongnu.org; Wed, 17 Oct 2012 15:49:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOZcU-0005TG-6n for qemu-devel@nongnu.org; Wed, 17 Oct 2012 15:49:39 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:51507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOZcU-0005T4-0U for qemu-devel@nongnu.org; Wed, 17 Oct 2012 15:49:34 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so7585124pbb.4 for ; Wed, 17 Oct 2012 12:49:33 -0700 (PDT) Sender: Richard Henderson Message-ID: <507E5B3B.6010407@twiddle.net> Date: Wed, 17 Oct 2012 17:16:11 +1000 From: Richard Henderson MIME-Version: 1.0 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> In-Reply-To: <20121017060515.GA22579@ohm.aurel32.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Aurelien Jarno Cc: Jia Liu , qemu-devel@nongnu.org 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. r~