From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K9hRo-0001cC-I3 for qemu-devel@nongnu.org; Fri, 20 Jun 2008 10:18:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K9hRn-0001c0-2A for qemu-devel@nongnu.org; Fri, 20 Jun 2008 10:18:40 -0400 Received: from [199.232.76.173] (port=48260 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9hRm-0001bx-VU for qemu-devel@nongnu.org; Fri, 20 Jun 2008 10:18:38 -0400 Received: from savannah.gnu.org ([199.232.41.3]:59347 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 1K9hRm-0005wd-Nl for qemu-devel@nongnu.org; Fri, 20 Jun 2008 10:18:38 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1K9hRl-0003U6-K2 for qemu-devel@nongnu.org; Fri, 20 Jun 2008 14:18:37 +0000 Received: from bellard by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1K9hRk-0003Ty-GH for qemu-devel@nongnu.org; Fri, 20 Jun 2008 14:18:37 +0000 MIME-Version: 1.0 Errors-To: bellard Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Fabrice Bellard Message-Id: Date: Fri, 20 Jun 2008 14:18:36 +0000 Subject: [Qemu-devel] [4755] cmpxchg fixes 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: 4755 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4755 Author: bellard Date: 2008-06-20 14:18:35 +0000 (Fri, 20 Jun 2008) Log Message: ----------- cmpxchg fixes Modified Paths: -------------- trunk/target-i386/op_helper.c Modified: trunk/target-i386/op_helper.c =================================================================== --- trunk/target-i386/op_helper.c 2008-06-19 18:38:40 UTC (rev 4754) +++ trunk/target-i386/op_helper.c 2008-06-20 14:18:35 UTC (rev 4755) @@ -1837,6 +1837,8 @@ stq(a0, ((uint64_t)ECX << 32) | (uint32_t)EBX); eflags |= CC_Z; } else { + /* always do the store */ + stq(a0, d); EDX = (uint32_t)(d >> 32); EAX = (uint32_t)d; eflags &= ~CC_Z; @@ -1850,6 +1852,8 @@ uint64_t d0, d1; int eflags; + if ((a0 & 0xf) != 0) + raise_exception(EXCP0D_GPF); eflags = cc_table[CC_OP].compute_all(); d0 = ldq(a0); d1 = ldq(a0 + 8); @@ -1858,6 +1862,9 @@ stq(a0 + 8, ECX); eflags |= CC_Z; } else { + /* always do the store */ + stq(a0, d0); + stq(a0 + 8, d1); EDX = d1; EAX = d0; eflags &= ~CC_Z;