From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5667] target-alpha: fix cmpbge instruction
Date: Mon, 10 Nov 2008 11:10:15 +0000 [thread overview]
Message-ID: <E1KzUet-0003Cn-70@cvs.savannah.gnu.org> (raw)
Revision: 5667
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5667
Author: aurel32
Date: 2008-11-10 11:10:14 +0000 (Mon, 10 Nov 2008)
Log Message:
-----------
target-alpha: fix cmpbge instruction
The cmpbge instruction should compare all 8 bytes of one 64-bit value with
another. However, we were looping with a < 7 condition which was skipping
the top byte. So if we were doing a compare where the top byte was
important, we could get the wrong result (this notably breaks the strlen()
function with certain sized strings).
(Vince Weaver)
Modified Paths:
--------------
trunk/target-alpha/op_helper.c
Modified: trunk/target-alpha/op_helper.c
===================================================================
--- trunk/target-alpha/op_helper.c 2008-11-10 02:55:33 UTC (rev 5666)
+++ trunk/target-alpha/op_helper.c 2008-11-10 11:10:14 UTC (rev 5667)
@@ -330,7 +330,7 @@
int i;
res = 0;
- for (i = 0; i < 7; i++) {
+ for (i = 0; i < 8; i++) {
opa = op1 >> (i * 8);
opb = op2 >> (i * 8);
if (opa >= opb)
reply other threads:[~2008-11-10 11:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1KzUet-0003Cn-70@cvs.savannah.gnu.org \
--to=aurelien@aurel32.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).