qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Juha.Riihimaki@nokia.com
Subject: [Qemu-devel] [PATCH 3/5] ARM: Fix VQSHL of signed 64 bit values by shift counts >= 64
Date: Tue,  7 Dec 2010 14:13:43 +0000	[thread overview]
Message-ID: <1291731225-3155-4-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1291731225-3155-1-git-send-email-peter.maydell@linaro.org>

VQSHL of a signed 64 bit non-zero value by a shift count >= 64 should
saturate; return the correct value in this case.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target-arm/neon_helper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
index d29b884..2dc3d96 100644
--- a/target-arm/neon_helper.c
+++ b/target-arm/neon_helper.c
@@ -608,7 +608,7 @@ uint64_t HELPER(neon_qshl_s64)(CPUState *env, uint64_t valop, uint64_t shiftop)
     if (shift >= 64) {
         if (val) {
             SET_QC();
-            val = (val >> 63) & ~SIGNBIT64;
+            val = (val >> 63) ^ ~SIGNBIT64;
         }
     } else if (shift <= -64) {
         val >>= 63;
-- 
1.6.3.3

  parent reply	other threads:[~2010-12-07 14:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07 14:13 [Qemu-devel] [PATCH 0/5] ARM: fix VQSHL (register) Peter Maydell
2010-12-07 14:13 ` [Qemu-devel] [PATCH 1/5] ARM: Fix arguments passed to VQSHL helpers Peter Maydell
2010-12-07 14:13 ` [Qemu-devel] [PATCH 2/5] ARM: Fix VQSHL of signed 64 bit values Peter Maydell
2010-12-07 14:13 ` Peter Maydell [this message]
2010-12-07 14:13 ` [Qemu-devel] [PATCH 4/5] ARM: remove pointless else clause in VQSHL of u64 Peter Maydell
2010-12-07 14:13 ` [Qemu-devel] [PATCH 5/5] ARM: Correct result in saturating cases for VQSHL of s8/16/32 Peter Maydell
2010-12-27 20:18 ` [Qemu-devel] [PATCH 0/5] ARM: fix VQSHL (register) Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291731225-3155-4-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=Juha.Riihimaki@nokia.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).