From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzUex-0000Ax-Fe for qemu-devel@nongnu.org; Mon, 10 Nov 2008 06:10:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzUeu-0000A5-NA for qemu-devel@nongnu.org; Mon, 10 Nov 2008 06:10:17 -0500 Received: from [199.232.76.173] (port=48629 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzUeu-0000A1-HW for qemu-devel@nongnu.org; Mon, 10 Nov 2008 06:10:16 -0500 Received: from savannah.gnu.org ([199.232.41.3]:37416 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KzUeu-00069K-6Z for qemu-devel@nongnu.org; Mon, 10 Nov 2008 06:10:16 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KzUet-0003Cr-FB for qemu-devel@nongnu.org; Mon, 10 Nov 2008 11:10:15 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KzUet-0003Cn-70 for qemu-devel@nongnu.org; Mon, 10 Nov 2008 11:10:15 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Mon, 10 Nov 2008 11:10:15 +0000 Subject: [Qemu-devel] [5667] target-alpha: fix cmpbge instruction 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 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)