From: Vince Weaver <vince@csl.cornell.edu>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] SPARC sdiv patch
Date: Mon, 25 Aug 2008 15:12:34 -0400 (EDT) [thread overview]
Message-ID: <20080825150914.G45325@stanley.csl.cornell.edu> (raw)
Hello
the SPARC v9 manual specifies the sdiv instruction as computing
Y concated with the *lower 32 bits* of r[rs1] / lower 32 bits of r[rs2]
The current code does not ensure that only the lowest 32 bits of rs1 are
used. The following patch fixes this.
This fix allows the "gcc" SPEC 2000 benchmark complete successfully.
The "udiv" helper might also need this fix.
Vince
--- target-sparc/op_helper.c.orig 2008-08-25 14:55:29.000000000 -0400
+++ target-sparc/op_helper.c 2008-08-25 15:04:51.000000000 -0400
@@ -2310,7 +2310,7 @@
int64_t x0;
int32_t x1;
- x0 = a | ((int64_t) (env->y) << 32);
+ x0 = (a &0xffffffff) | ((int64_t) (env->y) << 32);
x1 = b;
if (x1 == 0) {
next reply other threads:[~2008-08-25 19:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-25 19:12 Vince Weaver [this message]
2008-08-25 19:45 ` [Qemu-devel] SPARC sdiv patch Blue Swirl
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=20080825150914.G45325@stanley.csl.cornell.edu \
--to=vince@csl.cornell.edu \
--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).