From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpgZr-000133-Hc for qemu-devel@nongnu.org; Tue, 14 Oct 2008 05:52:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpgZl-00011Q-Vp for qemu-devel@nongnu.org; Tue, 14 Oct 2008 05:52:30 -0400 Received: from [199.232.76.173] (port=44062 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpgZi-00010w-4z for qemu-devel@nongnu.org; Tue, 14 Oct 2008 05:52:23 -0400 Received: from wf-out-1314.google.com ([209.85.200.175]:38771) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KpgZh-0006Xm-Lh for qemu-devel@nongnu.org; Tue, 14 Oct 2008 05:52:21 -0400 Received: by wf-out-1314.google.com with SMTP id 27so2025384wfd.4 for ; Tue, 14 Oct 2008 02:52:19 -0700 (PDT) Message-ID: <761ea48b0810140252g7136c9e0m7ead8fd7e45c21cf@mail.gmail.com> Date: Tue, 14 Oct 2008 11:52:19 +0200 From: "Laurent Desnogues" Subject: Re: [Qemu-devel] [ARM] Problem in a NEON instruction In-Reply-To: <20081014092338.GA13141@volta.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <761ea48b0806100332r16fc2eafxa2e9db5e5afadeb4@mail.gmail.com> <20081014092338.GA13141@volta.aurel32.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, Oct 14, 2008 at 11:23 AM, Aurelien Jarno wrote: > > Your patch is indeed correct. It seems there is another mistake (at > least compared to the 64-bit version) in this instruction, please find > an updated patch below. > > diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c > index 4ee5658..35fbaf5 100644 > --- a/target-arm/neon_helper.c > +++ b/target-arm/neon_helper.c > @@ -456,11 +456,11 @@ uint64_t HELPER(neon_shl_s64)(uint64_t valop, uint64_t shiftop) > if (tmp >= sizeof(src1) * 8) { \ > dest = 0; \ > } else if (tmp < -sizeof(src1) * 8) { \ > - dest >>= sizeof(src1) * 8 - 1; \ > + dest = src1 >> (sizeof(src1) * 8 - 1); \ > } else if (tmp == -sizeof(src1) * 8) { \ > dest = src1 >> (tmp - 1); \ > dest++; \ > - src2 >>= 1; \ > + dest >>= 1; \ > } else if (tmp < 0) { \ > dest = (src1 + (1 << (-1 - tmp))) >> -tmp; \ > } else { \ Your addition looks good to me. Laurent