Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LmCmH-0002Up-9p for qemu-devel@nongnu.org; Tue, 24 Mar 2009 15:59:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LmCmF-0002Sd-Fu for qemu-devel@nongnu.org; Tue, 24 Mar 2009 15:59:12 -0400 Received: from [199.232.76.173] (port=38984 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LmCmF-0002SX-DQ for qemu-devel@nongnu.org; Tue, 24 Mar 2009 15:59:11 -0400 Received: from spsmtp02oc.mail2world.com ([74.202.142.148]:3939) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LmCmF-0003GS-1j for qemu-devel@nongnu.org; Tue, 24 Mar 2009 15:59:11 -0400 From: =?iso-8859-1?Q?Torbj=F6rn_Andersson?= Date: Tue, 24 Mar 2009 20:59:16 +0100 Message-ID: <001601c9acbb$041d9840$0c58c8c0$@tt@home.se> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Language: sv Subject: [Qemu-devel] [PATCH target-arm] Don' use T[x] in helper 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 Hi all! I hit a strange issue with add_cc, can't really explain how it appeared = but it did. The patch below solved my problem. Can someone make a qualified guess why? I'm compling with gcc 4. However, T0 and T1 in a helper should not be used, because it creates a unnecessary dependency between translate.c and op_helper.c. Am I = correct? Further, if we cannot trust T0 and T1 in a helper, what about the global env-variable? /Best regards Torbj=F6rn Andersson Index: op_helper.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- op_helper.c (revision 6883) +++ op_helper.c (working copy) @@ -307,7 +307,7 @@ uint32_t HELPER (add_cc)(uint32_t a, uint32_t b) { uint32_t result; - result =3D T0 + T1; + result =3D a + b; env->NF =3D env->ZF =3D result; env->CF =3D result < a; env->VF =3D (a ^ b ^ -1) & (a ^ result);