From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 4/5] target-alpha: Fix cvtlq.
Date: Sun, 13 Dec 2009 17:48:55 -0800 [thread overview]
Message-ID: <5428d17fff3b0886e17451fba1edb884b1a23f03.1260755765.git.rth@twiddle.net> (raw)
In-Reply-To: <cover.1260755765.git.rth@twiddle.net>
We were missing the 0xc0000000 mask, leading to incorrect results.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
target-alpha/op_helper.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c
index 8eba5ec..ff120ad 100644
--- a/target-alpha/op_helper.c
+++ b/target-alpha/op_helper.c
@@ -954,7 +954,9 @@ uint64_t helper_cvtqg (uint64_t a)
uint64_t helper_cvtlq (uint64_t a)
{
- return (int64_t)((int32_t)((a >> 32) | ((a >> 29) & 0x3FFFFFFF)));
+ int32_t lo = a >> 29;
+ int32_t hi = a >> 32;
+ return (lo & 0x3FFFFFFF) | (hi & 0xc0000000);
}
static inline uint64_t __helper_cvtql(uint64_t a, int s, int v)
--
1.6.5.2
next prev parent reply other threads:[~2009-12-14 2:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-14 1:56 [Qemu-devel] [PATCH 0/5] Alpha improvments, round 3 Richard Henderson
2009-12-14 1:18 ` [Qemu-devel] [PATCH 1/5] target-alpha: Add placeholders for missing userspace PALcalls Richard Henderson
2009-12-14 1:46 ` [Qemu-devel] [PATCH 2/5] target-alpha: Implement fp branch/cmov inline Richard Henderson
2009-12-14 1:47 ` [Qemu-devel] [PATCH 3/5] target-alpha: Fix generic ctz64 Richard Henderson
2009-12-14 1:48 ` Richard Henderson [this message]
2009-12-14 1:50 ` [Qemu-devel] [PATCH 5/5] target-alpha: Fix float32_to_s vs zero exponent Richard Henderson
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=5428d17fff3b0886e17451fba1edb884b1a23f03.1260755765.git.rth@twiddle.net \
--to=rth@twiddle.net \
--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).